Exporting data from CSV or text files to dBase is one of the simplest tasks for Exportizer. But if you do it for the first time, some explanation may be needed.
Before you start, please consider the following:
- Exportizer standard edition is enough to perform the task
- You can work with dBase and text/CSV data either via ADO or BDE interface. What's important:
- When using ADO and ODBC, the Exportizer bitness must match the bitness of the corresponding ODBC driver
- When using ADO and Microsoft Jet, Exportizer 32-bit must be used
- When using ADO and Microsoft ACE, the Exportizer bitness must match the bitness of the installed Microsoft Office
- When using BDE, Exportizer 32-bit must be used
Configuring CSV to DBF Exporting
- Launch Exportizer.
- Register your source database. It must be a folder with .csv and/or .txt files. The interface can be ADO (recommended) or BDE; here are some hints on choosing the interface:
- Check if your CSV or TXT file has a schema, which describes the data structure. ADO schema is located in schema.ini file from the same folder; the schema file contains schemas for all data files in the folder. BDE schemas are located in .sch files from the same folder, one schema per file; schema file name must match the name of the data file (excluding extension). If you found the schema file for your data file, use the corresponding interface.
- If the schema does not exist, Exportizer will ask you to create it using its interface. But you can also create the schema manually. Anyway, you still can try to open the data file without creating a schema (using ADO interface), and if it works for you, leave everything as is.
- If you choose the BDE interface, you'll probably need some preparations on Windows Vista+ to get it to work, but there are guidelines in the Internet.
- Choosing ADO interface lets you build your own connection string for the source database.
- Open the registered CSV or text database.
- Chose a table to export.
- Click Export button.
- Choose the destination format. For dBase, you have two options: dBase (DBF) and Database. They work completely different. Try both and compare. The first one is simpler to configure and faster, but does not support dBase versions greater than V. And the latter one requires registering the target database; if you already did that, just select the database from the database list, otherwise, click '...' button to register it.
- Specify the export parameters.
- Click Next and check the source-to-target field mappings.
- Click Export.
Converting CSV to DBF from Command Line
Below are some examples of exporting CSV files to DBF format.
Exporting a CSV file to dBase (DBF) format in Exportizer 32-bit:
"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer 8\exptizer.exe" /export /ExportType=DBF /ExportMode=REPLACE+INSERT /FieldMappings=ID=ID;FIRSTNAME=FIRSTNAME;LASTNAME=LASTNAME;CITY=CITY;COUNTRY=COUNTRY /dbfVersion=5 "/encoding=DBASE ENU CP437" /IncludeMemo /SrcDBInterface=ado /SrcDB=C:\TEST\CL_ADDR.csv /TrgDB=C:\TEST\CL_ADDR.dbf
Exporting all CSV files from a certain folder to dBase (DBF) format in Exportizer Enterprise 32-bit (target file names are copied from the source ones, except extensions):
"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 8\exptizer.exe" /export /ExportType=DBF /ExportMode=REPLACE+INSERT /dbfVersion=5 "/encoding=DBASE ENU CP437" /IncludeMemo /SrcDBInterface=ado /SrcDB=C:\TEST\*.csv /TrgDB=C:\TEST\*.dbf
Exporting several CSV files from a certain folder to dBase (DBF) format in Exportizer Enterprise 32-bit (target file names are specified explicitly in a separate table mappings file):
"C:\Program Files (x86)\Vitaliy Levchenko\Exportizer Enterprise 8\exptizer.exe" /export /ExportType=DBF /ExportMode=REPLACE+INSERT /TableMappingsFile=C:\TEST\TblMapping.xml /dbfVersion=5 "/encoding=DBASE ENU CP437" /IncludeMemo /SrcDBInterface=ado /SrcDB=C:\TEST /TrgDB=C:\TEST