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

Posted on 2006-03-21
Last Modified: 2010-04-16
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?

Question by:godwindotnet
    LVL 8

    Accepted Solution

    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.
    LVL 8

    Assisted Solution

    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,
    LVL 26

    Expert Comment

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


    Author Comment

    Thanks Vinhnl,I guess thats the only difference. :-)

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now