ExcelService.Calculate Method
Calculates formulas in the open workbook, or in a range within the workbook, using numeric range coordinates.
Namespace: Microsoft.Office.Excel.Server.WebServices
Assembly: Microsoft.Office.Excel.Server.WebServices (in Microsoft.Office.Excel.Server.WebServices.dll)
Syntax
'Declaration
<WebMethodAttribute> _
Public Sub Calculate ( _
sessionId As String, _
sheetName As String, _
rangeCoordinates As RangeCoordinates, _
<OutAttribute> ByRef status As Status() _
)
'Usage
Dim instance As ExcelService
Dim sessionId As String
Dim sheetName As String
Dim rangeCoordinates As RangeCoordinates
Dim status As Status()
instance.Calculate(sessionId, sheetName, _
rangeCoordinates, status)
[WebMethodAttribute]
public void Calculate(
string sessionId,
string sheetName,
RangeCoordinates rangeCoordinates,
out Status[] status
)
Parameters
- sessionId
Type: System.String
The Excel Web Services session ID.
- sheetName
Type: System.String
The name of the sheet you want to reference. Sheet name length is limited to 31 characters.
- rangeCoordinates
Type: Microsoft.Office.Excel.Server.WebServices.RangeCoordinates
The four integer coordinates used to select a contiguous range.
- status
Type: []
Alert information.
Remarks
To calculate a range in the workbook, use range coordinates to select the range. If a range is not specified, the entire workbook will be calculated.
If the sheetName parameter is empty (that is, an Empty string or Nullis passed in) and the rangeCoordinates parameter is empty, the entire workbook will be calculated.
If the sheetName parameter is non-empty but the rangeCoordinates parameter is empty, the entire sheet will be calculated.
If thesheetName parameter is empty and the rangeCoordinates parameter is non-empty, Excel Web Services returns an InvalidArgument alert.