Question

When using OleDbConnection and when HDR=Yes are all of the header values being disregarded or are they being stored in a variable that I can access using one of the class methods?

Thank you

EDIT: So for clarification I'm reading in the excel file but I want to use the header values in later operations. So do I need to set HDR=No and just take in the header row normally? Or when HDR=Yes is the header row being stored somewhere and I just need to call a method to access it?

Was it helpful?

Solution

When you set HDR = Yes you can reference the header value by its value and it will return the column value.

However, there was only one row of data associated with each header. So I'm not positive what would happen if there were multiple rows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top