1Spreadsheet::ParseExcelU:s:eSrimCpolnet(r3i)buted Perl DSopcruemaednsthaeteito:n:ParseExcel::Simple(3)
2
3
4
6 Spreadsheet::ParseExcel::Simple - A simple interface to Excel data
7
9 my $xls = Spreadsheet::ParseExcel::Simple->read('spreadsheet.xls');
10 foreach my $sheet ($xls->sheets) {
11 while ($sheet->has_data) {
12 my @data = $sheet->next_row;
13 }
14 }
15
17 This provides an abstraction to the Spreadsheet::ParseExcel module for
18 simple reading of values.
19
20 You simply loop over the sheets, and fetch rows to arrays.
21
22 For anything more complex, you probably want to use
23 Spreadsheet::ParseExcel directly.
24
26 read
27 my $xls = Spreadsheet::ParseExcel::Simple->read('spreadsheet.xls');
28
29 This opens the spreadsheet specified for you. Returns undef if we
30 cannot read the book.
31
32 sheets
33 @sheets = $xls->sheets;
34
35 Each spreadsheet can contain one or more worksheets. This fetches them
36 all back. You can then iterate over them, or jump straight to the one
37 you wish to play with.
38
39 book
40 my $book = $xls->book;
41
42 The Spreadsheet::ParseExcel object we are working with. You can use
43 this if you need to manipulate it in ways that this interface doesn't
44 allow.
45
47 These methods can be called on each sheet returned from $xls->sheets:
48
49 has_data
50 if ($sheet->has_data) { ... }
51
52 This lets us know if there are more rows in this sheet that we haven't
53 read yet. This allows us to differentiate between an empty row, and the
54 end of the sheet.
55
56 next_row
57 my @data = $sheet->next_row;
58
59 Fetch the next row of data back.
60
61 sheet
62 my $obj = $sheet->sheet;
63
64 The underlying Spreadsheet::ParseExcel object for the worksheet. You
65 can use this if you need to manipulate it in ways that this interface
66 doesn't allow (e.g. asking it for the sheet's name).
67
69 Tony Bowden
70
72 Please direct all correspondence regarding this module to:
73 bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org
74
76 Copyright (C) 2001-2005 Tony Bowden.
77
78 This program is free software; you can redistribute it and/or modify it under
79 the terms of the GNU General Public License; either version 2 of the License,
80 or (at your option) any later version.
81
82 This program is distributed in the hope that it will be useful, but WITHOUT
83 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
84 FOR A PARTICULAR PURPOSE.
85
87 Spreadsheet::ParseExcel.
88
89
90
91perl v5.32.1 2021-01-27Spreadsheet::ParseExcel::Simple(3)