EaxDocument.removeSheet

Syntax

removeSheet(keyOdId);

Parameters

keyOdId. Key or identifier of the express report document.

Description

The removeSheet method deletes a sheet of express report document by its key or identifier.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). After executing the example all the sheets of the express report document are deleted:

// Get express report document
var eaxDocument = expressBox.getSource();
// Get array of express report sheets
var sheets = eaxDocument.getSheets();
var isRemove = false;
for (var i in sheets) {
    eaxDocument.removeSheet(i);
    isRemove = true;
}
if (isRemove) {
    console.log("Document sheets are successfully removed.");
} else {
    console.log("Express report document does not contains sheets");
}
// Refresh express report
expressBox.refreshAll();

After executing the example all sheets of the express report document are deleted, and an appropriate message is displayed to the browser console.

See also:

EaxDocument