I have to code a PHP platform for importing an Excel file (quite heavy) to fill an SQL server database. To do so I used the library PHP-excel-reader (https://code.google.com/archive/p/php-excel-reader/downloads) to be able recover the value of specific cells (eg $ water = $ data-> val (13, 'A');) everything works fine except that PHP-excel-reader is only compatible with .xls not .xlsx, if I go directly convert my files in excel no problem. But so that the user does not have to do this operation every time I want automated converting .xls .xlsx has. I tried to use PHPExcel (http://phpexcel.codeplex.com/) but nothing works all the file converted by the libraries do not work on PHP-excel-reader. Would you have a solution? If there is no solution do you have knowledge of another library that allows like PHP to store the value of an Excel cell in a variable? I am desperate. Thank you in advance for your help. Sorry for my English I'm french x)
Asked
Active
Viewed 763 times
1 Answers
0
For those interested, I found a solution. It is used the SimpleXLSX library (http://www.spyrozone.net/hacking/2011/05/php-parse-and-retrieve-data-from-xlsx-files.jsp), it will return from to an .xlsx an array of values where it will be to recover each cell value. if you have a problem with date conversion check this ( https://www.ablebits.com/office-addins-blog/2015/07/01/excel-convert-time-decimal/)

Jonathan Moy
- 319
- 3
- 9