Results 1 to 1 of 1

Thread: Excel reading sheets and ranges using OleDb

  1. #1

    Thread Starter
    Karen Payne MVP kareninstructor's Avatar
    Join Date
    Jun 2008
    Location
    Oregon
    Posts
    6,684

    Excel reading sheets and ranges using OleDb

    The attached VS2008 solution contains three projects, which demonstrates how to read MS-Excel data using OleDb. There are two library projects, which contain language extension methods for BindingSource and OleDb, which are exposed publically so that they can be used in other projects.

    In the windows forms project there are four DataGridView controls, which obtain data from opening an Excel file via a language extension method, which is overloaded and uses enumerations to create a connection string for working with data as a DataTable. There are two variations of opening a worksheet then another variation of opening a range as a range and as a named range.

    In the Excel OleDb library, there are several functions, which return all sheet names, all objects, which can be opened into a DataTable, and a function, which returns only, named ranges.

    The BindingSource library is not specific to working with Excel data. Intertwined in the Excel operations several of the BindingSource extension methods are demonstrated.
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width