cibien has asked for the wisdom of the Perl Monks concerning the following question:
can you help me? thanks#!/usr/bin/perl -w use strict; use Spreadsheet::ParseExcel; my $parser = Spreadsheet::ParseExcel->new( CellHandler => \&cell_handler, NotSetCell => 1 ); my $workbook = $parser->parse('file.xls'); sub cell_handler { my $workbook = $_[0]; my $sheet_index = $_[1]; my $row = $_[2]; my $col = $_[3]; my $cell = $_[4]; #### thise 'if' parse only the first sheet if ( $sheet_index > 1) { $workbook->ParseAbort(1); return; } } ### I think must add up something like this for(my $iSheet=0; $iSheet < $workbook->{SheetCount} ; $iSheet++) { my $oWkS = $workbook->{Worksheet}[$iSheet];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: parse only one sheet at time In Spreadsheet::ParseExcel
by Kenosis (Priest) on Jan 30, 2013 at 23:39 UTC | |
|
Re: parse only one sheet at time In Spreadsheet::ParseExcel
by Neighbour (Friar) on Jan 31, 2013 at 07:29 UTC | |
by Rahul6990 (Beadle) on Jan 31, 2013 at 07:36 UTC | |
by Neighbour (Friar) on Jan 31, 2013 at 08:50 UTC | |
by Kenosis (Priest) on Feb 01, 2013 at 00:57 UTC | |
by Kenosis (Priest) on Feb 01, 2013 at 01:03 UTC |