开发者

How to Upload Excel File to Single MySQL Table? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 6 years ago.

开发者_Go百科 Improve this question

I've seen lots of examples of bulk uploading CSV files to MySQL. However, I have the need to utilize an Excel file, and don't want to trouble the user with saving as CSV. Can anyone provide links to PHP routines they use that will read large Excel files, match the column names to database table columns and upload large (>5k records) efficiently?

Thanks much!


You'd need to use something like PHPExcel to read/parse the Excel files. As for mapping columns to tables, that depends entirely on if the user actually bothers to put column headers into the spreadsheet. If they don't, then you'll just have to guess and it'll undoubtedly NOT work out nicely.

Allowing arbitarirly formatted spreadsheets anywhere near a database makes me cry...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜