iliaal/php_excel

updateNamedRanges changes since LibXL 3.8.8

Jan-E opened this issue · 2 comments

Jan-E commented

From the changelog:

Version 3.8.8 (2019-11-28)

  • restored the updateNamedRanges parameter for Sheet::insertCol/insertRow/removeCol/removeRow C++ methods and added xlSheetInsertColAndKeepRanges / xlSheetInsertRowAndKeepRanges / xlSheetRemoveColAndKeepRanges / xlSheetRemoveRowAndKeepRanges C functions

In the C functions there is no third parameter anymore. But in the C++ functions we can see that the default for updateNamedRanges = true. The documentation says the same:

bool insertRow(int rowFirst, int rowLast, bool updateNamedRanges = true)
bool insertCol(int colFirst, int colLast, bool updateNamedRanges = true)
bool removeRow(int rowFirst, int rowLast, bool updateNamedRanges = true)
bool removeCol(int colFirst, int colLast, bool updateNamedRanges = true)

This should be reflected in the extension. Something like

  1. Allow three parameters in Sheet::insertCol etc
  2. If the third = true call xlSheetInsertColAndKeepRanges etc
  3. If the third = false or 0 call xlSheetInsertCol etc (?)
  4. If the third argument is omitted, use the default (true) ans call xlSheetInsertColAndKeepRanges etc
Jan-E commented

This should be it: Jan-E@b0b1219

Jan-E commented

Propably it is the other way around:

  1. Allow three parameters in Sheet::insertCol etc
  2. If the third = true call xlSheetInsertCol etc
  3. If the third = false or 0 call xlSheetInsertColAndKeepRanges etc
  4. If the third argument is omitted, use the default (true) ans call xlSheetInsertCol etc

AndKeepRanges seems to be the opposite of updateNamedRanges, but the documentation is really thin.
New patch: Jan-E@da2fb82