Import excel data into mysql database [Solved/Closed]

Report
-
 Er.mayank khandelwal -
Hello,


This is Nischala .Can any one suggest me wheather we can import excel sheet data into mysql database using .net application(vb.net or asp.net).



thanks in advance

1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
You can open a connection to excel and then read from the recordset would be one way.
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

How to do that..?? Pls explain briefly.. Thank you.
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
Sorry I had misread the question then. That would have been true if data was to pulled into excel, To insert data into db, just read the value and create insert statements and execute

In this below query you can import data in mysql database

LOAD DATA LOCAL INFILE 'C:\\wamp\\tmp\\php89.tmp' INTO TABLE 'collection' FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'# Affected rows: 2599