When attempting to import custom data using a .csv or .txt file, leading zeros are trimmed. This is because the .csv or .txt file contains numerical data, such as numeric employee ID. A Schema.ini file can be created to tell Access It! Universal that the numeric field you want to import should be treated as a text field.
A Schema.ini file is a Microsoft configuration file associated with the Microsoft JET engine. The Schema.ini tells JET how to interpret the contents of .csv or .txt files, including data structure, date formats, and other settings. For example, creating a Schema.ini file that specifies that the numeric employee ids in your import file should be treated as text will allow you to import a numerical value including the leading zeroes.
- Access It!® Universal.NET v8 and older
Access It! v9 and later introduced modern controls that do not respect Schema.ini
- Create a new text file
- Within the text file, use the following syntax:
-
CSV Files
[FILENAME.CSV]
ColNameHeader=True
MaxScanRows=0
CharacterSet=ANSI
Format=CSVDelimited
COL#=COLUMNNAME Text - TXT Files
[FILENAME.TXT]
ColNameHeader=True
MaxScanRows=0
CharacterSet=ANSI
COL#=COLUMNNAME Text
-
FILENAME must match the name of the source CSV or TXT file.
If ColNameHeader=False then all columns must be specified.
# must match the column number.
COLUMNAME must match the column name containing the numerical value.