how to prevent oledb from auto generating column name in excel
I am reading excel file from C# 3.5 using OleDB. I want to read only those columns that have a column heading. When I tried to get all the column names using
GetOleDbSchemaTable(OleDbSchemaGuid.Columns...), it auto generates column name such as F30, F34 etc. Is there a way to prevent this auto generation of column name?
[EDIT] OK, I solved this by a using a work around - used a reg ex to match the pattern F<>:
Regex r = new Regex("^F{1}[0-9]+$");
开发者_StackOverflow社区Please let me know if any one has a better solution.
Thanks vikram
精彩评论