.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.29) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Spreadsheet::ParseExcel::Simple 3pm" .TH Spreadsheet::ParseExcel::Simple 3pm "2016-04-16" "perl v5.22.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Spreadsheet::ParseExcel::Simple \- A simple interface to Excel data .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 6 \& my $xls = Spreadsheet::ParseExcel::Simple\->read(\*(Aqspreadsheet.xls\*(Aq); \& foreach my $sheet ($xls\->sheets) { \& while ($sheet\->has_data) { \& my @data = $sheet\->next_row; \& } \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This provides an abstraction to the Spreadsheet::ParseExcel module for simple reading of values. .PP You simply loop over the sheets, and fetch rows to arrays. .PP For anything more complex, you probably want to use Spreadsheet::ParseExcel directly. .SH "BOOK METHODS" .IX Header "BOOK METHODS" .SS "read" .IX Subsection "read" .Vb 1 \& my $xls = Spreadsheet::ParseExcel::Simple\->read(\*(Aqspreadsheet.xls\*(Aq); .Ve .PP This opens the spreadsheet specified for you. Returns undef if we cannot read the book. .SS "sheets" .IX Subsection "sheets" .Vb 1 \& @sheets = $xls\->sheets; .Ve .PP Each spreadsheet can contain one or more worksheets. This fetches them all back. You can then iterate over them, or jump straight to the one you wish to play with. .SS "book" .IX Subsection "book" .Vb 1 \& my $book = $xls\->book; .Ve .PP The Spreadsheet::ParseExcel object we are working with. You can use this if you need to manipulate it in ways that this interface doesn't allow. .SH "SHEET METHODS" .IX Header "SHEET METHODS" These methods can be called on each sheet returned from \f(CW$xls\fR\->sheets: .SS "has_data" .IX Subsection "has_data" .Vb 1 \& if ($sheet\->has_data) { ... } .Ve .PP This lets us know if there are more rows in this sheet that we haven't read yet. This allows us to differentiate between an empty row, and the end of the sheet. .SS "next_row" .IX Subsection "next_row" .Vb 1 \& my @data = $sheet\->next_row; .Ve .PP Fetch the next row of data back. .SS "sheet" .IX Subsection "sheet" .Vb 1 \& my $obj = $sheet\->sheet; .Ve .PP The underlying Spreadsheet::ParseExcel object for the worksheet. You can use this if you need to manipulate it in ways that this interface doesn't allow (e.g. asking it for the sheet's name). .SH "AUTHOR" .IX Header "AUTHOR" Tony Bowden .SH "BUGS and QUERIES" .IX Header "BUGS and QUERIES" Please direct all correspondence regarding this module to: bug\-Spreadsheet\-ParseExcel\-Simple@rt.cpan.org .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" .Vb 1 \& Copyright (C) 2001\-2005 Tony Bowden. \& \& This program is free software; you can redistribute it and/or modify it under \& the terms of the GNU General Public License; either version 2 of the License, \& or (at your option) any later version. \& \& This program is distributed in the hope that it will be useful, but WITHOUT \& ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS \& FOR A PARTICULAR PURPOSE. .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Spreadsheet::ParseExcel.