Microsoft Office Tutorials and References
In Depth Information
Web Service API Methods
Return Value
An object is returned that is the value of the requested cell. Empty cells are represented as null . If the
returned range is not a 1x1 range, a SOAP exception occurs.
Calling GetCellA1
The following example makes two GetCellA1 calls. Comments are provided prior to each GetCellA1
call to describe what is going to be retrieved.
string xlSessionId;
Status[] xlStatus;
object cellResult;
xlSessionId = xlEcsApi.OpenWorkbook(
@”http://theexcelserver/testsite/Shared Documents/workbook.xlsb”,
out xlStatus);
//get the formatted value for cell A1 on Sheet1
cellResult = xlEcsApi.GetCellA1(
out xlStatus);
//get the unformatted value for the cell with the OneCell defined name
cellResult = xlEcsApi.GetCellA1(
out xlStatus);
The GetCell method of the Excel Services web service returns the calculated values for a single cell that
you specify using range coordinates. The declaration for the GetCell method looks like this:
public object GetCell(string sessionId, string sheetName, int row, int column, bool
formatted, out Status[] status)
Following are the parameters for this method:
sessionId (in) — The sessionId string that was returned from a prior OpenWorkbook call.
The session must still be active at the time of the GetCell call. Making a GetCell call using a
sessionId that has timed out results in a SOAP exception.
Search JabSto ::

Custom Search