How to: Programmatically Open Workbooks
The Workbooks collection in Microsoft Office Excel makes it possible to work with all open workbooks and to open workbooks.
Applies to: The information in this topic applies to document-level projects and VSTO add-in projects for Excel. For more information, see Features Available by Office Application and Project Type.
To open an existing workbook
This code example requires the following:
- A workbook named
YourWorkbook.xlsmust exist in a directory namedTeston drive C.
Working with Workbooks
How to: Programmatically Open Text Files as Workbooks
How to: Programmatically Create New Workbooks
How to: Programmatically Save Workbooks
How to: Programmatically Close Workbooks
Programmatic Limitations of Host Items and Host Controls
Optional Parameters in Office Solutions
Host Items and Host Controls Overview
Show: