How can I upload the data from an Excel Spreadsheet to my database in DB2?

Thanks! :)

Recommended Answers

Could you not parse the spreadsheet via a DataTable first? SpreadSheet -> DataTable -> DB2

Jump to Post

You could start reading this article. On the bottom of this webpage you'll find related articles.
Example

Jump to Post

All 8 Replies

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)

Got it already! Thanks so much! :)

Just out of interest Xuexue. How did you end up doing this?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.