Dela via


How to: Open Workbooks

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Document-level projects

  • Application-level projects

Microsoft Office version

  • Excel 2003

  • Excel 2007

For more information, see Features Available by Application and Project Type.

The Workbooks collection in Microsoft Office Excel makes it possible to work with all open workbooks and to open workbooks.

To open an existing workbook

Compiling the Code

This code example requires the following:

  • A workbook named YourWorkbook.xls must exist in a directory named Test on drive C.

See Also

Tasks

How to: Open Text Files as Workbooks

How to: Create New Workbooks

How to: Save Workbooks

How to: Close Workbooks

Concepts

Working with Workbooks

Programmatic Limitations of Host Items and Host Controls

The Variable missing and Optional Parameters in Office Solutions

Host Items and Host Controls Overview