| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Acme::CPANModules::WorkingWithXLS; |
|
2
|
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
421611
|
use strict; |
|
|
4
|
|
|
|
|
9
|
|
|
|
4
|
|
|
|
|
202
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
1927
|
use Acme::CPANModulesUtil::Misc; |
|
|
4
|
|
|
|
|
2204
|
|
|
|
4
|
|
|
|
|
638
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY |
|
8
|
|
|
|
|
|
|
our $DATE = '2023-12-04'; # DATE |
|
9
|
|
|
|
|
|
|
our $DIST = 'Acme-CPANModules-WorkingWithXLS'; # DIST |
|
10
|
|
|
|
|
|
|
our $VERSION = '0.005'; # VERSION |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
my $text = <<'_'; |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
The following are tools (programs, modules, scripts) to work with Excel formats |
|
15
|
|
|
|
|
|
|
(XLS, XLSX) or other spreadsheet formats like LibreOffice Calc (ODS). |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
**Parsing** |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
is a common-interface front-end for |
|
22
|
|
|
|
|
|
|
(for reading LibreOffice Calc ODS format) or one of |
|
23
|
|
|
|
|
|
|
, , or Spreadsheet::XLSX |
|
24
|
|
|
|
|
|
|
(for reading XLS or XLSX, although Spreadsheet::XLSX is strongly discouraged |
|
25
|
|
|
|
|
|
|
because it is a quick-and-dirty hack). Spreadsheet::Read can also read CSV via |
|
26
|
|
|
|
|
|
|
Text::CSV_XS. The module can return information about cell's attributes |
|
27
|
|
|
|
|
|
|
(formatting, alignment, and so on), merged cells, etc. The distribution of this |
|
28
|
|
|
|
|
|
|
module also comes with some CLIs like , . |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
which claims to be a "faster XLSX parser". Haven't used |
|
31
|
|
|
|
|
|
|
this one personally or benchmarked it though. |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
**Getting information** |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
from |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
**Iterating/processing with Perl code** |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
CLI from lets you iterate each cell (with |
|
45
|
|
|
|
|
|
|
'XLSperl -ne' or row with 'XLSperl -ane') with a Perl code, just like you would |
|
46
|
|
|
|
|
|
|
each line of text with `perl -ne` (in fact, the command-line options of XLSperl |
|
47
|
|
|
|
|
|
|
mirror those of perl). Only supports the old Excel format (XLS not XLSX). Does |
|
48
|
|
|
|
|
|
|
not support LibreOffice Calc format (ODS). If you feed it unsupported format, it |
|
49
|
|
|
|
|
|
|
will fallback to text iterating, so if you feed it XLSX or ODS you will iterate |
|
50
|
|
|
|
|
|
|
chunks of raw binary data. |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
from |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
from |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
**Converting to CSV** |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
from . Since it's based on |
|
61
|
|
|
|
|
|
|
Spreadsheet::Read, it can read XLS/XLSX/ODS. It always outputs to file and not |
|
62
|
|
|
|
|
|
|
to stdout. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
`CATDOC` () contains following |
|
65
|
|
|
|
|
|
|
the programs `catdoc` (to print the plain text of Microsoft Word documents to |
|
66
|
|
|
|
|
|
|
standard output), (to convert Microsoft Excel workbook files to |
|
67
|
|
|
|
|
|
|
CSV), and `catppt` (to print plain text of Mirosoft PowerPoint presentations to |
|
68
|
|
|
|
|
|
|
standard output). Available as Debian package. They only support the older |
|
69
|
|
|
|
|
|
|
format (XLS and not XLSX). They do not support LibreOffice Calc format (ODS). |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
from |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
**Generating XLS** |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
TBD |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
_ |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
our $LIST = { |
|
81
|
|
|
|
|
|
|
summary => 'List of modules to work with Excel formats (XLS, XLSX) or other spreadsheet formats like LibreOffice Calc (ODS)', |
|
82
|
|
|
|
|
|
|
description => $text, |
|
83
|
|
|
|
|
|
|
tags => ['task'], |
|
84
|
|
|
|
|
|
|
}; |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Acme::CPANModulesUtil::Misc::populate_entries_from_module_links_in_description; |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |
|
89
|
|
|
|
|
|
|
# ABSTRACT: List of modules to work with Excel formats (XLS, XLSX) or other spreadsheet formats like LibreOffice Calc (ODS) |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
__END__ |