开发者

Import tool Excel CSV [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 last year.

Improve this question

I need an import tools for a web app. I've been looking around and found some, just not sure about their stability. I'm using the Zend Framework for part of the project and开发者_高级运维 was hoping I could find an import tool there, since I already have the framework, but couldn't see one...am I looking in the wrong place?

I would like the web users to be able to import csv, excel files into a mysql database. I'd like the tool to allow the users to select the columns of the spreadsheet/csv to match up to the database columns if possible. For the exporting side I'm leaning to using jasper reports to export a dataset to csv,excel...is this a good/bad idea?

Are there some tools free or commercial tools that you have used and would recommend, to allow me to incorporate this feature into my website?

Thanks.


For import:
Try MySql's built-in csv import: LOAD DATA INFILE

LOAD DATA INFILE 'yourdata.csv' INTO TABLE tbl_name
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n';

For export:
Try the jQuery plugin: table2csv. It converts an HTML table into a CSV file. Use the argument, delivery:'value', to return the csv as a string.

Here's an example implementation. I know it's in C#, but there's only a little code involved. It would be easy to port to PHP.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜