in reply to Re: Xls reader
in thread Xls reader
$Sheet2->UsedRange->Rows
Unfortunately I don't think that works, since Rows still returns an object, and in numeric context returns the memory address. Also, AFAIK, if the sheet has empty rows and columns at the beginning, the UsedRange can begin somewhere other than A1 - what I've been using is something like this:
my $UsedRows = 0+$Sheet->UsedRange->{Rows}->{Count}; my $FirstRow = 0+$Sheet->UsedRange->Rows(1)->{Row}; my $LastRow = $FirstRow + $UsedRows - 1; my $UsedCols = 0+$Sheet->UsedRange->{Columns}->{Count}; my $FirstCol = 0+$Sheet->UsedRange->Columns(1)->{Column}; my $LastCol = $FirstCol + $UsedCols - 1;
|
|---|