PDF, Excel and Word Export

I have integrated Grid synfusion js1 with server-side PHP code.
I would like the content of the grid to be exported to excel. It would also be ideal to export it to Word and PDF.

In the documentation https://help.syncfusion.com/js/grid/exporting I found examples in .NET. Is it possible to export with PHP?

Thank you very much and greetings

3 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team September 11, 2018 05:43 AM UTC

Hi Gustavo,  
 
To export a Grid to PDF, Word or Excel File formats, you must use the server-end as .Net. We have already discussed about its importance in the following document.  
 
 
If you are having complexity in converting a complete project to .Net environment, you can host the Exporting service separately using WebApi controller. Refer to the following Help Document.  
 
 
These are the possible methodologies available in the ejGrid to export them. 
 
However, we found an open source NPM module for Node.js which can render JSON data in to Excel file. Please refer the same in the following link.  


So, we suggest you to export the grid dataSource (JSON data) to CSV file instead of excel using client-side JavaScript which can be opened in MS Excel. Refer to the following stackoverflow link, 


Regards,  
Seeni Sakthi Kumar S. 



GU Gustavo September 20, 2018 02:23 PM UTC

Thank you very much.

Unfortunately the server side code is PHP and we can not generate a .NET environment.

I think the solution would be to migrate to JS2 grid that makes these exports from the client side. You could inform me when I can integrate js2 grid with PHP code on the server side. On another topic I was informed that it was not possible yet.

Thank you very much and greetings


VA Venkatesh Ayothi Raman Syncfusion Team September 21, 2018 06:44 AM UTC

Hi Gustavo, 
 
 
Thanks for the update. 
 
 
In Essential JavaScript2 currently don’t have support for PHP wrapper. But we can use the EJ2-JS in PHP view and EJ2-export works in client side alone. There is no need to any server-side configuration for export the EJ2-Grid. Please refer to the following online demo for your reference, 
 
 
Please let us know if you have any further assistance on this. 
 
Regards, 
Venkatesh Ayothiraman. 


Loader.
Up arrow icon