I one of my site, the students mark list is available in Excel file.
The site administrator will upload the Excel file in to Web Server and need to covert the data in to MySQL table through PHP .
Please help me
(php 5.2.6/MySQL4.1.22/Linux)
Thanking You
phpmash
Excel to Mysql conversion through PHP
Moderator: General Moderators
Excel to Mysql conversion through PHP
Last edited by phpmash on Tue Aug 19, 2008 8:09 am, edited 1 time in total.
Re: Excel to Mysql conversion through PHP
You are hilarious.phpmash wrote: Please provide the code for it .
Re: Excel to Mysql conversion through PHP
are you serious dude? nobody here is going to do this for you. Here is a shameless plug...
PHP CSV Utils
This library can read excel-formatted csv files, but not .xls files or w/e it is. So you'd have to export it to csv. It'd be something like this:
PHP CSV Utils
This library can read excel-formatted csv files, but not .xls files or w/e it is. So you'd have to export it to csv. It'd be something like this:
Code: Select all
$reader = new Csv_Reader('./your-csv-file.csv', new Csv_Dialect_Excel);
foreach ($reader as $row) {
// insert into database
}