summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Spreadsheet/ParseXLSX.pm2
-rw-r--r--t/bug-11.t15
-rw-r--r--t/data/bug-11.xlsxbin0 -> 4628 bytes
3 files changed, 16 insertions, 1 deletions
diff --git a/lib/Spreadsheet/ParseXLSX.pm b/lib/Spreadsheet/ParseXLSX.pm
index 0dca08a..e202ccb 100644
--- a/lib/Spreadsheet/ParseXLSX.pm
+++ b/lib/Spreadsheet/ParseXLSX.pm
@@ -254,7 +254,7 @@ sub _parse_shared_strings {
my $node = $_;
# XXX this discards information about formatting within cells
# not sure how to represent that
- { Text => join('', map { $_->text } $node->find_nodes('t')) }
+ { Text => join('', map { $_->text } $node->find_nodes('.//t')) }
} $strings->find_nodes('//si')
];
}
diff --git a/t/bug-11.t b/t/bug-11.t
new file mode 100644
index 0000000..0ab526b
--- /dev/null
+++ b/t/bug-11.t
@@ -0,0 +1,15 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+use Spreadsheet::ParseXLSX;
+
+my $wb = Spreadsheet::ParseXLSX->new->parse('t/data/bug-11.xlsx');
+is($wb->worksheet_count, 1);
+
+my $ws = $wb->worksheet(0);
+is($ws->get_cell(0, 0)->value, "foobarbaz");
+is($ws->get_cell(0, 1)->value, "quux");
+
+done_testing;
diff --git a/t/data/bug-11.xlsx b/t/data/bug-11.xlsx
new file mode 100644
index 0000000..6f9fd67
--- /dev/null
+++ b/t/data/bug-11.xlsx
Binary files differ