PHPReader to Database

Topics: Developer Forum
Jan 5, 2012 at 8:47 PM

I am developing an application where I would like to be able to read the data from an Excel file (xlsx) and then, using a PHP script grab that data and insert it into a database table. The documentation says that PHPExcel creates an in-memory spreadsheet, so it seems there should be a way to use a PHP script to grab that data and insert it into a database table. Is there anything already developed that can do that? Or can someone point me to how I could access the in-memory spreadsheet with PHP?

Jan 5, 2012 at 9:10 PM

Try looking at some of the examples in the /Tests directory. While none of them explicitly inserts data into a database, the 28iterator.php script in particular demonstrates how to loop through worksheets, rows and columns. Then it's only a short step to take that data and insert it into a database.

Jan 6, 2012 at 1:22 AM
Thanks for your response. After poking around some more, I found some examples of iterator scripts - also found the documentation data on it.

- David