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)

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


Type: System.String

The Excel Web Services session ID.

Type: System.String

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

Type: System.Int32

Cell's row, 0-based.

Type: System.Int32

Cell's column, 0-based.

Type: System.Boolean

true returns formatted strings.

false returns raw values.

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.