Subject: | Issue with parsing spreadsheets exported by Excel::Writer::XLSX |
Date: | Sun, 17 Feb 2013 14:18:40 -0800 |
To: | bug-Spreadsheet-XLSX [...] rt.cpan.org |
From: | Gheorghe Chesler <nightmedia [...] gmail.com> |
In the Spreadsheet::XLSX there is a section where the contained value is
flagged as:
elsif (/^<v/) {
$flag = 1;
}
elsif (/^<\/v/) {
$flag = 0;
}
The row exported by Excel::Writer::XLSX contains the data as a string, and
looks like this:
<sheetData><row r="1"><c r="A1" s="1"
t="inlineStr"><is><t>Email</t></is></c></row>
Since the flag does not get set because there is no <v> tag, the values are
not seen, and Spreadsheet::XLSX returns an empty data set.
I added after the lines above the following
elsif (/^<t\W/) {
$flag = 1;
}
elsif (/^<\/t>/) {
$flag = 0;
}
I extended a bit the regular expression to avoid matching other tags that
begin with t, as I do not know whether the <t> tag could also have params.
With these changes the Excel file is parsed correctly.
I am attaching the test file for reference.
yours,
Gheorghe
Message body not shown because it is not plain text.