How we wil convert from ms-Excel sheet to MySQL database using PHP
converting Excel to MySQL using PHP
Collapse
X
-
Tags: None
-
Simplest way is to export data from excel as TXT or CSV. Than use MySQL commandWhen the Excel file is XML, you can write a xml parser program that parses the xml and saves the results in your MySQL db. For free XML parsing classes see XML classes at phpclasses.org.Code:LOAD DATA INFILE 'path/file.txt' INTO TABLE your_table;
When you are looking for a conversion program, there are a lot of them around (try googling for excel to mysql), but they all charge some dollars for usage (starting at USD 25).
Ronald :cool: -
Is there any way of converting .xls files into mysql only using PHP? (then can get users to upload their excel files and automatically converting them)Originally posted by ronverdonkSimplest way is to export data from excel as TXT or CSV. Than use MySQL commandWhen the Excel file is XML, you can write a xml parser program that parses the xml and saves the results in your MySQL db. For free XML parsing classes see XML classes at phpclasses.org.Code:LOAD DATA INFILE 'path/file.txt' INTO TABLE your_table;
When you are looking for a conversion program, there are a lot of them around (try googling for excel to mysql), but they all charge some dollars for usage (starting at USD 25).
Ronald :cool:Comment
-
Have a look at this class ADODB XML and see if it fulfills your need. See the last paragraph in the quote.Ronald :cool:Originally posted by ADODB ClassThis class is meant to import and export data stored in SQL databases to XML files using the ADODB library.
It provides a function to export the data of SQL query result set to XML file.
It also provides another function that parses XML files that define the data of fields to be inserted as new rows of a table also specified in the XML files.Comment
Comment