Subject: | chartsheets not handled correctly |
If the xlsx file being processed has a chartsheet as the first sheet,
this causes Spreadsheet::XLSX to map the wrong contents to each
worksheet object. This seems to be because it presumes that every entry
in the workbook.xml will contain a corresponding sheet in the file and
that it can be referenced by using the 'r:id', this doesn't appear to be
the case. However the sheetID reference in each element does seem to
contain the correct reference. Therefore I changed the code as follows:
line 108 - 111 of XLSX.pm
remove:
elsif ($k eq 'r:id') {
($sheet -> {Id}) = $v =~ m{rId(\d+)};
add:
elsif ($k eq 'sheetId')
{
($sheet -> {Id}) = $v;
};
This then results in the correct worksheet file being set up for the
correct worksheet object.