What is the advantage of using the EXcel component over Oledb?

Hello,
I know there are 2 methods to read an excel file....
1.)either we can read it using odbc,oledb,etc ...
2.)or we can read it using the Microsoft Excel component.

Which way is more efficient and why?
Thanks.

Godwin
godwindotnetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

vinhnlCommented:
Hi Godwindotnet,

If you only want to read data from an Excel file, you don't need to use Excel compenent.
With Excel component, you can read data, format, type of a cell of Excel file. And write data, format a cell as you do on Microsoft Excel Application. It's not necessary.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vinhnlCommented:
If you use Excel component, you have to use interrop. It's a little difficult to use if your version of your machine (machine to develope application) and version of your client are  different.

If you use oledb, you can run your application with any all version if microsoft excel on your client and even your client doesn't need install microsoft excel on his machine.

Good luck,
VINHNL
0
RejojohnyCommented:
depends on what you want to do with the data ..
if its just to read the data and once read, do some manupulation in the dataset .. then use OLEDB ..
else if u want to format the excel sheet .. use excel interop i.e. reference to excel component in ur project ...

Rejo
0
godwindotnetAuthor Commented:
Thanks Vinhnl,I guess thats the only difference. :-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.