background image

Importing from .CSV Files

To import data from comma delimited, .csv files, you must create a suitable text file with the same name as the name of the table into which the information is to be imported and have a .csv file extenstion. For example, if you wish to import customer details in the Sales Ledger table, sl then your import file must be named sl.csv. You can find a full list of all the .csv file names that must be created to import different types of data.

The top line of the .csv file must contain the lists of field names that are to be imported as a comma separated list. Subsequent lines have the data from each record to be imported on a single record per line basis. The data must be a comma separated list with the data in the same order as the list of field names on on the 1st line. If a text field contains one or more commas then the text should be enclosed in double quotes.

The example below shows a small section of a sl.csv file for importing customer details into the sales ledger - only the 1st 5 fields are shown:

accref,conm,balance,adr1,adr2
A01,AALCO LANCASHIRE LTD (AE),7760.29,EXPRESS TRADING ESTATE,ST...
A02,APEX TUBES & VALVES - USE S05,0,EMPSON ROAD,EASTERN INDUSTRY
A03,ABC STAINLESS LTD,0,EMPSON ROAD,EASTERN INDUSTRY
A04,AALCO NOTTINGHAM (NM),22726,HARRIMANS LANE,DUNKIRK
A05,AALCO AYLESBURY (UE),1872.27,"UNIT 1, PREMUS",COLDHARBOUR WAY
A06,ADFAB ENGINEERING LTD - USE A61,0,REFORM WORKS,ROTHERHAM ROAD
A07,AALCO MERSEYSIDE LTD (SS),32372.95,207 GREAT ...
A08,AALCO NORWICH LTD (NH),14186.63,ROUNDTREE WAY,MOUSHOLD LANE
A09,AALCO SWANLEY LTD (RD),5062.38,UNITS 6/7,PEDHAM PLACE IND EST
A10,ARROSS ENGINEERING LTD,0,149 ALBERT ROAD,CHADDESDEN
A100,ALL STAINLESS LIMITED,15839.41,UNIT 21 CAMFORD WAY,SUNDON PARK

For actual examples of .csv files, see the samples\csv folder. You can get a list of table and field names in Data Tables

Customers
.CSV File NameDetails
sl.csvSales Ledger - Customer Details
Sales Order Processing
.CSV File NameDetails
sop.csvSales Order Processing Header Details
sop_itm.csvSales Order Items Details
Sales Invoicing
.CSV File NameDetails
inv.csvSales Invoices Header Details
inv_itm.csvSales Invoices Items Details
Suppliers
.CSV File NameDetails
pl.csvPurchase Ledger - Supplier Details
Purchase Orders
.CSV File NameDetails
po.csvPurchase Order Header Details
pop_itm.csvPurchase Order Items Details
Stock Control
.CSV File NameDetails
stk.csvStock Records / Details
stk_cat.csvStock Categories
Follow Us on Facebook  Follow Us on Twitter  Follow Us on YouTube
Copyright © 2014 - 2024 1T Solutions Limited. All Rights Reserved.
/index.php?dir=h&pg=dpu-csvimpeg