ExcelExporter

A feature that allows exporting Scheduler 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 Scheduler({
    features : {
        excelExporter : {
            xlsProvider : WriteExcelFileProvider
        }
    }
});

Here is an example of how to add the feature:

const scheduler = new Scheduler({
    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
                columns : [{ text : 'Staff', field : 'name' }],

                // 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:

scheduler.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

Other

Configuration object for exporter class.

dateFormatExcelExporter
exportAllColumnsExcelExporter
filenameExcelExporter
xlsProviderExcelExporter

Misc

clientInstancePlugin
localeClassLocalizable
localizableLocalizable

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