1Spreadsheet::XLSX(3) User Contributed Perl Documentation Spreadsheet::XLSX(3)
2
3
4
6 Spreadsheet::XLSX - Perl extension for reading MS Excel 2007 files;
7
9 use Text::Iconv;
10 my $converter = Text::Iconv -> new ("utf-8", "windows-1251");
11
12 # Text::Iconv is not really required.
13 # This can be any object with the convert method. Or nothing.
14
15 use Spreadsheet::XLSX;
16
17 my $excel = Spreadsheet::XLSX -> new ('test.xlsx', $converter);
18
19 foreach my $sheet (@{$excel -> {Worksheet}}) {
20
21 printf("Sheet: %s\n", $sheet->{Name});
22
23 $sheet -> {MaxRow} ||= $sheet -> {MinRow};
24
25 foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) {
26
27 $sheet -> {MaxCol} ||= $sheet -> {MinCol};
28
29 foreach my $col ($sheet -> {MinCol} .. $sheet -> {MaxCol}) {
30
31 my $cell = $sheet -> {Cells} [$row] [$col];
32
33 if ($cell) {
34 printf("( %s , %s ) => %s\n", $row, $col, $cell -> {Val});
35 }
36
37 }
38
39 }
40
41 }
42
44 This module is a (quick and dirty) emulation of Spreadsheet::ParseExcel
45 for Excel 2007 (.xlsx) file format. It supports styles and many of
46 Excel's quirks, but not all. It populates the classes from
47 Spreadsheet::ParseExcel for interoperability; including Workbook,
48 Worksheet, and Cell.
49
51 Text::CSV_XS, Text::CSV_PP
52 http://search.cpan.org/~hmbrand/
53
54 A pure perl version is available on http://search.cpan.org/~makamaka/
55
56 Spreadsheet::ParseExcel
57 http://search.cpan.org/~kwitknr/
58
59 Spreadsheet::ReadSXC
60 http://search.cpan.org/~terhechte/
61
62 Spreadsheet::BasicRead
63 http://search.cpan.org/~gng/ for xlscat likewise functionality (Excel
64 only)
65
66 Spreadsheet::ConvertAA
67 http://search.cpan.org/~nkh/ for an alternative set of cell2cr () /
68 cr2cell () pair
69
70 Spreadsheet::Perl
71 http://search.cpan.org/~nkh/ offers a Pure Perl implementation of a
72 spreadsheet engine. Users that want this format to be supported in
73 Spreadsheet::Read are hereby motivated to offer patches. It's not
74 high on my todo-list.
75
76 xls2csv
77 http://search.cpan.org/~ken/ offers an alternative for my "xlscat
78 -c", in the xls2csv tool, but this tool focusses on character
79 encoding transparency, and requires some other modules.
80
81 Spreadsheet::Read
82 http://search.cpan.org/~hmbrand/ read the data from a spreadsheet
83 (interface module)
84
86 Dmitry Ovsyanko, <do@eludia.ru<gt>, http://eludia.ru/wiki/
87
88 Patches by:
89
90 Steve Simms
91 Joerg Meltzer
92 Loreyna Yeung
93 Rob Polocz
94 Gregor Herrmann
95 H.Merijn Brand
96 endacoe
97 Pat Mariani
98 Sergey Pushkin
99
101 Thanks to TrackVia Inc. (http://www.trackvia.com) for paying for Rob Polocz working time.
102
104 Copyright (C) 2008 by Dmitry Ovsyanko
105
106 This library is free software; you can redistribute it and/or modify it
107 under the same terms as Perl itself, either Perl version 5.8.8 or, at
108 your option, any later version of Perl 5 you may have available.
109
110
111
112perl v5.28.0 2015-10-31 Spreadsheet::XLSX(3)