Skip to content

Releases: aVadim483/fast-excel-helper

v1.4.0

Choose a tag to compare

@aVadim483 aVadim483 released this 16 Aug 14:59

Added

  • isAddress() and isRange() check that an address exists: rangeArray() parses a syntax and says nothing about the borders of a sheet, these two do
  • escapeString() 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 and false
  • rgbToHsl() did not accept AARRGGBB, while xlsx keeps colors in ARGB, and it produced warnings on an unparseable color
  • shiftAddress() built a broken address such as '-4' when a cell was shifted out of a sheet, addToRange() did the same for a relative range
  • addToRange($cell, $range, true) returned an array where range, range_abs and *_cell_abs described the range before it was extended, while max_cell described it after
  • colNumber() returned the number of the real column XFD for a column out of a sheet: 'XFE' and 'ZZZ' gave 16384
  • correctColor($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 TypeError in A1toRC(), RCtoA1(), shiftAddress(), shiftAddressRC(), addToRange() and inRange(), 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.

v1.3.0

Choose a tag to compare

@aVadim483 aVadim483 released this 01 Jun 13:57
escapeString/unescapeString

v1.2.3

Choose a tag to compare

@aVadim483 aVadim483 released this 06 Feb 11:58
fix: for php 8.4

v1.2.2

Choose a tag to compare

@aVadim483 aVadim483 released this 31 Oct 17:50
aed67aa
Merge pull request #3 from brainfoolong/php-8.4-fixes

fixed php 8.4 warning

v1.2.1

Choose a tag to compare

@aVadim483 aVadim483 released this 06 Sep 20:38
fix: rgbToHsl(), hslToRgb()

v1.2.0

Choose a tag to compare

@aVadim483 aVadim483 released this 15 May 18:15
upd: A1toRC(); RCtoA1(); shiftAddress(); shiftAddressRC(); rangeRelOf…

v1.1.1

Choose a tag to compare

@aVadim483 aVadim483 released this 11 Apr 18:17
A1toRC(); RCtoA1(); shiftAddress(); shiftAddressRC();

v1.1.0

Choose a tag to compare

@aVadim483 aVadim483 released this 10 Apr 18:58
A1toRC(); RCtoA1(); shiftAddress(); shiftAddressRC();

v1.0.6

Choose a tag to compare

@aVadim483 aVadim483 released this 09 Apr 19:46
upd addToRange()

v1.0.5

Choose a tag to compare

@aVadim483 aVadim483 released this 04 Nov 10:16
add addToRange()