1
votes

I have a php script that have to parse an excel file with some date and time to import in my mysql database

Screen of the xlsx file : enter image description here

I'm using the PHPExcel library to read the file

  • When I get the cell value with getValue() method, it returns the formula =J4+"01:00:00" as showed in the excel formula field. Ok normal
  • When I use the the getCalculatedValue() method, it returns "#VALUE!". As excell / Libreoffice don't have any problem to calculate the formulas, I have no idea why the PHPExcel library is not able to calculate this quite simple formulas.

Do anyone had the same issue and know a trick to fix this issue ? Or do I realy have to tell users not use any formulas fort date fields type ?

1

1 Answers

0
votes

I found the answer from the PHPExcel support platform. The only way to manage this kind of formulase (date operation) is to replace my actual formulas by something like =J4+(1/24)

Source : PhpExcel support plateform