0

How to read rows one by one by its column name from xlsx file using C# or making use of DocumentFormat namespace.

Please help..!

Thanks.

jv42
  • 8,521
  • 5
  • 40
  • 64
user3122164
  • 137
  • 1
  • 1
  • 12

1 Answers1

0

Look at below question. You can get the data into dataset first and then read it from there by column name. I think that's a better option than trying to figure out how to read data using column name in excel(if at all it's possible which I doubt).

Get column name from excel worksheet

Community
  • 1
  • 1
Adarsh Shah
  • 6,755
  • 2
  • 25
  • 39
  • I used this one but facing error The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. – user3122164 Dec 27 '13 at 12:53
  • Look at this link for the solution for this error. Second link works for the those who tried it. http://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb – Adarsh Shah Dec 27 '13 at 12:55
  • Oh I tried this Adarsh. Is there any another way to do it.I also tried another link but its giving me 1-1 cell value.Is it possible to it this into dataset . http://www.clear-lines.com/blog/post/OpenXML-reading-the-cells-of-a-workbook.aspx – user3122164 Dec 27 '13 at 12:59