PDA

View Full Version : yet another grid export to Excel



tdg2008
26 Aug 2008, 7:37 PM
JS Code:
[code]
function StringBuffer(){
this.data = [];
}
StringBuffer.prototype.append = function(){
this.data.push(arguments[0]);
return this;
}
StringBuffer.prototype.toString = function(){
return this.data.join("");
}

Ext.ExcelButton = Ext.extend(Ext.Button, {
handler:function(){
var cm=this.ownerGrid.getColumnModel();
var buffer = new StringBuffer();
buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><content><head>");
//

g13013
27 Aug 2008, 2:47 AM
Can you post a complete example please i've got many errors when trying it