Bug in column number encoding
Posted: Mon Mar 15, 2010 4:18 pm
I don’t know if this already has been reported and fixed. It’s possible that I’m using the obsolete version of XLSUtils4.pas, though I downloaded it rather recently.
I found that the encoding algorithm implemented in XLSUtils4.ColRowToRefStrEx12 works incorrectly for column numbers >675. Apparently this is due to ignoring 1 and 2 character codes. As a result number 676 is converted to “BAA” instead of “ZA”.
When I replace line
else if ACol < 676 then
with
else if ACol < 676+26 then
and insert operator
Dec(ACol,676+26);
immediately before
C := ACol div 676;
everything starts working normally.
Please let me know if the fix is available.
Thanks!
I found that the encoding algorithm implemented in XLSUtils4.ColRowToRefStrEx12 works incorrectly for column numbers >675. Apparently this is due to ignoring 1 and 2 character codes. As a result number 676 is converted to “BAA” instead of “ZA”.
When I replace line
else if ACol < 676 then
with
else if ACol < 676+26 then
and insert operator
Dec(ACol,676+26);
immediately before
C := ACol div 676;
everything starts working normally.
Please let me know if the fix is available.
Thanks!