RE: [PHP] Text from Excel csv file loaded into MySQL table
| From: | KermodeBear | Date: | Mon, 16 Oct 2006 16:03:08 +0000 |
| Subject: | RE: [PHP] Text from Excel csv file loaded into MySQL table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243188@lists.php.net to get a copy of this message | ||
Hello,
> > Can anyone point me to a really good end to end tutorial on
> extracting
> > text from an Excel csv file and uploading it into MySQL via a PHP
> > script?
>
> Actually, depending on the integrity of the data and the
> consistency of the format in the CSV file, you can do this
> simply and easily using just MySQL. Take a look at the
> following pages:
>
> MySQL >= 5.0
> http://dev.mysql.com/doc/refman/5.0/en/load-data.html
>
> MySQL < 5.0
> http://dev.mysql.com/doc/refman/4.1/en/load-data.html
If the above is not an option for you, then use this:
http://us2.php.net/fgetcsv
Works like a charm.
-K. Bear