EasyUI Forum

General Category => General Discussion => Topic started by: acreonte82 on July 30, 2014, 06:39:12 AM



Title: Improvement for datagrid - Download data in excel or xml format
Post by: acreonte82 on July 30, 2014, 06:39:12 AM
Hello sworty,
can be an interesting feature if you can build the function to download the entire datagrid in a excel or xml file .

I know there are a lot of tool in php to do this, but in my opinion can help many developers...

What you think?


Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: stworthy on July 30, 2014, 06:18:03 PM
It is much easier to export to CSV than exporting a file using Excel format. Using XML would work the same way but the XML format is much heavier. Call 'getRows' method to get all the rows and then convert to CSV.
Code:
var rows = $('#dg').datagrid('getRows');
// convert to CSV


Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: acreonte82 on August 01, 2014, 05:56:27 AM
Ok I know this function. But in my opinion can be more professional to have a native function that export into Excel file...


Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: reems on August 01, 2014, 07:15:59 AM
Hi,

Supposing you have the data in your datagrid also serverside in a database or so, it's easier to use a library as phpexcel for this. I have very good results with it and also can take care of styling the excel file with this.


Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: JohnWang on August 03, 2014, 09:15:39 AM
 ;D  yeah, I'm looking forward to see EasyUI add the function of downloading row datas into excel or CSV files...


Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: acreonte82 on August 04, 2014, 07:11:16 AM
Hi,

Supposing you have the data in your datagrid also serverside in a database or so, it's easier to use a library as phpexcel for this. I have very good results with it and also can take care of styling the excel file with this.

This is no a problem... I use phpexcel too...

My requeste is an idea to have this functionality in the framework.. Nothing more..

If the team developers don't want it, I continue to use the phpexcel class...



Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: aswzen on August 13, 2014, 01:33:01 AM
yes, i think it should be a major feature in easyUI, because exporting HTML table using javascript is very possible now.
 :)


Title: Re: Improvement for datagrid - Download data in excel or xml format
Post by: acreonte82 on August 14, 2014, 12:33:54 AM
yes, i think it should be a major feature in easyUI, because exporting HTML table using javascript is very possible now.
 :)

In my opinion can be great if the  team developers produce 2 solutions:
1. client side;
2. server side ;