File structure
Downloads includes examples for each type of code and format.
Supported are the following file types:
CSV file structure
Top
Make sure your CSV file contains the following:
- The file extension is lowercase .csv, e.g. importFile.csv
- The file content is comma-delimited (,).
- Any field that includes comma (e.g. a Description field) as part of the content must be surrounded by the double quote character (“). Otherwise, the import process will read the comma as a delimiter rather than a character.
- The first row lists column headings that match database entity column names.
- Each data item corresponds to the column heading, and so it has the same column index as the heading.
Import files should use UTF8 encoding, especially if they include special characters (such as a trademark symbol).
Code sample
ProductNumber,ProductName,ProductReference1,ProductReference2,ProductReference3
PN-001,SULPHURIC ACID,,,
PN-002,METHYL TRICHLOROACETATE,,,
TXT file structure
Top
Make sure your text file contains the following:
- The file extension is lowercase .txt, e.g. importFile.txt
- The file content is pipe-delimited (|).
- Any field that includes pipe (e.g. a Description field) as part of the content must be surrounded by the double quote character (“). Otherwise, the import process will read the pipe as a delimiter rather than a character.
- The first row lists column headings that match database entity column names.
- Each data item corresponds to the column heading, and so it has the same column index as the heading.
Code sample
ProductNumber,ProductName,ProductReference1,ProductReference2,ProductReference3
PN-001|SULPHURIC ACID|||
PN-002|METHYL TRICHLOROACETATE
XML file structure
Top
Make sure your XML file contains the following:
- The file extension is lowercase .xml, e.g. importFile.xml.
- All records are surrounded by a top level xml node. This does not have to match the entity name in the database but should be meaningful, and correspond with what's been imported. For example, for Company Codes:
<CompanyCodes>
- Each record has a node name that matches the underlying entity (singular), e.g. for the Products table the node name that describes the record should be called Product.
- Each column heading corresponds to the entity column heading, e.g. the Products.ProductNumber database column should have the xml node name ProductNumber.
Code sample
<AccountCodes>
<AccountCode>
<Code>AC1</Code>
<Description>[XML] Account Code 1</Description>
</AccountCode>
<AccountCode>
<Code>AC2</Code>
<Description>[XML] Account Code 2</Description>
</AccountCode>
</AccountCodes>
Article last edited 20 July 2018