Subject: | Re: [do-/eludia] Spreadsheet::XLSX column limitation (#24) |
Date: | Wed, 14 Dec 2016 08:02:23 +1000 |
To: | Mike Blackwell <bug-Spreadsheet-XLSX [...] rt.cpan.org> |
From: | Denby Angus <Denby.Angus [...] kisters.com.au> |
Hi Mike
I contacted Dmitry Ovsyanko and he led me to you.
We use this module all the time in custom scripts for our clients.
I have recently encountered a workbook with sheets containing more than
702 columns (i.e. beyond column ZZ); the module doesn't read beyond column
ZZ.
I have located the issue in your module and made a local hack but
obviously I'd prefer that the source be updated so everyone can benefit.
The change requires the replacement of line 99
if (/^\<c\s*.*?\s*r=\"([A-Z])([A-Z]?)(\d+)\"/) {
with
if (/^\<c\s*.*?\s*r=\"([A-Z])([A-Z]*)(\d+)\"/) {
and the replacement of sub __decode_cell_name:
sub __decode_cell_name {
my ($letter1, $letter2, $digits) = @_;
my $col = ord($letter1) - 65;
if ($letter2) {
$col++;
$col *= 26;
$col += (ord($letter2) - 65);
}
my $row = $digits - 1;
return ($row, $col);
}
with
sub __decode_cell_name {
my ($letter1, $letter2, $digits) = @_;
my $col = ord($letter1) - 65;
while (my $c = substr($letter2, 0, 1, '')) {
$col++;
$col *= 26;
$col += (ord ($c) - 65);
}
my $row = $digits - 1;
return ($row, $col);
}
Would you be willing to implement this update (or similar code) to fix
this limitation?
Thanks
Denby
--------------------------------------------------------------------------------------------------------------------------------------------
Denby Angus - KISTERS Pty. Ltd. - Unit 4A, 24 Mahony Court, P.O.Box 3476 - 2611 Weston Creek - Australia
Phone: +61 2 6154 5213 | Fax: +61 2 6288 9061 | E-Mail: Denby.Angus@kisters.com.au | WWW: www.kisters.com.au
--------------------------------------------------------------------------------------------------------------------------------------------
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
From: do- <notifications@github.com>
To: do-/eludia <eludia@noreply.github.com>
Cc: denbyangus <denby.angus@kisters.com.au>, Author
<author@noreply.github.com>
Date: 14/12/2016 03:46 AM
Subject: Re: [do-/eludia] Spreadsheet::XLSX column limitation (#24)
Sorry denbyangus, I've abandoned Spreadsheet::XLSX 8 years ago, and here
is not the place to post related fixes. If http://search.cpan.org/~mikeb/
don't answer, the project is well and sure dead. But please feel free to
fork the codebase and start yous one.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.