Microsoft Office Tutorials and References
In Depth Information
Web Service API Methods
Status[] xlStatus;
object cellValue;
xlSessionId = xlEcsApi.OpenWorkbook(
@”http://theexcelserver/testsite/Shared Documents/workbook.xlsb”,
out xlStatus);
\\set a cell value in a 1x1 named object
cellValue = “some text”;
xlStatus = xlEcsApi.SetCellA1(
\\set cell C2 on Sheet1 to a date
cellValue = “5/30/2008”;
xlStatus = xlEcsApi.SetCellA1(
The SetCell method of the Excel Services web service sets a cell value into a range that you specify
using range coordinates. The declaration for the SetCell method looks like this:
public Status[] SetCell(string sessionId, string sheetName, int row, int column,
object cellValue)
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 SetCell call. Making a SetCell 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 cell that is
the focus of the SetCell call.
row (in) — Use this integer to specify the zero-based row containing the target cell that is to
be set.
column (in) — Use this integer to specify the zero-based column containing the target cell
that is to be set.
cellValue (in) — This is an object that is the value to be set in the specified cell. An empty
cell is represented in the object as null.
Search JabSto ::

Custom Search