Export (0) Print
Expand All

ExcelService.GetCell Method

Gets a calculated value from a cell in the open workbook, using numeric cell coordinates.

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

[WebMethodAttribute]
public Object GetCell(
	string sessionId,
	string sheetName,
	int row,
	int column,
	bool formatted,
	out Status[] status
)

Parameters

sessionId
Type: System.String

The Excel Web Services session ID.

sheetName
Type: System.String

The name of the sheet that you want to reference. Sheet name length is limited to 31 characters.

row
Type: System.Int32

Cell's row, 0-based.

column
Type: System.Int32

Cell's column, 0-based.

formatted
Type: System.Boolean

true returns formatted strings.

false returns raw values.

status
Type: []

Alert information.

Return Value

Type: System.Object
Value of the requested cell.

Returns the value from a single cell, using numeric cell coordinates to select the cell.

A cell can be a range reference, a named range, or a named data object.

The API checks only the result dimensions, not the dimensions of the requested range. For example, the caller might ask for a 2x3 range, and Excel Calculation Services might return a 1x1 range (for example, because of hidden cells).

To get values from multiple adjacent cells, consider using the GetRange method instead of making multiple calls to the GetCell method. This results in a single round trip to the server instead of multiple round trips. Therefore, in some cases, you may gain a performance improvement by using the GetRange method instead of the GetCell method.

Show:
© 2014 Microsoft