8

I have an excel spreadsheet that a client has given me which is broken down into multiple worksheets. I need to extract certain columns from each worksheet on a row-by-row basis and to iterate through each worksheet (all identical templates) to dump the data in a database table. It also needs to weed out any duplicates present.

I wish to build a simple asp.net front-end, using C# for the language.

What libraries would you recommend? I have yet to find any that are of any use.

Any help will be supremely appreciated!!! :-)

P.S. The best I have found so far is OpenXML (Microsoft libraries)

Nick Lewis
  • 772
  • 1
  • 10
  • 20
  • In a similar situation, I found sticking with OpenXML was the best bet as well. It provides less "infrastructure" than other solutions, but in my case (and it appears in yours), it was the only solution that gave me all the flexibility I needed. The only real roadblock was figuring out how to handle the dumb string table abstraction on some text cells. – Jacob Proffitt Oct 06 '11 at 17:17
  • Possible duplicate of http://stackoverflow.com/questions/375991/import-excel-spreadsheet-columns-into-sql-server-database – Janick Bernet Oct 06 '11 at 17:19

1 Answers1

5

This can be done without any libraries at all, SOL Server supports importing excel files directly in to it using the data import wizard. I would recommend turning the entire workbook in to a database and work with it from there.

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431