Microsoft Office Tutorials and References
In Depth Information
Web Service API Methods
GetApiVersion
The GetApiVersion method of the Excel Services web service returns the version information for the
Excel Services web service. The declaration for the GetApiVersion method looks like this:
public string GetApiVersion(out Status[] status)
Parameter
The parameter for this method is Status (out) . See the “Status Class” section, earlier in this chapter,
for an explanation of the out parameter.
Return Value
A string is returned that is the version information for the Excel Services web service.
Calling GetApiVersion
The return value of the following GetApiVersion method call returns the string “Excel web
services (12.0)” :
try
{
string apiVersion;
Status[] xlStatus;
apiVersion = xlEcsApi.GetApiVersion(out xlStatus);
}
OpenWorkbook
The OpenWorkbook method of the Excel Services web service loads an Excel workbook in a new session
by the ECS. The declaration for the OpenWorkbook method looks like this:
public string OpenWorkbook(string workbookPath, string uiCultureName, string
dataCultureName, out Status[] status)
Parameters
Following are the parameters for this method:
workbookPath (in) — A string that includes the path and name of the workbook to be opened.
The path must be in a UNC, HTTP, or SharePoint trusted file location. The workbook must be in
an Excel 12 supported file format.
uiCultureName (in) — A string that is used for the UI culture. See the “Cultures” section,
earlier in this chapter, for an explanation of the (in) parameter. You can use the String.Empty,
null or “” instead of an actual culture string.
dataCultureName (in) — A string that is used for the data culture. See the “Cultures” section,
earlier in this chapter, for an explanation of the ( in ) parameter. You can use the String.Empty ,
null or “” instead of an actual culture string.
Status (out) — See the “Status Class” section, earlier in this chapter, for an explanation of
this (out) parameter.
Search JabSto ::




Custom Search