diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-06-04 16:51:03 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-06-04 16:51:03 -0500 |
commit | 6ccfcc9ed2e000e48dda8b6e29f295b5ee8e9c30 (patch) | |
tree | 043684477b7c4fb8061ff262b22393de91c4c659 /lib | |
parent | fc0fbc19543a76e4cf2613b019845d7b7bad2465 (diff) | |
download | spreadsheet-parsexlsx-6ccfcc9ed2e000e48dda8b6e29f295b5ee8e9c30.tar.gz spreadsheet-parsexlsx-6ccfcc9ed2e000e48dda8b6e29f295b5ee8e9c30.zip |
just don't record cells without data at all
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Spreadsheet/ParseXLSX.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm index 5d941b6..4fb1d0f 100644 --- a/lib/Spreadsheet/ParseXLSX.pm +++ b/lib/Spreadsheet/ParseXLSX.pm @@ -105,11 +105,11 @@ sub _parse_sheet { $sheet->{MaxCol} = $cmax; for my $cell ($sheet_xml->find_nodes('//sheetData/row/c')) { + next unless $cell->first_child('v'); + my ($row, $col) = $self->_cell_to_row_col($cell->att('r')); - my $val = $cell->first_child('v') - ? $cell->first_child('v')->text - : undef; - my $type = $cell->att('t') || 'n'; + my $val = $cell->first_child('v')->text; + my $type = $cell->att('t'); my $long_type; if ($type eq 's') { |