Microsoft Office Tutorials and References
In Depth Information
Web Service API Methods
sheetName (in) — Use this string to specify the name of the sheet containing the cell that is
the focus of the GetCell call.
row (in) — Use this integer to specify the zero-based row containing the target cell that is to
be retrieved.
column (in) — Use this integer to specify the zero-based column containing the target cell
that is to be retrieved.
formatted (in) — Use this Boolean to specify whether a formatted string (true) or a raw
value (false) is to be returned.
Status (out) — See the “Status Class” section, earlier in this chapter, for an explanation of
this ( out ) parameter.
Return Value
An object is returned that is the value of the requested cell. An empty cell returns an object containing a
zero-length string. GetCell returns the value from a cell in a hidden row or hidden column.
Calling GetCell
The following example makes a GetCell call. The GetCell call is made against Sheet1 to return the
formatted value from cell E7 .
try
{
string xlSessionId;
Status[] xlStatus;
object cellResult;
xlSessionId = xlEcsApi.OpenWorkbook(
@”http://theexcelserver/testsite/Shared Documents/workbook.xlsb”,
@”en-US”,
@”de-DE”,
out xlStatus);
cellResult = xlEcsApi.GetCell(
xlSessionId,
“Sheet1”,
6,
4,
true,
out xlStatus);
}
SetRangeA1
The SetRangeA1 method of the Excel Services web service sets values into a range that is specified using
the A1 notation, a named range, or a named object. The declaration for the SetRangeA1 method looks
like this:
public Status[] SetRangeA1(string sessionId, string sheetName, string rangeName,
object[] rangeValues)
Search JabSto ::




Custom Search