This topic describes how to create a new OLE-DB data source to connect to a text CSV file for use with Endicia Professional. With OLE-DB, Endicia Professional can read a comma-separated text file with a column heading line.
If you need to post back data to specific rows in a CSV file, or work with many different CSV files with unique file names, you can connect directly to Microsoft Excel. For more information see, See "About Connecting to Microsoft Excel" and See "Set Up Data Post-Back".
If your CSV text file is comma-separated and has a header line, you can start at Step 1 below. If your CSV text file is tab-separated or does not have a header line, you must create a text file called "schema.ini" and place it in the folder with the CSV text file. The schema.ini file contains format information that OLE-DB uses when accessing the CSV text file. You can create the schema.ini file with Notepad, for example. It should contain lines similar to this:
[SHIPMENTS.CSV]
COLNAMEHEADER=FALSE
FORMAT=CSVDELIMITED
MAXSCANROWS=25
CHARACTERSET=OEM
COL1="ORDER NUMBER"
CHAR WIDTH 255
COL2="NAME" CHAR WIDTH 255
COL3="ADDRESS 1" CHAR WIDTH 255
COL4="ADDRESS 2" CHAR WIDTH 255
COL5="CITY" CHAR WIDTH 255
COL6="STATE" CHAR WIDTH 255
COL7="POSTAL CODE" CHAR WIDTH 255
COL8="COUNTRY" CHAR WIDTH 255
COL9="PHONE" CHAR WIDTH 255
COL10="EMAIL" CHAR WIDTH 255
You must edit the first line to match the name of your CSV text file. You will also need to edit the Col1, Col2, (and so on) lines to match the column names in your file. More or fewer Col lines may be needed, depending on the contents of your file.
If your file is tab-separated, change the Format line to:
Format=TabDelimited
The first time that you run Endicia Professional, the Database Connections Setup wizard starts automatically.
Afterward, you can manually start the Database Connections Setup wizard.
Steps
The data file location and source appear in the Location area of the Create Data Source dialog box.
If your CSV file does not have column heading names, see the beginning of this topic.
Otherwise, do not select the check box.
Enter a name of your choice for the data source name, and click Next.
The Order Lookup Data Map window displays your data source name.
After you have specified the OLE-DB data source to use with Endicia Professional, the Create a SELECT Statement wizard runs that helps you specify the SELECT statement to retrieve data from your data source CSV text file.
Copyright © 2017 Endicia. All Rights Reserved.