I need to import data from spreadsheets into a database. Initially, I used phpExcel to export each worksheet as a csv file, but wherever there was a cell containing an index - match function, phpExcel could not retrieve that cell value.
=INDEX(Sheet1!$E$2:$E$100,MATCH(TRUE,EXACT(B16,Sheet1!$A$2:$A$100),0))
I then decided to export the data directly from the spreadsheet into the database using phpExcel's toArray(null,true,true,true) to load the worksheet into an array. The second parameter ($calculateFormulas) is true, but phpExcel still cannot retrieve the cell value for any cell containing an index - match function.
I read in one post to use $objReader->setReadDataOnly(true) with caution - I gave it a go, but still no luck.
One solution is to open the spreadsheet, copy each worksheet and paste special as values, but I thought that the $calculateFormulas in toArray() would do that. The solution is not very appealing as I have about 50 spreadsheets each containing 5 worksheets, and they will be coming in on a regular basis :(
Any suggestions gratefully received.