tags:

views:

46

answers:

1

Im using ExcelQueryFactory to retrieve the column names of a worksheet using C# 4.0.I'm able to see the list of column names but why do i get an additional set of column names like F12,F100,F20 etc . It happens with any reader i used to read my excel file.

A: 

It's not an C# issue, that is an Excel issue.

if your columns do not have column names, Excel will provide names in the format F###, where the number is the number of the column, and F is short for Field (I guess).

Now, if you have any columns in the file that at anytime contained data, or are referenced in formulas, or Excel just thinks they are important, you'll get them in the column list.

Just filter out any columns in that format, of course with the caveat that real columns with real names like F7 will get the short end of the stick there.

SWeko