logo
CSV Converter
News Download Features Order Screenshots Contacts

CSV Converter Command Line

Download

Single CSV file conversion


"c:\Program Files\CSV Converter\csvcnv.exe" file.csv outfile.ext [OPTIONS] | @cmdfile

Batch CSV file conversion


"c:\Program Files\CSV Converter\csvcnv.exe *.csv destdir /TOEXT [OPTIONS]

where ext - (.dbf, .txt, .htm, .prg, .xml, .xls, .xlsx, .csv, .sql, .rtf, .tsv)

Common options


/SRCHDR - header in the first line.
/SRCSEPx - where x delimiter.
/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

/STARTFROM:N - Start conversion from line N

/SORTBY:Name - Sort rows by column: Name

/ANALYZE - allows detect optimal file structure for export to DBF.

/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\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\CSV Converter\csvcnv.exe" mybase.csv out.xlsx /SRCSEP; /COLUMNS:ID,NAME,ADDR

multiple file conversion:

"c:\Program Files\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

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

Download

Updated Thu, 30 Nov 2017


See also:Convert CSV to XLS   Convert CSV to XML   Convert CSV to SQL   Convert CSV to DBF

Back to CSV Converter Home

Copyright © HiBase Group, 2002-2017