PHP Data Grid Export

Hi, Syncfusion Team

I am new to the PHP DataGrid Control (Syncfusion as a whole, actually) and I have been playing around with it a bit to get a good sense of its functions. I noticed on your website it says this control can export data to Excel, Word and PDF, but for the life of me I cannot find anywhere in the PHP DataGrid Control documentation where it demonstrates this. I have searched your demos as well and they also do not demonstrate how such a function can be implemented on this control.

I did also read up on the JavaScript equivalent of this control and actually did find information there where the export can be done, but nothing purely PHP.

Can someone please assist me in creating this function with just the PHP DataGrid Control? I do not want to mix in the JavaScript control yet because I want to see if the PHP control can stand on its own. I'm more than happy to implement JavaScript functions to get the PHP DataGrid Control working, but I would like to avoid using the JavaScript equivalent of the control if I can help it.


5 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 9, 2021 04:02 PM UTC

Hi Farai, 
 
Greetings from Syncfusion Support. 
 
Before proceeding with your query we would like to confirm whether are you using Essential JS1/ Essential JS 2 in order to provide you the solution as early as possible. 

Regards, 
Farveen sulthana T 



FA Farai November 9, 2021 04:28 PM UTC

Essential JS1.



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 10, 2021 03:28 PM UTC

Hi Farai, 

Thanks for your details. 
 
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,  

However, Exporting in EJ1Grid works with .net as server side and it does not have support for client side grid exporting.  

Please get back to us if you need any further assistance. 

Regards, 
Farveen sulthana T 



FA Farai November 11, 2021 07:01 AM UTC

Thanks so much for the reply. Will definitely look into it. I did gloss over the server-side .net part because I was looking to see if there was an alternative. I will get back to you as soon as I am able to.



FS Farveen Sulthana Thameeztheen Basha Syncfusion Team November 12, 2021 07:06 AM UTC

Hi Farai, 

Thanks for your update. Please get back to us if you need any further assistance. We are happy to assist you. 

Regards, 
Farveen sulthana T 


Loader.
Up arrow icon