Edit
by Roddy - 9 years ago (2015-09-14)
Read excel file of min 43MB and export values to MySQL
| I have a huge Excel file that I should turn in MySQL tables.
The script should run on Linux and Windows.
Data can be exported as array, JSON, or MySQL tables, any of the three are perfect for me. |
Ask clarification
2 Recommendations
eiseXLSX: Read and write Excel spreadsheets in XLSX format
This class can read and write Excel spreadsheets in XLSX format.
It can read and parse an existing spreadsheet file in the Microsoft Excel 2007-2011-2013 format.
The class allows to modify workbook contents by changing cell data and colors, insert or clone rows, clone or remove sheets.
The changed spreadsheet can be saved back to an Excel file and then served for download.
| by Larry Wakeman 160 - 9 years ago (2015-09-21) Comment
Does a good job reading Excel 2007+ spreadsheets. |
- 1 Comment
1.
by Manuel Lemos - 9 years ago (2015-09-23) Reply
It can read Excel files but that is half of the requested jobs.
Hopefully it can work return cell data so another package can insert it in the MySQL database.
Quick CSV import: Import CSV data into a MySQL database table
This class can be used to import data from CSV (Comma Separated Value) files into a given MySQL database table.
It parses a given CSV file to extract the field names. Then it imports the data into the MySQL database using a LOAD DATA INFILE query to import the data in a much faster way than using SQL INSERT queries.
If necessary, the class can also create the database table using the CSV file headers to retrieve the table field names.
UPDATE: From now you can set the encoding table which is used to parse the file.
| by Manuel Lemos 26695 - 9 years ago (2015-09-21) Comment
I do not think there is exactly a class that exports Excel files in the native format to MySQL.
But if you can export Excel tables to the CSV format, you can use this class to import them into MySQL. |
- 2 Comments
3.
by Chi H. - 9 years ago (2015-09-25) in reply to comment 2 by Manuel Lemos Reply
Yes, you can phpmyadmin. It has csv import function.
4.
by Zhao - 9 years ago (2015-10-05) in reply to comment 2 by Manuel Lemos Reply
Yes, CSV is a best choice for you.