C#, OLEDB reading a Excel file from a specified row
I need to read a table in an Excel file starting from 10th row (rows before 10开发者_运维技巧th 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?
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
Thanks all for your help. Specially Simen. I've managed to find a solution for my problem with some help from this article: OleDb connection to Excel; how do I select fixed width, unbounded height?
精彩评论