3 out of 8 rated this helpful - Rate this topic

Application Interface

Represents the entire Microsoft Excel application.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
[GuidAttribute("000208D5-0000-0000-C000-000000000046")]
public interface Application : _Application, 
	AppEvents_Event

The Application object contains:

  • Application-wide settings and options (for example, many of the options in the Options dialog box - accessed through the Tools menu).

  • Properties that return top-level objects, such as ActiveCell, ActiveSheet, and so on.

Use the Application property to return the Application object.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
JavaScript Example
function XlBook(name,visible,readonly) {
 var book;
 if (visible==undefined) visible = true;
 if (readonly==undefined) readonly = false;
 if (XlBook.app==null) XlBook.app = new ActiveXObject ("Excel.Application");
 if (name) book = XlBook.app.Workbooks.Open(name,3,readonly);
 else book = XlBook.app.Workbooks.Add();
 XlBook.app.visible = visible;
 return book;
 }
XlBook.app = null;
PowerShell Samlpe
$XLSDoc = "p:\Zeszyt1.xls" 
$Excel = New-Object -ComObject "Excel.Application"
$Excel.Workbooks.Open($XLSDoc)
$Excel.Visible = $true
...
$Excel.quit()