The method ImportDataTable contains the property isFieldNameShown but ImportFromDataReader does not. How do I get the field names in the excel file without knowing what the data looks like beforehand? I am using ImportFromDataReader. Thanks.
In DataTable object, I can get the column names which are the filed names. But I don’t find it in data reader. I think you have to retrieve the filed name with your own code. Generally you can get them from DbCommand object.