Download Free Demos

Data Export

This article describes how Scheduler data can be exported to the iCal, PNG, Excel, PDF formats using the online export service.

It's also possible to use the Scheduler API for data export. This method is described in the article Data Export via Scheduler API.

All export techniques that will be considered in this article result in a JavaScript code that can be added to the page.

You can read detailed information on the available client export functionality in the related documentation.

Export to PDF

dhtmlxScheduler for .NET can use an online service for exporting data to PDF, preserving all it's visual parameters.

The solution is provided as a remote JavaScript library. To enable the service, the following script tag should be added to the page:

<script src="http://export.dhtmlx.com/scheduler/api.js"></script>

The library will extend the client-side instance of the scheduler with the method that allows exporting calendar to PDF - scheduler.exportToPDF:

<script src="http://export.dhtmlx.com/scheduler/api.js"></script> 
<input value="Export to PDF" type="button" onclick='scheduler.exportToPDF()'>

You can refer the client-side documentation for the list of available settings or check the Online Demo.

Export to PNG

dhtmlxScheduler for .NET can use the online service for exporting data to PNG, preserving all it's visual parameters. The solution is provided as a remote JavaScript library. To enable the online service, include the following script tag to the page:

<script src="http://export.dhtmlx.com/scheduler/api.js"></script>

The library will extend the client-side instance of the scheduler with the method that allows exporting calendar to PNG - scheduler.exportToPNG():

<script src="http://export.dhtmlx.com/scheduler/api.js"></script> 
<input value="Export to PDF" type="button" onclick='scheduler.exportToPNG()'>

You can refer to the client-side documentation for the list of available settings or check the Online Demo

Export to Excel

dhtmlxScheduler for .NET can use the online service for exporting data into an Excel spreadsheet. The solution is provided as a remote JavaScript library.

To enable the online service, add the following script tag to the page:

<script src="http://export.dhtmlx.com/scheduler/api.js"></script>

The library will extend the client-side instance of the scheduler with the method that allows exporting calendar to Excel - scheduler.exportToExcel():

<script src="http://export.dhtmlx.com/scheduler/api.js"></script> 
<input value="Export to Excel" type="button" onclick='scheduler.exportToExcel()'>

You can specify the name of the exported file and configuration of the columns. The method can take the object argument with the following two properties (both optional):

  • name - (string) the name of the output file
  • columns - (array) the list of columns of the exported spreadsheet
    • id - (string) the name of the event's property that will be mapped to the column
    • header - (string) the column's header
    • width - (number) the column's width in pixels
scheduler.exportToExcel({
    { name:"My document", columns:[
        { id:"text",  header:"Title", width:150 },
        { id:"start_date",  header:"Start date", width:250 }
    ]}
});

You can refer to the client-side documentation for more details.

Export to iCal

dhtmlxScheduler for .NET can use the online service for exporting data into an iCal string. The solution is provided as a remote JavaScript library.

To enable the online service, add the following script tag to the page:

<script src="http://export.dhtmlx.com/scheduler/api.js"></script>

The library will extend the client-side instance of the scheduler with the method that allows exporting calendar to iCal - scheduler.exportToICal():

<script src="http://export.dhtmlx.com/scheduler/api.js"></script>  
<input value="Export to iCal" type="button" onclick='scheduler.exportToICal()'>

Was this article helpful?

Yes No