导入工具Excel CSV [英] Import tool Excel CSV

查看:125
本文介绍了导入工具Excel CSV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要用于Web应用程序的导入工具.我一直在环顾四周,发现了一些,只是不确定它们的稳定性.我正在使用Zend Framework作为项目的一部分,并希望可以在那里找到一个导入工具,因为我已经有了该框架,但是看不到...在错误的地方找我吗?

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?

我希望网络用户能够将csv,excel文件导入到mysql数据库中.我希望该工具允许用户选择电子表格/csv的列,以尽可能匹配数据库列.对于导出方面,我倾向于使用jasper报表将数据集导出到csv,excel ...这是一个好主意吗?

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?

谢谢.

推荐答案

用于导入:
尝试使用MySql的内置csv导入: LOAD DATA INFILE

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';

要导出:
尝试使用jQuery插件: table2csv .它将HTML表转换为CSV文件.使用参数delivery:'value'将csv作为字符串返回.

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.

这是一个示例实现.我知道它在C#中,但是只涉及了一些代码.移植到PHP很容易.

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.

这篇关于导入工具Excel CSV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆