forked from dilshod/xlsx2csv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
86 lines (71 loc) · 3.23 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
xlsx to csv converter (http://github.com/dilshod/xlsx2csv)
Converts xslx files to csv format.
Handles large XLSX files. Fast and easy to use.
Supported version:
- 2.4
- 2.7
- 3.4
Installation:
sudo easy_install xlsx2csv
or
pip install xlsx2csv
Usage:
xlsx2csv.py [-h] [-v] [-a] [-c OUTPUTENCODING] [-s SHEETID]
[-n SHEETNAME] [-d DELIMITER] [-l LINETERMINATOR]
[-f DATEFORMAT] [-i] [-e] [-p SHEETDELIMITER]
[--hyperlinks]
[-I INCLUDE_SHEET_PATTERN [INCLUDE_SHEET_PATTERN ...]]
[-E EXCLUDE_SHEET_PATTERN [EXCLUDE_SHEET_PATTERN ...]] [-m]
xlsxfile [outfile]
positional arguments:
xlsxfile xlsx file path
outfile output csv file path
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-a, --all export all sheets
-c OUTPUTENCODING, --outputencoding OUTPUTENCODING
encoding of output csv ** Python 3 only ** (default: utf-8)
-s SHEETID, --sheet SHEETID
sheet number to convert
-n SHEETNAME, --sheetname SHEETNAME
sheet name to convert
-d DELIMITER, --delimiter DELIMITER
delimiter - columns delimiter in csv, 'tab' or 'x09'
for a tab (default: comma ',')
-l LINETERMINATOR, --lineterminator LINETERMINATOR
line terminator - lines terminator in csv, '\n' '\r\n'
or '\r' (default: os.linesep)
-f DATEFORMAT, --dateformat DATEFORMAT
override date/time format (ex. %Y/%m/%d)
-i, --ignoreempty skip empty lines
-e, --escape Escape \r\n\t characters
-p SHEETDELIMITER, --sheetdelimiter SHEETDELIMITER
sheet delimiter used to separate sheets, pass '' if
you do not need delimiter, or 'x07' or '\\f' for form
feed (default: '--------')
-q QUOTING, --quoting QUOTING
field quoting, 'none' 'minimal' 'nonnumeric' or 'all' (default: 'minimal')
--hyperlinks, --hyperlinks
include hyperlinks
-I INCLUDE_SHEET_PATTERN [INCLUDE_SHEET_PATTERN ...], --include_sheet_pattern INCLUDE_SHEET_PATTERN [INCLUDE_SHEET_PATTERN ...]
only include sheets named matching given pattern, only
effects when -a option is enabled.
-E EXCLUDE_SHEET_PATTERN [EXCLUDE_SHEET_PATTERN ...], --exclude_sheet_pattern EXCLUDE_SHEET_PATTERN [EXCLUDE_SHEET_PATTERN ...]
exclude sheets named matching given pattern, only
effects when -a option is enabled.
-m, --merge-cells merge cells
Expat SAX parser used for xml parsing.
See alternatives:
Bash:
http://kirk.webfinish.com/?p=91
Python:
http://github.com/staale/python-xlsx
http://github.com/leegao/pyXLSX
Ruby:
http://roo.rubyforge.org/
Java:
http://poi.apache.org/
All programs in this directory and subdirectories are published under
license GNU GPL version 2 or (at your option) any later version. For
more information, see COPYING or visit <http://www.gnu.org/copyleft/gpl.html>.