Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C#, OLEDB reading a Excel file from a specified row

Tags:

c#

excel

ado.net

I need to read a table in an Excel file starting from 10th row (rows before 10th row are having other data and they are not in a correct format and coteins banners, cell splits, ect) using Ado.Net. How can I do that?

like image 391
Thanushka Avatar asked Dec 02 '25 16:12

Thanushka


1 Answers

It's all here: How To Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET. The article contains code samples for to VB.NET, but the C# code shouldn't be too difficult to deduce.

Pay particular attention to the section specifying Table Naming Conventions

like image 99
Simen S Avatar answered Dec 04 '25 06:12

Simen S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!