0

Hello every one,

i want to make a programme that read data from .xls file. a sql table will create on the basis of top row of the xls file, and rest rows will treated as data and inserted into the table.

actually i am working for a office, their employees are making reports in xls file. all the files are different format. i want that my php programme read xls file and create a table in sql and insert data in it. top row of xls file is used to create table.

plz help me to do this.

thanks

Gajendra

3
Contributors
4
Replies
8
Views
4 Years
Discussion Span
Last Post by pritaeas
1

If you export your XLS as CSV, then MySQL can import it with LOAD DATA. Here's a thread about it.

Votes + Comments
same as i would do
0

To confirm it I really doubt there will be any way to import a xls into mysql - microsoft has xls files saved in an encrypted format that you need a program to translate - I would do what Pritaeas says and you can make the top row using the headers in the file etc.

0

wow i stand corrected, i just saw that phpexcel in the link - could well be possible with that but i've never used it. I'd switch to csv if possible it's a universally accepted format for data

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.