Calculation not working after save file phpspreadseet - phpspreadsheet

Strange...I only replace some value in a template xlsx with setCellValue(), I save the file and when I open it in Excel 2013 or Libre Office calc, the calculation are not done.. But it's ok in Excel 365...
I must use calculation without condition in Libre Office to get the good result...
Is there a way to tell phpspreadsheet to force calculation of the whole spreadsheet before saving it ?
Thank's
Guen

You should use the calculation engine.

I found the solution this night... It is beacause I put some null and empty values in some cell and formula MIN() doesn't like this !
It's OK now !

Related

Export specific numbers from Sheets

So i have this column of numbers and i wish to extract only the numbers before the "HE" text for example, this is what i need, and i don't really know how to achieve this.
Maybe there is a way to use a formula or command to do this, i've been trying to use power tools add-on but to no avail i did not get it.
Maybe for clarification in each cell there are 2 lines, using alt+enter.
REGEXEXTRACT() is suitable in this case.
=REGEXEXTRACT(A1,"(.+) HE")
Few good tips here about REGEXEXTRACT().
For array approach use below formula-
=ArrayFormula(IF(A1:A="","",REGEXEXTRACT(A1:A,"(.+) HE")))

google sheets turnning html to plain text

I've got some short html lists where I wont the tags to be removed.
Basiclly I've tried replace any thing in tags <> with nothing.
I've been using REGEXREPLACE and REGEXEXTRACT using the following regular expression: <.+>(.+)</.+> to try and get all that is between but it dosn't work.
the full formula is ​=join("",REGEXEXTRACT(S74,REGEXREPLACE(S74,"<.+>[(.+)]{2,9}</.+>","($1)"))​)​
​and the html looks like this:
PRODUCT INFO Honey wear me long sleeves Press closure Item care: Machine Washable
I've managed to solve it so if anyone comes accrose here's what I did (simpler than I thought)
=REGEXREPLACE(S74,"(<.+>)","")
Hope I helped someone at some time :-)

=LEN Function in Google Sheet not working corretly

I have a column with lots of rows containing text. I want to highlight cells with over an x-amount of characters, but how? The code I'm using in combination with 'Conditional Formatting' is not working all the time. Sometimes it highlights text over the x amount and sometimes it doesn't, so there is something I'm doing wrong here. The x-amount in the example below is: 300.
you may also need to lock it like:
=LEN(E$1:E$170)>300
Silly me... I found the answer myself. I need to put in the same range in the formula as well. Formula with the range E1:E170 needs to be: =LEN(E1:E170)>300

SUMIFS corrupting spreadsheets with PHPSpreadsheet

I am using PHPSpreadsheet and am reading in a spreadsheet with the following (working correctly) formula. I'm using Libre Office to generate my spreadsheet.
=SUMIFS($My_sheet.C:C,$My_sheet.B:B,">"&$'Home page'.$I$12,$My_sheet.B:B,"<"&$'Home page'.$I$13)
For some reason when I remove the offending rows my sheet reads/writes perfectly fine but with them I get corrupted files and it throws unreadable files.
I'm not setting the value - this is already in the spreadsheet I'm reading.
I hope this will help someone. I was looking for PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional::SUMIFS() as your call.
For the example given simply wrap each , separated section in quotes and pass them to this function. So the answer would be:
use PhpOffice\PhpSpreadsheet\Calculation\Statistical\Conditional as StatCond;
StatCond::SUMIFS('$My_sheet.C:C','$My_sheet.B:B','">"&$\'Home page\'.$I$12','My_sheet.B:B','"<"&$\'Home page\'.$I$13')

Filter and logical operators

EZ stuff but after an hour.. =filter(May15!A:S , May15!E:E="Authorization") is yielding a rich populated sheet. However I can't get OR working! Despite it working elsewhere in the sheet. I'd like other possibilities via the same filter. I tried several including the OR this way
=filter(May15!A:S , OR(May15!E:E="Authorization" , May15!E:E="bigwhale", May15!E:E="hi"))
.. to no avail. Any help appreciated. Also, I read somewhere the OR could be accessed using a "+" and that sounded like a neat method.. Thanks!
One possible way is to use RegEx:
=filter(H:H , REGEXMATCH(E:E,JOIN("|",A1:A3)))
put in A1:A3:
Authorization
bigwhale
hi
This trick is useful when you need to add conditions, just paste one more value in cell A4 and use range A1:A4
Another way is to use plus sign:
=FILTER(H:H,(E:E="Authorization")+(E:E="bigwhale")+(E:E="hi"))

Resources