-
27 Jun 2008 12:36 PM #61
Just a note! did not work with Ext.grid.RowNumberer() im my tests
-
27 Jun 2008 12:49 PM #62
Feel free to make it work.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
27 Jun 2008 1:07 PM #63
-
27 Jun 2008 1:09 PM #64
im using NoahK17 version, ill try the original, and report
-
28 Jun 2008 5:33 AM #65
http://www.123messagepro.com convert your text into vocal message with background music !!
-
28 Jun 2008 7:36 AM #66
Another solution to get Grid to excel with FF, IE6, IE7, etc
Another solution to get Grid to excel with FF, IE6, IE7, etc
Well, after reading many threads about downloading and more, I found a solution bases on this thread and jrh's message (#34) [URL="http://extjs.com/forum/showthread.php?t=23937&page=4"].
First of all, for utf8 issue, I don't use Base64 encoding. Except for data url.
So to get more compatibility with major browsers, I use this following code when I create a button (top toolbar). If the browser support data url, I use this way else I create a downloader :
Your PHP code should be like this one:PHP Code:id: 'grid-excel-button',
iconCls: 'icon-excel',
text: EXPORT_EXCEL_BUTTON,
handler: function(){
var exportContent = IssueListingEditorGrid.getExcelXml();
if (!Ext.isIE6 || !Ext.isIE7 || !Ext.isSafari || !Ext.isSafari2 || !Ext.isSafari3) {
document.location='data:application/vnd.ms-excel;base64,' + Base64.encode(exportContent);
} else {
if (!Ext.fly('frmDummy')) {
var frm = document.createElement('form');
frm.id = 'frmDummy';
frm.name = id;
frm.className = 'x-hidden';
document.body.appendChild(frm);
}
Ext.Ajax.request({
url: 'export/excel.php',
method : 'POST',
form: Ext.fly('frmDummy'),
callback: function(o, s, r){
alert(r.responseText);
},
isUpload: true,
params: { ex: exportContent }
});
}
}
Hope this helps someonePHP Code:header("Pragma: public");
header("Expires: 0"); // set expiration time
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header('Content-type: application/vnd.ms-excel');
header("Content-Disposition:attachment;filename=export");
echo $_REQUEST['ex'];
Alhttp://www.123messagepro.com convert your text into vocal message with background music !!
-
14 Jul 2008 5:05 AM #67
Great work Animal! Works like a charm.

For others using - FYI
One item I ran into was the length of the title of my grid. The grid title is used as the worksheet title, and it seems that Excel will only let you have 31 characters. You will get a warning when opening the data link saying that a string is too long. Excel will truncate the title, but the error message might be a bit bothersome. So anyone having a long grid title will need adjust accordingly. It is easily fixed.Thanks!
Chuck
-
15 Jul 2008 10:33 AM #68
-
16 Jul 2008 12:51 PM #69
gwt-ext gridpanel to excel
gwt-ext gridpanel to excel
Hi Animal I think this is great ! I was looking over Internet a lot but I did not find nothing like this. My problem is that I am using gwt-ext in my application and I would like to have this functionallity in it. I really dont know how to include this in my application, can you give me some tips about this or point me where to go.
Any help it would be great
Thanks
Marelo
-
17 Jul 2008 6:30 AM #70


Reply With Quote