Subject: | Parse error in workbook.xml.rels |
XLSX.pm @line 91:
/^Id="(.*?)".*?Target="(.*?)"/ or next;
Problem:
Attribute Id has to be the first one in the tag "Relationship".
Otherwise extraction of Attribute "Id" and "Target" will fail. Received
xlsx files with a different attribute order (Type, Target, Id) instead
of expected order (Id, <something>, Target).
Possible solution (replace line 91 and 93 with following code):
if(/Id="(.*?)"/)
{
my $rel_id=$1;
if(/Target="(.*?)"/)
{
my $rel_target=$1;
$rels {$rel_id} = $rel_target;
}
}
As I am a totally newbie in perl my code may not be very elegant. Please
feel free to change.