ExcelService.SetCalculationOptions Method

Changes the calculation mode setting for workbooks.

Namespace:  Microsoft.Office.Excel.Server.WebServices
Assembly:  Microsoft.Office.Excel.Server.WebServices (in Microsoft.Office.Excel.Server.WebServices.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Sub SetCalculationOptions ( _
    sessionId As String, _
    calcType As WorkbookCalculation, _
    <OutAttribute> ByRef status As Status() _
)
'Usage
Dim instance As ExcelService
Dim sessionId As String
Dim calcType As WorkbookCalculation
Dim status As Status()

instance.SetCalculationOptions(sessionId, _
    calcType, status)
[WebMethodAttribute]
public void SetCalculationOptions(
    string sessionId,
    WorkbookCalculation calcType,
    out Status[] status
)

Parameters

  • sessionId
    Type: System.String

    The Excel Web Services session ID.

  • status
    Type: []

    Alert information.

Remarks

The changes are temporary, that is, for the duration of the session. The changes are not saved even if the workbook is saved to its original or an alternate location. This method works in view and edit modes.

The calculation options you can use are Automatic, Semiautomatic and Manual. Automatic calculates workbook automatically. Semiautomatic calculates workbook automatically except for data tables. Manual disables automatic workbook calculation and requires an explicit call to one of the calculate methods to calculate: Calculate(String, String, RangeCoordinates, []),

See Also

Reference

ExcelService Class

ExcelService Members

Microsoft.Office.Excel.Server.WebServices Namespace