PDA

View Full Version : excel file downloading



javapurna
12 Jan 2013, 1:22 AM
hi,
i have a grid in my page . i want to download grid data into excel and pdf if i am clicking download excel and download pdf buttons . buttons present in below the grid.
i am doing like this .....

var downloadSystemAlertsGrid = new Ext.grid.GridPanel({
store : notificationStore,
columns: [
{dataIndex: 'notificationType',id : 'dalert',value:'Image',text: 'Type',flex:0.1,},
{dataIndex: 'keyword',id : 'dkeyword',text: 'Keyword',flex:0.5,},
{dataIndex: 'anamolyText',id : 'dmessage',text: 'Message',flex:1,},
{dataIndex: 'siteName',text: 'Site',id:'dsite',flex:0.5,},
{dataIndex: 'userName',id : 'duser',text: 'User',flex:0.5,},
{dataIndex: 'page',id : 'dpage',text: 'Page',flex:0.5,hidden:true,},
{dataIndex: 'sessionId',id : 'dsessionId',text: 'session Id',flex:1,hidden:true,},
{dataIndex: 'sequenceNumber',id : 'dsequenceNumber',text: 'sequence Number',flex:1,hidden:true,},
{dataIndex: 'instanceOccuredOn',id : 'dinstanceOccuredOn',text: 'Instance Occured On',flex:1,},
{dataIndex: 'clientIP',id : 'dclientIP',text: 'Accessed From',flex:1}

],
});


my button is like .....
var exportButtonstore = new Ext.ux.exporter.Button({
component: downloadSystemAlertsGrid,
downloadName:'download',
formatter: 'excel',
text : "Download Excel",

});


but my file is downloading ,but not open and firefox display html code .

ie9,ie8 not open

please help me .......

mitchellsimoens
14 Jan 2013, 1:47 PM
There are some excel plugins to do this. You can use the search on this forum and you will find many threads about excel.