Spreadsheet::ParseExcel::Stream - Simple interface to Excel data with no memory overhead
my $xls = Spreadsheet::ParseExcel::Stream->new($xls_file, \%options); while ( my $sheet = $xls->sheet() ) { while ( my $row = $sheet->row ) { my @data = @$row; } }
A simple iterative interface to Spreadsheet::ParseExcel, similar to Spreadsheet::ParseExcel::Simple, but does not parse the entire document to memory. Uses the hints provided in the Spreadsheet::ParseExcel docs to reduce memory usage, and returns the data row by row and sheet by sheet.
my $xls = Spreadsheet::ParseExcel::Stream->new($xls_file, \%options);
Opens the spreadsheet and returns an object to iterate through the data.
Accepts an optional hashref with the following keys:
If true, trims leading empty columns. Trims however many empty columns that the row with the minimum number of empty columns has. E.g. if row 1 has data in columns B, C, and D, and row 2 has data in C, D, and E, then row 1 will shift to A, B, and C, and row 2 will shift to B, C, and D.
Accepts a reference to a list of references to scalars. Calls bind_columns on the list.
Returns the sheet of the next cell of the spreadsheet.
Returns the next row of data from the current spreadsheet. The data is the formatted contents of each cell as returned by the $cell->value() method of Spreadsheet::ParseExcel.
If a true argument is passed in, returns the current row of data without advancing to the next row.
Returns the next row of data from the current spreadsheet as returned by the $cell->unformatted() method of Spreadsheet::ParseExcel.
If a true argument is passed in, returns the current row of data without advancing to the next row.
Returns the next row of cells from the current spreadsheet as Spreadsheet::ParseExcel cell objects.
If a true argument is passed in, returns the current row without advancing to the next row.
Returns the name of the next cell of the spreadsheet.
Accepts an array of references to scalars. Binds the output of the row, unformatted, and next_row methods to the list of scalars if the 'current row' argument to those methods is not true.
If output is bound, then a simple true value instead of a reference to an array is returned from those methods if there is a next row.
Unbinds any scalars bound with bind_columns().
Returns the worksheet containing the next cell of data as a Spreadsheet::ParseExcel object.
Douglas Wilson, <dougw@cpan.org<gt>
For spreadsheets created with Spreadsheet::WriteExcel without using $wb->compatibility_mode()
, this module will read rows of a spreadsheet out of order if the rows were written out of order, and the TrimEmpty option of this module will not work correctly.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.