Data Discovery

Posted on 2006-05-03
Last Modified: 2010-04-23

I have an excel spreadsheet I want to import into to display in a list view. Now i am currently importing it into a data set however I am coming accross and issue with this. I need a way to discover the names of the individual sheets in this workbook in order to properly import it. can anyone help me with this? also, is a list view the best way to display this data?

Question by:loureiro
    1 Comment
    LVL 17

    Accepted Solution

    If you are using an OLE connection, you can get the names of the sheets into a data table.  You can traverse through the data table at that point, looking in the Table_Column column for the names.

    Dim dbcon As New OleDbConnection
    Dim dtTable As DataTable = dbcon.GetOleDbSchemaTable(Data.OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})

    For Each row As DataRow In dtTable.Rows
        '...etc etc

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
    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…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 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

    17 Experts available now in Live!

    Get 1:1 Help Now