IExcelClient interface

Represents an engine that implements the partition, calculate, and merge model that Microsoft HPC Pack 2008 R2 Services for Excel 2010 uses to run calculations in a workbook in parallel on an HPC cluster. The workbook must implement the callback macro framework.


The IExcelClient interface inherits from the IDispatch interface. IExcelClient also has these types of members:

  • Methods
  • Properties


The IExcelClient interface has these methods.

Method Description

Cancels any currently running Excel calculations without closing the SOA session.


Closes the session that you opened by calling the IExcelClient::OpenSession method (subject to the optionally specified time-out period), and closes all instances of Excel that are running on the compute nodes.


Releases all of the resources that the object allocated.


Initializes the Excel SOA client by creating a new instance of the ExcelDriver class to interact with the Excel workbook that is represented by the specified Microsoft.Office.Interop.Excel.Workbook object.


Starts a new SOA session that uses the specified resource settings to perform calculations from the specified Excel workbook on the HPC cluster with the specified head node.


Starts the calculation for the Excel workbook by using the partition, calculate, and merge model that Microsoft HPC Pack 2008 R2 Services for Excel 2010 uses to run calculations. The calculation runs on the HPC cluster with the head node that you specified when you called the IExcelClient::OpenSession method, unless you specify that the calculation should run on the local computer.



The IExcelClient interface has these properties.

Property Access type Description



The version of the Excel client.



When you use this interface in Windows PowerShell, an exception can occur when you call the IExcelClient.Initialize method, because Windows PowerShell does not correctly wrap the Workbook object that the Workbooks.Open method returns as an Microsoft.Office.Interop.Excel.Workbook type. To ensure that Windows PowerShell provides a Workbook object to the IExcelClient.Initialize method, use the Type.GetTypeFromCLSID method to get the Microsoft.Office.Interop.Excel.WorkbookClass type, and then create a wrapper of that type to pass to IExcelClient.Initialize.

The following example shows how to correctly create a wrapper for a workbook and pass it to the IExcelClient.Initialize method by using PowerShell.

# Open an Excel instance and open a workbook.
$excel = new-object -comobject Excel.Application
$excel.visible = $true
$workbook = $excel.Workbooks.Open( MyWorkbook.xlsm  )

# Get the workbook type using the class identifier (CLSID) for WorkbookClass.
$workbookType = [Type]::GetTypeFromCLSID("00020819-0000-0000-C000-000000000046")
$wrappedWorkbook = [System.Runtime.Interopservices.Marshal]::CreateWrapperOfType($workbook, $workbookType)

$excelclient = new-object -comobject Microsoft.Hpc.Excel.Com.ExcelClient
$excelclient.Initialize( $wrappedWorkbook )



HPC Pack 2008 R2 Client Utilities

Type library


See also

HPC Interfaces