Reputation: 23
I need some help we are going to import the data from excel to mysql database and we're going to use the MS Interop. We don't know how to start and we do some research about the MS Interop but we don't know how to start. We only now is declare the namespace we don't know what's next.
We found some youtube tutorials but they are using OLedb(if this is right), I hope you can help us!
Upvotes: 1
Views: 420
Reputation: 16968
You can use ExcelDataReader
or Microsoft.Office.Interop.Excel
as described in this answer, to read data from your sheet, then create a SqlCommand
, like insert into myTable (column1, column2) values (1, 'mydata')
and execute it over a connection to your MySQL Database.
Upvotes: 2