Microsoft Office Tutorials and References
In Depth Information
Web Service API Methods
Status[] xlStatus;
object[] rangeResult;
xlSessionId = xlEcsApi.OpenWorkbook(
@”http://theexcelserver/testsite/Shared Documents/workbook.xlsb”,
@”en-US”,
@”de-DE”,
out xlStatus);
RangeCoordinates xlRange = new RangeCoordinates();
xlRange.Column = 4;
xlRange.Row = 4;
xlRange.Height = 5;
xlRange.Width = 6;
rangeResult = xlEcsApi.GetRange(
xlSessionId,
“Sheet2”,
xlRange,
true,
out xlStatus);
}
GetCellA1
The GetCellA1 method of the Excel Services web service returns the calculated values for a single cell
that you specify with A1 notation, or a single cell that you reference by a defined name or object name.
The declaration for the GetCellA1 method looks like this:
public object GetCellA1(string sessionId, string sheetName, string rangeName, bool
formatted, out Status[] status)
Parameters
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 GetCellA1 call. Making a GetCellA1 call
using a sessionId that has timed out results in a SOAP exception.
sheetName (in) — Use this string to specify the name of the sheet containing the rangeName .
You can pass the sheetName as String.Empty or “” when you use a defined name or the name
of an object for the rangeName .
rangeName (in) — Use this string to specify a single cell to be retrieved. Specify the
rangeName using a defined name or an object name that represents the cell to be retrieved.
You can also use A1 notation.
formatted (in) — Use this Boolean to specify whether formatted strings ( true ) or raw
values ( false ) are to be returned.
Status (out) — See the “Status Class” section, earlier in this chapter, for an explanation of
this (out) parameter.
Search JabSto ::




Custom Search