CSV Converter Command Line
Single CSV file conversion
"c:\Program Files (x86)\Advanced CSV Converter\csvcnv.exe" file.csv outfile.ext [OPTIONS] | @cmdfile
Batch CSV file conversion
"c:\Program Files (x86)\Advanced CSV Converter\csvcnv.exe" *.csv destdir /TOEXT [OPTIONS]
where ext - (.dbf, .txt, .htm, .prg, .xml, .xls, .xlsx, .csv, .sql, .rtf, .tsv, .json)
Using list of file from text file (one file per line) "c:\Program Files (x86)\Advanced CSV Converter\csvcnv.exe" /LIST:c:\mybase\list.txt c:\out\ /TOXLSX
Common options
/CLEARHISTORY - Clear history list.
/HISTORYTO - Save history list.
/SRCHDR - header in the first line.
/SRCSEPx - where x delimiter.
/LOG[:path] - write log file
/LOGAPPEND - add to exist log file
/SRCSEPTAB for TAB delimiter
/SRCSEPSPACE for space delimiter
/SRCSEPPIPE use '|' as delimiter
/COLUMNS:column1,column2 - select columns for conversion
/FILTER:filter.txt - use filter
/TEMPLATE:mytemplate.tc - use template (generated in the columns editor)
/REVERSE - export in reverse order
/SKIPDUPS - skip duplicated rows
/SKIPDUPSEXACT - skip duplicated rows (case sensitive)
/STARTFROM:N - Start conversion from line N
/SORTBY:Name - Sort rows by column: Name
/ANALYZE - allows detect optimal file structure for export to DBF.
/RMSRC - remove source file after conversion.
/CONSOLE - output to console
/KEEPDATE - Save origianal time stamp
/ASXML - export to Excel(xls) as xml based
example:
"c:\Program Files\CSV Converter\csvcnv.exe" file.csv outfile.xls /ASXML
/TYPES:colname:type[size]
allows you set types for columns (N - numeric, C - character, D- date)
example1 (CSV file with header in first line):
"c:\Program Files\CSV Converter\csvcnv.exe" in.csv out.xls /TYPES:ID:N10, ADDR:C30
example2 (CSV file without header):
"c:\Program Files (x86)\Advanced CSV Converter\csvcnv.exe" in.csv out.xls /TYPES:Field1:N10, Field2:C40
/FILTER:filterfile
filter file format:
Field name:Value|Expression
Examples:
single file conversion:
"c:\Program Files (x86)\Advanced CSV Converter\csvcnv.exe" mybase.csv out.xlsx /SRCSEP; /COLUMNS:ID,NAME,ADDR
multiple file conversion:
"c:\Program Files (x86)\Advanced CSV Converter\csvcnv.exe" c:\base\*.csv c:\exports\ /TOSQL
Text/CSV options
/SINGLEQUOTA - single quotas
/DOUBLEQUOTA - double quotas
/UTF8 - Use UTF-8 encoding
/SEPx - where x delimiter
SEPTAB for TAB delimiter
/SEPSPACE for space delimiter
/SEPPIPE use '|' as delimiter
/HDR - for put the fields names in first line.
dBase options
/DBASE3 - DBASE III format
/DBASE4 - DBASE IV format
/VFP - Visual Foxpro format
/DBASE7 - dBase Level 7 format
example:
"c:\Program Files\CSV Converter\csvcnv.exe" c:\base\myfile.dbf out.dbf /DBASE4
HTML options
/ASFORM - one record on the one page
/NUMBER - record number as first column
/MAXPERPAGE - maximum records on the one page
example: /MAXPERPAGE=100
/TITLE - page title
example: /TITLE=Customers
/COLOR - Text color
example: /COLOR=#0000ff
/BACKGROUND - Background color
/BACKGROUND=#c0c0c0
Updated Thu, 12 Dec 2024