Data Access (How Do I in Visual Studio Tools for Office)
This page provides links to Help for tasks that you commonly perform when you access data in solutions that you create by using Visual Studio Tools for Office. To see other categories of key tasks covered by Visual Studio Tools for Office Help, see How Do I in Visual Studio Tools for Office.
Data Overview
- Data in Document-Level Customizations
Discusses how data can be stored in an embedded data island that is accessible without starting the Office application.
Caching Data
How to: Cache Data for Use Offline or on a Server
Demonstrates how you can mark a data item to be cached in the document so that it is available offline, making it possible for the data in the document to be manipulated by code when the document is stored on a server.How to: Programmatically Cache a Data Source in an Office Document
Shows how to add a data source to a document cache programmatically by calling the StartCaching method and passing in the data source.How to: Programmatically Stop Caching a Data Source
Demonstrates how to stop caching a data source in the document cache programmatically by calling the StopCaching method and passing in the data source.Walkthrough: Creating a Master/Detail Relation Using a Cached Dataset
Demonstrates creating a master/detail relation on a worksheet, and caching the data so that the solution can be used offline.How to: Change Cached Data in a Workbook on a Server
Demonstrates how to change data in the cache of an Excel workbook that is part of a Visual Studio Tools for Office project without running Excel.How to: Retrieve Cached Data from a Workbook on a Server
Shows how to retrieve data from the cache from an Excel workbook that is part of a Visual Studio Tools for Office project without running Excel, making it possible to get data from Excel workbooks that are stored on a server.
Data Binding
Walkthrough: Binding Data to Controls on a Word Actions Pane
Demonstrates binding data to controls on an actions pane in Word, in which the controls demonstrate a master/detail relation between tables in a SQL Server database.Walkthrough: Simple Data Binding in a Document-Level Project
Steps you through the basics of binding a single data field in a SQL Server database to a named range in Excel.Walkthrough: Complex Data Binding in a Document-Level Project
Demonstrates the basics of binding multiple cells in an Excel worksheet to fields in the Northwind SQL Server database.Walkthrough: Binding Data to Controls on an Excel Actions Pane
Describes how to add controls that are bound to a data source to an actions pane in Excel.How to: Scroll Through Database Records in a Worksheet
Shows how to display a single field from a database table in an Excel worksheet, with controls that enable the end user to scroll through all the records.How to: Map ListObject Columns to Data
Describes how to map specific columns in a ListObject control to a data source.
Displaying Data
How to: Scroll Through Database Records in a Worksheet
Shows how to display a single field from a database table in an Excel worksheet, with controls that enable the end user to scroll through all the records.How to: Format Text in Documents
Demonstrates how to use the Word Range object to format text in a Word document.How to: Populate Documents with Data from a Database
Shows how data access in Word solutions works the same way as it does in Windows Forms projects.How to: Populate Worksheets with Data from a Database
Demonstrates how you can display database data in a worksheet, and how data access works the same way as it does in Windows Forms projects.How to: Populate Documents with Data from Objects
Shows how accessing data that is stored in objects from Word documents is similar to working with Windows Forms projects.How to: Populate Documents with Data from Services
Demonstrates how to bring Web service data into your Excel solutions.
Offline
- How to: Cache Data for Use Offline or on a Server
Demonstrates how you can mark a data item to be cached in the document so that it is available offline, making it possible for the data in the document to be manipulated by code when the document is stored on a server.
Samples
Data Analysis Sample
Demonstrates data analysis tasks that are executed by using toolbar buttons and menus in Excel.Accessing Data Sample
Shows how to read data from a data source and display it in an Excel 2007 worksheet or a Word document.
Walkthroughs
Walkthrough: Creating a Master/Detail Relation Using a Cached Dataset
Demonstrates creating a master/detail relation on a worksheet, and caching the data so that the solution can be used offline.Walkthrough: Simple Data Binding in a Document-Level Project
Steps you through the basics of binding a single data field in a SQL Server database to a named range in Excel.Walkthrough: Complex Data Binding in a Document-Level Project
Demonstrates the basics of binding multiple cells in an Excel worksheet to fields in the Northwind SQL Server database.
XML
How to: Map Schemas to Word Documents Inside Visual Studio
Demonstrates how to map an XML schema to a document while the document is open in a Visual Studio Tools for Office project, using the same Word tools that you use when the document is open outside of Visual Studio.How to: Map Schemas to Worksheets Inside Visual Studio
Describes how to map an XML schema to a worksheet while the worksheet is open in a Visual Studio Tools for Office project, using the same Excel tools that you use when the workbook is open outside of Visual Studio.