且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将excel数据导入mysql

更新时间:2022-10-17 23:15:13

首先从excel读取数据并将其放入数据集中,然后您必须将该数据集中的数据插入表格。

请查看以下链接:

http://forums.asp.net/t/1608097.aspx/1 [ ^ ]

http://social.msdn.microsoft。 com / forums / zh-CN / csharpgeneral / thread / ef11a193-54f3-407b-9374-9f5770fd9fd7 [ ^ ]

http://www.dreamincode .net / code / snippet1413.htm [ ^ ]


参考文章

使用ASP中的C#将数据从excel导入SQL服务器。 NET [ ^ ]

http://www.techrepublic.com/blog/datacenter/how-to-import-an-excel-file-into-sql-server-2005 -using-integration-services / 205 [ ^ ]


嗨...

它可能对你有帮助。

在mysql命令promt窗口中写入cmmd。



 数据本地infile'文件路径'加载到  databasename字段终止 by ','随附 by ' '以'\ n'结尾的行;  





这样也可以通过命令将文件插入到数据库中。

谢谢你。


Hi...
Can u tel me,
How to import excel data into mysql by programmatically is posible in asp.net!

First read data from excel and put it in a dataset then you have to insert data from that dataset to table.
Take a look at following links:
http://forums.asp.net/t/1608097.aspx/1[^]
http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/ef11a193-54f3-407b-9374-9f5770fd9fd7[^]
http://www.dreamincode.net/code/snippet1413.htm[^]


Refer article
Import Data from excel to SQL server using C# in ASP. NET[^]
http://www.techrepublic.com/blog/datacenter/how-to-import-an-excel-file-into-sql-server-2005-using-integration-services/205[^]


Hi...
its may helpful to u.
write blow cmmd in mysql command promt window.

Load data local infile ‘file path’ into table databasename fields terminated by ‘,’ enclosed by"’ lines terminated by ‘\n’;



this way also excel file insert into database through command.
thank u.