logo
XLS Converter
News Download Features Order Screenshots Contacts FAQ

Convert XLS and XLSX/XLSM files via command line

Download for free

Single excel file conversion


"c:\Program Files\Advanced XLS Converter\xlscnv.exe" file.xls | file.xlsx | file.xlsm outfile.ext [/FILTER | /COLUMNS | /COLUMNSLIST | /SKIPDUPS | /SKIPEMPTY | /SHEETNUM | /SORTBY | /OPEN]

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

example for .xls format:
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" file.xls out.csv


example for .xlsx format:
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" file.xlsx out.csv

Convert multiple excel files at once (Batch conversion)



"c:\Program Files\Advanced XLS Converter\xlscnv.exe" *.xls destdir /TOEXT [OPTIONS]

where ext - (.dbf, .txt, .htm, .prg, .xml, .xls, .csv, .sql, .rtf)
example
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" c:\mybase\*.xlsx c:\out\ /TOXLS

Common options


/LOG|/LOG:logfile - generate log file
xlscnv.exe sample.xls sample.xls /LOG

/OPEN - open after conversion.
/HDR - for put the fields names in first line.

/LF - use LF(0xA) as row delimiter (useful for unix systems), default: CRLF
/REVERSE - export in reverse order



/SHEETNUM:N - Convert only sheet N

/SKIPDUPS - skip duplicated rows

/SKIPEMPTY - skip empty rows

/SORTBY:Col - sort rows by column: Col

/COLUMNS - set columns for export
syntax:
/COLUMNS:field1[:newname],field2[:newname]

example 1
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" sample.xls out.dbf /COLUMNS:CUST_NO:custom numbers,NAME:custom name

example 2
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" sample.xls sample.csv /COLUMNS:NAME,STREET


/COLUMNSLIST - set columns for export from text file
example:
xlscnv.exe sample.xls sample.csv /COLUMNSLIST:columns
where columns - text file with column names (one per line)

/FILTER:filterfile

filter file format:

Field name:Value|Expression


Examples:

single xls file conversion:

"c:\Program Files\Advanced XLS Converter\xlscnv.exe" mytable.xls out.txt /SEP;

multiple excel file conversion:

"c:\Program Files\Advanced XLS Converter\xlscnv.exe" c:\base\*.xls c:\exports\ /TOSQL

Text/CSV options

/SEPx - where x delimiter

/SEPPIPE - use '|' as delimiter
/SEPTAB - use Tab as delimiter

/UTF8 - use UTF-8 encoding

/SINGLEQUOTA - single quotas
/DOUBLEQUOTA - double quotas

/ALLQUOTAS - enclose all fields in quotas.

DBF options


/DBASE3 - DBASE III format
/DBASE4 - DBASE IV format
/VFP - Visual Foxpro format

example:
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" c:\base\myfile.xls out.dbf /DBASE4

SQL options

/ORACLE - use Oracle syntax
/MYSQL - use MySQL syntax
/MSSQL - use MS SQL Server syntax
/POSTGRESQL - PostgreSQL syntax

Excel options


export to Excel 2003 (xml-based):
"c:\Program Files\Advanced XLS Converter\xlscnv.exe" file.xls outfile.xls /XML

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

Copyright © XLS-CONVERTER.COM, 2002-2014