We help IT Professionals succeed at work.

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

godwindotnet
godwindotnet asked
on
Medium Priority
345 Views
Last Modified: 2010-04-16
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
Comment
Watch Question

Commented:
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Commented:
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
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

Author

Commented:
Thanks Vinhnl,I guess thats the only difference. :-)
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.