How can I upload the data from an Excel Spreadsheet to my database in DB2?
Could you not parse the spreadsheet via a DataTable first? SpreadSheet -> DataTable -> DB2
Ok, can you tell me how to code that? :)
the spreadsheet via a DataTable first? SpreadSheet -> DataTable -> DB2
It is possible to connect an excel through an OleDbConnectionString object and it works like a database and the sheet behaves like a table.
ddanbe has provided two great examples of reading the Excel sheets. And This Link directly from IBM shows you how to parse a DataTable into DB2 it's in C# but easy enough to translate.
Job Done =0)
See the following for more connection string options. http://www.connectionstrings.com/excel/
I think Jet 4.0 driver only exists in 32-bit.
Got it already! Thanks so much! :)
Just out of interest Xuexue. How did you end up doing this?