[thelist] importing .xls files in MySQL
sbeam
sbeam at onsetcorps.net
Thu Jul 24 17:05:08 CDT 2008
On Thursday 24 July 2008 15:41, Jeremy Weiss wrote:
> I've got a client that's wanting to be able to upload .xls files and have a
> PHP script parse the file and insert it's content into a MySQL database.
> Having her convert the files to another format isn't an option.
1) If you are on Windows you can use the native PHP COM extension and open the
excel application then run all sorts of MS API calls against it. Tedious and
error-prone and you are running PHP on unix anyway right??
http://www.php.net/manual/en/class.com.php
2) There is a free offering here:
http://sourceforge.net/projects/phpexcelreader/
but it was too buggy/out of date for my purposes.
3) We ended up using ExcelExplorer which is a non-free PHP class (not
encrypted). It works great with only a few minor glitches. If your client is
willing to pay $99 to avoid using the "Save As..." dialog, then you should be
OK:
http://www.eephp.com/ [no affiliation]
we used it to build a custom app for banks/mortgage brokers who live and die
by their Excel workbooks. They upload dozens of them daily to the app which
grinds them up and spits out some financial cat chow. I don't understand it
but they seem to like it.
you might find some other options in the darker caverns of Google. Good luck -
http://www.google.com/search?q=read+excel+from+php
Sam
More information about the thelist
mailing list