ExcelExporter

A feature that allows exporting Calendar data to Excel or CSV without involving the server. It uses TableExporter class as data provider, 3rd party provider to generate XLS files, and Microsoft XML specification.

import WriteExcelFileProvider from '../../lib/Grid/feature/experimental/xlsproviders/WriteExcelFileProvider.js';

new Calendar({
    features : {
        excelExporter : {
            xlsProvider : WriteExcelFileProvider
        }
    }
});

Here is an example of how to add the feature:

const calendar = new Calendar({
    features : {
        excelExporter : {
            // Choose the date format for date fields
            dateFormat : 'YYYY-MM-DD HH:mm',
            exporterConfig : {
                // Choose the Resource fields to include in the exported file
                resourceColumns : [{ text : 'Calendar', field : 'calendar' }],

                // Choose the Event fields to include in the exported file
                eventColumns    : [
                    { text : 'Task', field : 'name' },
                    { text : 'Starts', field : 'startDate', width : 140 },
                    { text : 'Ends', field : 'endDate', width : 140 }
                ]
            }
        }
    }
});

And how to call it:

calendar.features.excelExporter.export({
    filename : 'Export',
    exporterConfig : {
        columns : [{ text : 'Staff', field : 'name' }]
    }
})

This feature is disabled by default.

This class requires a 3rd party library to export to XLSX

Configs

16

Common

disabledInstancePlugin
listenersEvents

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

Other

dateFormatExcelExporter
exportAllColumnsExcelExporter
exporterClassExcelExporter
exporterConfigExcelExporter
filenameExcelExporter
xlsProviderExcelExporter

Properties

15

Common

disabledInstancePlugin

Class hierarchy

isExcelExporter: Boolean= truereadonly
Identifies an object as an instance of ExcelExporter class, or subclass thereof.
isExcelExporter: Boolean= truereadonlystatic
Identifies an object as an instance of ExcelExporter class, or subclass thereof.
isEventsEvents
isInstancePluginInstancePlugin
isLocalizableLocalizable

Lifecycle

configBase

Misc

clientInstancePlugin
localeHelperLocalizable
localeManagerLocalizable

Other

Functions

29

Configuration

applyDefaultsstaticBase

Events

Lifecycle

destroystaticBase

Misc

doDisableInstancePlugin
initClassstaticBase
isOfTypeNamestaticBase
mixinstaticBase
optionalLstaticLocalizable

Other

exportExcelExporter
LstaticLocalizable
onEvents
relayAllEvents
triggerEvents
unEvents

Events

7
beforeCSVExportExcelExporter
beforeExcelExportExcelExporter
catchAllEvents
destroyEvents
disableInstancePlugin
enableInstancePlugin

Event handlers

7
onBeforeCSVExportExcelExporter
onBeforeExcelExportExcelExporter
onDestroyEvents
onDisableInstancePlugin
onEnableInstancePlugin

Typedefs

2