EasyUI Forum
June 19, 2024, 04:31:18 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Improvement for datagrid - Download data in excel or xml format  (Read 24011 times)
acreonte82
Jr. Member
**
Posts: 85



View Profile
« 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?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #2 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...
Logged
reems
Newbie
*
Posts: 14


View Profile
« Reply #3 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.
Logged
JohnWang
Newbie
*
Posts: 5


View Profile
« Reply #4 on: August 03, 2014, 09:15:39 AM »

 Grin  yeah, I'm looking forward to see EasyUI add the function of downloading row datas into excel or CSV files...
Logged
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #5 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...

Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #6 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.
 Smiley
Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
acreonte82
Jr. Member
**
Posts: 85



View Profile
« Reply #7 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.
 Smiley

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

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!