1Spreadsheet::ParseExcelU:s:eSrimCpolnet(r3i)buted Perl DSopcruemaednsthaeteito:n:ParseExcel::Simple(3)
2
3
4

NAME

6       Spreadsheet::ParseExcel::Simple - A simple interface to Excel data
7

SYNOPSIS

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

DESCRIPTION

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 Spreadsheet::Parse‐
23       Excel directly.
24

BOOK METHODS

26       read
27
28         my $xls = Spreadsheet::ParseExcel::Simple->read('spreadsheet.xls');
29
30       This opens the spreadsheet specified for you. Returns undef if we can‐
31       not read the book.
32
33       sheets
34
35         @sheets = $xls->sheets;
36
37       Each spreadsheet can contain one or more worksheets. This fetches them
38       all back. You can then iterate over them, or jump straight to the one
39       you wish to play with.
40
41       book
42
43               my $book = $xls->book;
44
45       The Spreadsheet::ParseExcel object we are working with. You can use
46       this if you need to manipulate it in ways that this interface doesn't
47       allow.
48

SHEET METHODS

50       These methods can be called on each sheet returned from $xls->sheets:
51
52       has_data
53
54         if ($sheet->has_data) { ... }
55
56       This lets us know if there are more rows in this sheet that we haven't
57       read yet. This allows us to differentiate between an empty row, and the
58       end of the sheet.
59
60       next_row
61
62         my @data = $sheet->next_row;
63
64       Fetch the next row of data back.
65
66       sheet
67
68               my $obj = $sheet->sheet;
69
70       The underlying Spreadsheet::ParseExcel object for the worksheet. You
71       can use this if you need to manipulate it in ways that this interface
72       doesn't allow (e.g. asking it for the sheet's name).
73

AUTHOR

75       Tony Bowden
76

BUGS and QUERIES

78       Please direct all correspondence regarding this module to:
79         bug-Spreadsheet-ParseExcel-Simple@rt.cpan.org
80
82         Copyright (C) 2001-2005 Tony Bowden.
83
84         This program is free software; you can redistribute it and/or modify it under
85         the terms of the GNU General Public License; either version 2 of the License,
86         or (at your option) any later version.
87
88         This program is distributed in the hope that it will be useful, but WITHOUT
89         ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
90         FOR A PARTICULAR PURPOSE.
91

SEE ALSO

93       Spreadsheet::ParseExcel.
94
95
96
97perl v5.8.8                       2006-11-05Spreadsheet::ParseExcel::Simple(3)
Impressum