summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-04 17:13:23 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-04 17:13:23 -0500
commitcefda390eec0084d973c00e491c41e440c3c01c9 (patch)
tree2495a7d7407c917ec9e0c83f17de2a23b9fd5450
parent136ab924a0fac8776544841a5ac741058ae7e26f (diff)
downloadspreadsheet-parsexlsx-cefda390eec0084d973c00e491c41e440c3c01c9.tar.gz
spreadsheet-parsexlsx-cefda390eec0084d973c00e491c41e440c3c01c9.zip
nope, this is what i actually want
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 49dc088..2ede920 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -105,14 +105,18 @@ 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')->text;
+ my $val = $cell->first_child('v')
+ ? $cell->first_child('v')->text
+ : undef;
my $type = $cell->att('t') || 'n';
my $long_type;
- if ($type eq 's') {
+ if (!defined($val)) {
+ $long_type = 'Text';
+ $val = '';
+ }
+ elsif ($type eq 's') {
$long_type = 'Text';
$val = $sheet->{_Book}{PkgStr}[$val]{Text};
}