summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index cec1c8c..615835e 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -255,8 +255,12 @@ sub _parse_sheet {
for my $cell ( $row_elt->children('c') ){
my ($row, $col) = $self->_cell_to_row_col($cell->att('r'));
- $sheet->{MaxRow} = $row;
- $sheet->{MaxCol} = $col;
+ if ($sheet->{MaxRow} < $row) {
+ $sheet->{MaxRow} = $row;
+ }
+ if ($sheet->{MaxCol} < $col) {
+ $sheet->{MaxCol} = $col;
+ }
my $type = $cell->att('t') || 'n';
my $val_xml;
if ($type ne 'inlineStr') {