CloseWbk

Syntax

bool CloseWbk(WbkId tWbk)

Parameters

tWbk. Opened workbook instance moniker.

Description

The CloseWbk operation closes an instance of opened workbook.

Comments

To execute the operation, in the tWbk parameter specify moniker of the workbook instance to be closed. The moniker can be obtained on executing the OpenWbk operation. The operation results in the logical True if the object was closed successfully.

Example

Below is the example of closing workbook instance. The request contains closed workbook moniker. The response returns whether the closing is successful.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CloseWbk xmlns="http://www.fsight.ru/PP.SOM.Som">
<tWbk xmlns="">
  <id>S1!M!S!W4</id>
  </tWbk>
  </CloseWbk>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CloseWbkResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</CloseWbkResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CloseWbk" :
{
"tWbk" :
{
"id" : "S1!M!S!W4"
}
}
}

JSON response:

{
"CloseWbkResult" : "1"
}
public static bool CloseWbk(WbkId id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tClose = new CloseWbk()
{
tWbk = id
};
// Close workbook
var result = somClient.CloseWbk(tClose);
return result;
}

See also:

Working with Time Series Database