Hi All,
Up until now, I have been importing data from Excel spreadsheets into MySQL
by exporting them to either .csv files, or tab-delimited .txt files, then
using PHP scripts to insert each row. This works fine, but just adds
another step (open xls, save as csv, then import into MySQL). I am
wondering, has there been any work done on handling xls files, natively, in
PHP? The files I work with are very simple; just rows of data divided into
columns. No cells are calculated based on the value of other cells. It is
all text fields, with one field that holds a date value (not sure if Excel
stores that as text or some sort of timestamp?).
I am well aware of all the tools you can use to convert .xls to something
else (e.g., OpenOffice), but I would like to do it *natively* in PHP, or at
least using a program that I can kick off from within PHP. That way I can
upload an .xls file, and let my scripts worry about converting it to
something easily inserted in MySQL.
Any thoughts?
Sincerely,
-Josh
Up until now, I have been importing data from Excel spreadsheets into MySQL
by exporting them to either .csv files, or tab-delimited .txt files, then
using PHP scripts to insert each row. This works fine, but just adds
another step (open xls, save as csv, then import into MySQL). I am
wondering, has there been any work done on handling xls files, natively, in
PHP? The files I work with are very simple; just rows of data divided into
columns. No cells are calculated based on the value of other cells. It is
all text fields, with one field that holds a date value (not sure if Excel
stores that as text or some sort of timestamp?).
I am well aware of all the tools you can use to convert .xls to something
else (e.g., OpenOffice), but I would like to do it *natively* in PHP, or at
least using a program that I can kick off from within PHP. That way I can
upload an .xls file, and let my scripts worry about converting it to
something easily inserted in MySQL.
Any thoughts?
Sincerely,
-Josh
Comment