Kap.JsBlock.exportTo

Syntax

exportTo (format: String)

Parameters

format. Export format.

Description

The exportTo method exports a block using a specified format.

Comments

The following formats are available for export: *.XLS, *.XLSX, *.PDF, *.RTF, *.HTML, *.MHT, *.EMF, *.PPTX.

Example

To execute the example the page must contain a dashboard designed named kapBox, and the currentBlock variable must be defined. This variable must contain selected dashboard block (see Kap.KapBox). The BODY tag must contain a DIV element with the "but" identifier. Add a button clicking which will export selected dashboard block to *.XLSX:

var exportButton = new PP.Ui.Button({
    ParentNode: "but",
    Content: "Export to *.xlsx",
    Click: function () {
        currentBlock.exportTo("xlsx");
    }
});

After executing the example clicking the Export to *.XLSX button selected dashboard block is exported to *.XLSX.

See also:

Kap.JsBlock