NAME
xls2csv - A script that recodes a spreadsheet's charset and saves as CSV.
DESCRIPTION
This script will recode a spreadsheet into a different character set and output the recoded data as a csv file.
The script came about after many headaches from dealing with Excel spreadsheets from clients that were being received in various character sets.
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
EXAMPLE 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
NOTES
The spreadsheet's charset (-b) will default to UTF-8 if not set.
If the csv's charset (-a) is not set, the CSV file will be created using the same charset as the spreadsheet.
REQUIRED MODULES
This script requires the following modules:
Locale::Recode
Unicode::Map
Spreadsheet::ParseExcel
Text::CSV_XS
CAVEATS
This only works with single worksheet spreadsheets.
It probably will not work work with spreadsheets that use formulas.
A line is the spreadsheet is assumed to be blank if there is nothing in the first column.
AUTHOR
Ken Prows (perl@xev.net)
COPYRIGHT
Copyright (C) 2005 Ken Prows. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
For help, use "xls2csv -h"