Read Excel files in .NET – The DataReader way

Imran Hugo

Introduction

A few years ago, an application I was working had a requirement to import an excel spreadsheet into SQL.  I had written tons of office interop code in Delphi and C#, but all of them always created spreadsheets from data, never really the other way around.

My 1st stab at doing it (the lazy way), was to create a SQL 2000 DTS package which imported the spreadsheet into a SQL Table and then executed the package from code (SQL 2000 implementation).  This needed the DTS libraries installed on each of the target machines the application would be used on as well as special DB privileges for each of the users allowing them to execute the DTS package.  Not ideal.

So when I got around to converting the system from Delphi to .NET, I decided to give the Excel reading thing a go. I mean, .NET is awesome….right?  It must have some really cool…

View original post 267 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s