# XlsxExport

## Content

# Namespace: XlsxExport

## Table of contents

### Type aliases

- [CheckCancelCallback](XlsxExport#checkcancelcallback)
- [OnProgressCallback](XlsxExport#onprogresscallback)
- [PageSettings](XlsxExport#pagesettings)
- [PageSize](XlsxExport#pagesize)
- [XlsxExportResult](XlsxExport#xlsxexportresult)
- [XlsxSettings](XlsxExport#xlsxsettings)
- [XlsxSettingsInfo](XlsxExport#xlsxsettingsinfo)

### Functions

- [exportDocument](XlsxExport#exportdocument)

## Type aliases

### CheckCancelCallback

Ƭ **CheckCancelCallback**: () => `boolean`

#### Type declaration

▸ (): `boolean`

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

##### Returns

`boolean`

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:44

___

### OnProgressCallback

Ƭ **OnProgressCallback**: (`pageNumber`: `number`) => `void`

#### Type declaration

▸ (`pageNumber`): `void`

The type of callback that gets called after each sheet is rendered.

##### Parameters

| Name | Type |
| :------ | :------ |
| `pageNumber` | `number` |

##### Returns

`void`

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:42

___

### PageSettings

Ƭ **PageSettings**: `Object`

Page settings.

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `orientation?` | ``"portrait"`` \| ``"landscape"`` | Page orientation. |
| `size?` | [`PageSize`](XlsxExport#pagesize) | Page size. |

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:15

___

### 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

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:8

___

### XlsxExportResult

Ƭ **XlsxExportResult**: `Object`

Export result

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `data` | `Blob` | Result content. |
| `download` | (`filename?`: `string`) => `void` | - |

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:35

___

### XlsxSettings

Ƭ **XlsxSettings**: `Object`

Xlsx export settings.

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `info?` | [`XlsxSettingsInfo`](XlsxExport#xlsxsettingsinfo) | Document metadata. |
| `pageSettings?` | [`PageSettings`](XlsxExport#pagesettings) | Page settings. |
| `password?` | `string` | Encrypts a document with a password. |
| `sheetName?` | `string` | The sheet name prefix, e.g. "Sheet_". |

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:22

___

### XlsxSettingsInfo

Ƭ **XlsxSettingsInfo**: `Object`

Xlsx info

#### Type declaration

| Name | Type | Description |
| :------ | :------ | :------ |
| `creator?` | `string` | Creator |

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:10

## Functions

### exportDocument

▸ **exportDocument**(`source`, `settings?`, `onProgress?`, `checkCancel?`): `Promise`<[`XlsxExportResult`](XlsxExport#xlsxexportresult)\>

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

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `source` | [`PageDocument`](../classes/Core.PageDocument) \| `VDomRenderer` | The document to export. |
| `settings?` | [`XlsxSettings`](XlsxExport#xlsxsettings) | Export settings. |
| `onProgress?` | [`OnProgressCallback`](XlsxExport#onprogresscallback) | The callback that gets called after each sheet is rendered. |
| `checkCancel?` | [`CheckCancelCallback`](XlsxExport#checkcancelcallback) | The callback that gets called before sheet rendering, the render process will be canceled if the function returns _true_. |

#### Returns

`Promise`<[`XlsxExportResult`](XlsxExport#xlsxexportresult)\>

#### Defined in

node_modules/@grapecity/ar-js-xlsx/dist/ar-js-xlsx.d.ts:53
