View Full Version : Excel Data to MySQL
boeing747fp
04-05-2005, 01:10 AM
is there any way in ASP (im completely new to it) that i can take Data out of an excel file and "ship" it over to a MySQL database for use with PHP/MySQL on a Linux server?
I have IIS from WinXP Pro on my local PC and MySQL so i have the software i need... just need a sample code to work with. thanks
Tangerine Dream
04-05-2005, 03:10 AM
Hi, you can load data into MySQL database directly using CSV file (check 13.1.5. LOAD DATA INFILE Syntax (http://dev.mysql.com/doc/mysql/en/load-data.html) and 8.10. The mysqlimport Data Import Program (http://dev.mysql.com/doc/mysql/en/mysqlimport.html)). If you need some additional data processing in PHP, you can load CSV data into PHP array using fgetcsv (http://www.php.net/manual/en/function.fgetcsv.php) function and then store it into MySQL database.
The basic idea of saving Excel file as CSV is something like this (http://forums.aspfree.com/archive/t-20075/Please-help-Trying-to-open-a-CSV-file-and-save-it-as-Excel)
boeing747fp
04-05-2005, 10:42 PM
sweet... worked great!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.