> How do one determine the amount of lines within a spreadsheet
> Ronald
Since you posted in both the unix and win32 lists, I assume you'd like a
cross-platform answer. Here's one:
use Spreadsheet::ParseExcel;
my $oBook = Spreadsheet::ParseExcel::Workbook->Parse('spreadsheet.xls');
my $rowCount;
foreach my $oWkS (@{$oBook->{Worksheet}}) {
$rowCount += $oWkS->{MaxRow};
}
print "Rows= ", $rowCount;
Here's another:
use Spreadsheet::ParseExcel::Simple;
my $xls = Spreadsheet::ParseExcel::Simple->read('spreadsheet.xls');
foreach my $sheet ($xls->sheets) {
while ($sheet->has_data) {
my @data = $sheet->next_row;
}
}
print "Rows= ", scalar @data;
--
Mark Thomas [EMAIL PROTECTED]
Internet Systems Architect User Technology Associates, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;y;y; ;;print;;
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs