Grid to PDF and Excel Online Service

| Leave a comment

This is a quick note on the export to PDF and Excel functionality for dhtmlxGrid. The export functionality is also available as an online service so you do not have to download and install the server-side extensions (available for PHP, ASP.NET and Java).

To use the online export service, you need to add just one line of code (see below). For user convenience you can attach this function to Export to PDF/Excel button with onclick event. With this code, the grid will send its configuration and data to the server which will process it and return the required document: PDF or Excel file.

Grid to PDF:

grid.toPDF("http://dhtmlxgrid.appspot.com/export/pdf");

Grid to Excel:

grid.toExcel("http://dhtmlxgrid.appspot.com/export/excel");

 
Grid to Excel

 
The export service works with dhtmlxGrid v.2.6 and above. The document generated with the online service will have a short note and link to https://dhtmlx.com. If you would like to use this service in a commercial project, this note can be removed (please contact us at sales[at]dhtmlx.com for the details).

If you decide to use the locally installed export services, you can find the download links and detailed instructions here: Grid to PDF and Grid to Excel.