diff options
-rw-r--r-- | lib/Spreadsheet/ParseXLSX.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 410a45d..d96d275 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -214,9 +214,13 @@ sub _parse_sheet { ]; my ($selection) = $sheet_xml->find_nodes('//selection'); - my $cell = $selection->att('activeCell'); - - $sheet->{Selection} = [ $self->_cell_to_row_col($cell) ]; + if ($selection) { + my $cell = $selection->att('activeCell'); + $sheet->{Selection} = [ $self->_cell_to_row_col($cell) ]; + } + else { + $sheet->{Selection} = [ 0, 0 ]; + } } sub _parse_shared_strings { |