{"id":1512,"date":"2012-03-14T15:50:12","date_gmt":"2012-03-14T12:50:12","guid":{"rendered":"http:\/\/www.dhtmlx.com\/blog\/?p=1512"},"modified":"2023-05-05T14:12:57","modified_gmt":"2023-05-05T11:12:57","slug":"grid-to-pdf-and-excel-online-service","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/grid-to-pdf-and-excel-online-service\/","title":{"rendered":"Grid to PDF and Excel Online Service"},"content":{"rendered":"<p>This is a quick note on the export to PDF and Excel functionality for <a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxGrid\/\">dhtmlxGrid<\/a>. 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). <\/p>\n<p>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 <strong>Export to PDF\/Excel<\/strong> 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.<\/p>\n<p><strong>Grid to PDF<\/strong>:<\/p>\n<div class=\"codecolorer-container html4strict default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"html4strict codecolorer\">grid.toPDF(&quot;http:\/\/dhtmlxgrid.appspot.com\/export\/pdf&quot;);<\/div><\/div>\n<p><strong>Grid to Excel<\/strong>:<\/p>\n<div class=\"codecolorer-container html4strict default codecolorer-noborder\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"html4strict codecolorer\">grid.toExcel<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;http:\/\/dhtmlxgrid.appspot.com\/export\/excel&quot;<\/span><span class=\"br0\">&#41;<\/span>;<\/div><\/div>\n<p>&nbsp;<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2012\/03\/grid_.png\" alt=\"Grid to Excel\" title=\"Grid to Excel\" width=\"578\" height=\"237\" class=\"aligncenter size-full wp-image-1520\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2012\/03\/grid_.png 578w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2012\/03\/grid_-300x123.png 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/p>\n<p>&nbsp;<br \/>\nThe 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). <\/p>\n<p>If you decide to use the locally installed export services, you can find the download links and detailed instructions here: <a href=\"https:\/\/docs.dhtmlx.com\/grid__data_export.html\">Grid to PDF and Grid to Excel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230;<\/p>\n","protected":false},"author":2,"featured_media":3363,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71,1],"tags":[33,29,30],"class_list":["post-1512","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-uncategorized","tag-all-posts","tag-grid-to-excel","tag-grid-to-pdf"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/1512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=1512"}],"version-history":[{"count":1,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/1512\/revisions"}],"predecessor-version":[{"id":8650,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/1512\/revisions\/8650"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/3363"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=1512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=1512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=1512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}