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               -n     : specify the worksheet number to convert (you cannot use this option with -w)
29               -f     : force the worsheet to be fully parsed. This disables the feature that skips rows when the first cell is blank
30

EXAMPLE USAGE

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

NOTES

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

REQUIRED MODULES

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

CAVEATS

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

AUTHOR

70       Ken Prows (perl@xev.net)
71
73       Copyright (C) 2005-2012 Ken Prows. All rights reserved.
74
75       This script is free software; you can redistribute it and/or modify it
76       under the same terms as Perl itself.
77
78
79
80perl v5.28.0                      2012-01-22                        XLS2CSV(1)
Impressum