V1
Xlsx ActiveReportsJS API Module

Xlsx Module

Type aliases

CheckCancelCallback

CheckCancelCallback: function

Defines a type of callback that gets called to check if cancellation was requested.

Type declaration

    • (): boolean
    • Returns boolean

OnProgressCallback

OnProgressCallback: function

Defines a type of callback that gets called after each page is rendered.

Type declaration

    • (pageNumber: number): void
    • Parameters

      • pageNumber: number

      Returns void

PageSettings

PageSettings: object

Page settings.

Type declaration

  • Optional orientation?: "portrait" | "landscape"

    Page orientation.

  • Optional size?: PageSize

    Page size.

PageSize

PageSize: "Letter" | "Legal" | "Executive" | "A4" | "A5" | "B5" | "Envelope_10" | "Envelope_DL" | "Envelope_C5" | "Envelope_B5" | "Envelope_Monarch" | "Double_Japan_Postcard_Rotated" | "K16_197x273_mm"

Page size

XlsxExportResult

XlsxExportResult: object

Export result

Type declaration

  • data: Blob

    Result content.

  • download: function

    Triggers browser download of file with export result.

      • (filename?: undefined | string): void
      • Parameters

        • Optional filename: undefined | string

        Returns void

XlsxSettings

XlsxSettings: object

Xlsx export settings.

Type declaration

  • Optional info?: XlsxSettingsInfo

    Document metadata.

  • Optional pageSettings?: PageSettings

    Page settings.

  • Optional password?: undefined | string

    Encrypts a document with a password.

  • Optional sheetName?: undefined | string

    The sheet name prefix, e.g. "Sheet_".

XlsxSettingsInfo

XlsxSettingsInfo: object

Xlsx info

Type declaration

  • Optional creator?: undefined | string

    Creator

Functions

exportDocument

  • Exports a provided PageDocument to the XLSX format and returns it as Blob.

    Parameters

    • source: PageDocument | VDomRenderer

      The document to export.

    • Optional settings: XlsxSettings

      Export settings.

    • Optional onProgress: OnProgressCallback

      The callback that gets called after each sheet is rendered.

    • Optional checkCancel: CheckCancelCallback

      The callback that gets called before sheet rendering, the render process will be canceled if the function returns true.

    Returns Promise<XlsxExportResult>