Releases: aVadim483/fast-excel-helper
Releases · aVadim483/fast-excel-helper
Release list
v1.4.0
Added
isAddress()andisRange()check that an address exists:rangeArray()parses a syntax and says nothing about the borders of a sheet, these two doescapeString()encodes control characters with its second argument, so a text becomes a complete ST_Xstring. CR is encoded, TAB and LF are left as they are- PHP 8.5 is supported officially, the tests run on PHP 7.4, 8.0, 8.1, 8.2, 8.3, 8.4 and 8.5 (ubuntu and windows)
Fixed
colLetterRange()returned an empty array for an address containing a zero digit:'B10:E20'and'10:30'inRange()did not accept a single cell as a range:inRange('B2', 'B2')gave a warning andfalsergbToHsl()did not acceptAARRGGBB, while xlsx keeps colors in ARGB, and it produced warnings on an unparseable colorshiftAddress()built a broken address such as'-4'when a cell was shifted out of a sheet,addToRange()did the same for a relative rangeaddToRange($cell, $range, true)returned an array whererange,range_absand*_cell_absdescribed the range before it was extended, whilemax_celldescribed it aftercolNumber()returned the number of the real columnXFDfor a column out of a sheet:'XFE'and'ZZZ'gave16384correctColor($color, 0)returned a neighbour color instead of the given one, 6 of 12 checked colors were shifted- an input that cannot be parsed produced a warning or a
TypeErrorinA1toRC(),RCtoA1(),shiftAddress(),shiftAddressRC(),addToRange()andinRange(), a neutral result is returned now - the cache of
colNumber()grew without a limit, taking about 6 MB per 200000 calls while reading a sheet cell by cell
Changed
Worth a look while upgrading, these results are different now:
| Call | Before | Now |
|---|---|---|
colNumber('XFE') |
16384 |
-1 |
inRange('B2:Z99', 'B2:C3') |
true |
false, a range must fit entirely |
addToRange('junk', 'B2:D4') |
TypeError |
'' |
correctColor('#FFC000', -0.249977111117893) |
'#bf8f00' |
'#bf9000' |
rgbToHsl(...)['h'] |
int degrees |
float degrees |
rowNumber() |
?int |
int, it never returned null |
The palette of Excel cannot be reproduced exactly by any documented algorithm: the base of 240 and of 255, quantized HLS and a literal port of the integer Win32 RGBToHLS were compared on 14 colors of the Office theme, the best result is 9 of 14 and every miss is one unit in a channel. A color kept by a zero tint is taken as the criterion instead.