1XLS2CSV(1)            User Contributed Perl Documentation           XLS2CSV(1)
2
3
4

NAME

6       xls2csv - A script that recodes a spreadsheet's charset and saves as
7       CSV.
8

DESCRIPTION

10       This script will recode a spreadsheet into a different character set
11       and output the recoded data as a csv file.
12
13       The script came about after many headaches from dealing with Excel
14       spreadsheets from clients that were being received in various character
15       sets.
16

OPTIONS

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

EXAMPLE USAGE

30       The following example will convert a spreadsheet that is in the
31       WINDOWS-1252 character set (WinLatin1) and save it as a csv file in the
32       UTF-8 character set.
33
34               xls2csv -x "1252spreadsheet.xls" -b WINDOWS-1252 -c "ut8csvfile.csv" -a UTF-8
35
36       This example with convert the worksheet named "Users" in the given
37       spreadsheet.
38
39               xls2csv -x "multi_worksheet_spreadsheet.xls" -w "Users" -c "users.csv"
40

NOTES

42       The spreadsheet's charset (-b) will default to UTF-8 if not set.
43
44       If the csv's charset (-a) is not set, the CSV file will be created
45       using the same charset as the spreadsheet.
46

REQUIRED MODULES

48       This script requires the following modules:
49
50               Locale::Recode
51               Unicode::Map
52               Spreadsheet::ParseExcel
53               Spreadsheet::ParseExcel::FmtUnicode (should be included with Spreadsheet::ParseExcel)
54               Text::CSV_XS
55

CAVEATS

57       It probably will not work work with spreadsheets that use formulas.
58
59       A line in the spreadsheet is assumed to be blank if there is nothing in
60       the first column.
61
62       Some users have reported problems trying to convert a spreadsheet while
63       it was opened in a different application.  You should probably make
64       sure that no other programs are working with the spreadsheet while you
65       are converting it.
66

AUTHOR

68       Ken Prows (perl@xev.net)
69
71       Copyright (C) 2005 Ken Prows. All rights reserved.
72
73       This script is free software; you can redistribute it and/or modify it
74       under the same terms as Perl itself.
75
76
77
78perl v5.12.0                      2005-09-30                        XLS2CSV(1)
Impressum