Xls2csv

From Christoph's Personal Wiki
Revision as of 09:59, 2 January 2007 by Christoph (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The correct title of this article is xls2csv. The initial letter is capitalized due to technical restrictions.

xls2csv is a command line script that recodes a spreadsheet's charset and saves as CSV. It was written by Ken Prows.

Basic usage

The following example will convert a spreadsheet that is in the WINDOWS-1252 character set (WinLatin1) and save it as a csv file in the UTF-8 character set.

xls2csv -x "1252spreadsheet.xls" -b WINDOWS-1252 -c "ut8csvfile.csv" -a UTF-8

This example with convert the worksheet named "Users" in the given spreadsheet.

xls2csv -x "multi_worksheet_spreadsheet.xls" -w "Users" -c "users.csv" 

Options

-x     : filename of the source spreadsheet
-b     : the character set the source spreadsheet is in (before)
-c     : the filename to save the generated csv file as
-a     : the character set the csv file should be converted to (after)
-q     : quiet mode
-s     : print a list of supported character sets
-h     : print help message
-v     : get version information
-W     : list worksheets in the spreadsheet specified by -x
-w     : specify the worksheet name to convert (defaults to the first worksheet)

See also

External links