How can I upload the data from an Excel Spreadsheet to my database in DB2?
Thanks! :)
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.
You could start reading this article. On the bottom of this webpage you'll find related articles.
Example with DataTable.
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.
https://www.connectionstrings.com/using-jet-in-64-bit-environments/
Got it already! Thanks so much! :)
Just out of interest Xuexue. How did you end up doing this?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.