wijmo.grid.xlsx Interface IFlexGridXlsxOptions Wijmo API Interface

IFlexGridXlsxOptions Interface

FlexGrid Xlsx conversion options


  • IFlexGridXlsxOptions


Optional activeWorksheet

activeWorksheet: any

Index or name of the active sheet in the xlsx file.

Optional formatItem

formatItem: Object

An optional callback which is called for every exported cell and allows to perform transformations of exported cell value and style. The callback is called irrespectively of the 'includeCellStyles' property value. It has a single parameter of the XlsxFormatItemEventArgs type that provides both information about the source grid cell and an IWorkbookCell object defining its representation in the exported file, which can be customized in the callback.

Optional includeCellStyles

includeCellStyles: boolean

Indicates whether cells styling should be included in the generated xlsx file.

Optional includeColumnHeaders

includeColumnHeaders: boolean

Indicates whether to include column headers as first rows in the generated xlsx file.

Optional includeColumns

includeColumns: Object

A callback to indicate which columns of FlexGrid need be included or omitted during exporting.

For example:

// This sample excludes the 'country' column from export.
// JavaScript
wijmo.grid.xlsx.FlexGridXlsxConverter.save(grid, {
  includeColumns: function(column) {
     return column.binding !== 'country';

Optional includeRowHeaders

includeRowHeaders: boolean

Indicates whether to include column headers as first rows in the generated xlsx file.

Optional quickCellStyles

quickCellStyles: boolean

When turned on, decreases the export time by activating the cell styles caching if IFlexGridXlsxOptions.includeCellStyles property is enabled. In typical scenarios it allows to decrease the export time by several times.

The combination of cell's inline style specific properties, own CSS classes and CSS classes of row containing the cell is used as the cache tag. Before the cell style is calculated, the cache is checked first, and if the style associated with the tag is found there, it's taken from there and doesn't get recalculated.

Using this mode can make the export slower when considerable amount of cells have the unique set of CSS classes and inline styles. Also, when pseudo classes like :first-child and :nth-child are used to style the cells and rows, the cell styles can be determined incorrectly.

The default value is true.

Optional sheetIndex

sheetIndex: number

The index of the sheet in the workbook. It indicates to import which sheet.

Optional sheetName

sheetName: string

The name of the sheet. It indicates to import which sheet for importing. If the sheetIndex and sheetName are both setting, the priority of sheetName is higher than sheetIndex. It sets the name of worksheet for exporting.

Optional sheetVisible

sheetVisible: boolean

The visible of the sheet.