1Spreadsheet::XLSX(3)  User Contributed Perl Documentation Spreadsheet::XLSX(3)
2
3
4

NAME

6       Spreadsheet::XLSX - Perl extension for reading MS Excel 2007 files;
7

SYNOPSIS

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

DESCRIPTION

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

SEE ALSO

51       Spreadsheet::ParseXLSX
52         This module has some serious issues with the way it uses regexs for
53         parsing the XML.  I would strongly encourage switching to
54         Spreadsheet::ParseXLSX which takes a more reliable approach.
55
56       Text::CSV_XS, Text::CSV_PP
57       Spreadsheet::ParseExcel
58       Spreadsheet::ReadSXC
59       Spreadsheet::BasicRead
60         for xlscat likewise functionality (Excel only)
61
62       Spreadsheet::ConvertAA
63         for an alternative set of cell2cr() / cr2cell() pair
64
65       Spreadsheet::Perl
66         offers a Pure Perl implementation of a spreadsheet engine. Users that
67         want this format to be supported in Spreadsheet::Read are hereby
68         motivated to offer patches. It's not high on my todo-list.
69
70       xls2csv
71         <https://metacpan.org/release/KEN/xls2csv-1.07> offers an alternative
72         for my "xlscat -c", in the xls2csv tool, but this tool focusses on
73         character encoding transparency, and requires some other modules.
74
75       Spreadsheet::Read
76         read the data from a spreadsheet (interface module)
77

AUTHOR

79       Dmitry Ovsyanko, <do@eludia.ru>, http://eludia.ru/wiki/
80
81       Patches by:
82
83               Steve Simms
84               Joerg Meltzer
85               Loreyna Yeung
86               Rob Polocz
87               Gregor Herrmann
88               H.Merijn Brand
89               endacoe
90               Pat Mariani
91               Sergey Pushkin
92

ACKNOWLEDGEMENTS

94               Thanks to TrackVia Inc. (http://www.trackvia.com) for paying for Rob Polocz working time.
95
97       Copyright (C) 2008 by Dmitry Ovsyanko
98
99       This library is free software; you can redistribute it and/or modify it
100       under the same terms as Perl itself, either Perl version 5.8.8 or, at
101       your option, any later version of Perl 5 you may have available.
102
103
104
105perl v5.38.0                      2023-07-21              Spreadsheet::XLSX(3)
Impressum