Home > Ask the Microsoft .Net Development Experts > .NET Development with XML Questions & Answers > How do I get a data control to access information from an Excel spreadsheet?
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

How do I get a data control to access information from an Excel spreadsheet?

Daniel Cazzulino EXPERT RESPONSE FROM: Daniel Cazzulino

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 28 February 2004
How do I get a data control to access information from an Excel spreadsheet? I have tried the data form wizard but my book is not clear enough.

>
EXPERT RESPONSE
Take a look at the MS KB article titled "How-to: Use ADO.NET to Retrieve and Modify Records in an Excel Workbook With Visual Basic .NET."

Basically, it explains that you can use an OleDbConnection component to connect to the Excel workbook, using a connection string like the following:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Book1.xls;Extended
Properties="Excel 8.0;HDR=YES;"

The version of Excel depends on the workbook you're opening, and can be: "5.0" for Microsoft Excel 5.0 and 7.0 (95) and "8.0" for Microsoft Excel 8.0 (97), 9.0 (2000) and 10.0 (2002) workbooks. Once you have a connection to the workbook, you can use a DataAdapter and a Dataset just like against any database.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
XML and Data
Modifying XML rows using XSL sheets
Generating Access data as XML for HTML publishing
Editing datagrids, take two
Creating applications to access data via mobile phones
Is it possible to schedule SQLs written for a paradox database?
Questions regarding XML for a decision making tool
Extracting data from Word 6 to populate database
How can I make a connection to a Paradox password protected database?
I have an Access Database that I want to display in a Listview.
Problem with Paradox Connection String

.NET Development with XML
Modifying XML rows using XSL sheets
Generating Access data as XML for HTML publishing
Editing datagrids, take two
Creating applications to access data via mobile phones
Is it possible to schedule SQLs written for a paradox database?
Questions regarding XML for a decision making tool
Extracting data from Word 6 to populate database
How can I make a connection to a Paradox password protected database?
I have an Access Database that I want to display in a Listview.
Problem with Paradox Connection String

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts