How to export grid with custom cell template to excel?

Posted by: gupta.prakul on 25 April 2018, 4:34 pm EST

  • Posted 25 April 2018, 4:34 pm EST

    Hi Team,

    I have created a grid which has custom cells. But on downloading it into excel. It doesn’t download custom cell content.

    Please find the attachment. I want to download exact grid which gets rendered in browser.

    Can you please provide the logic to achieve this ?

    CustomCellExport.zip

  • Posted 26 April 2018, 6:00 pm EST

    Hi Prakul,

    The Excel export from FlexGrid export only cell style set using itemFormatter/formatItem and column header with cell content. To export custom Content set for FlexGrid, you need to define foormatItem for save method as given below code snippet:

    wijmo.grid.xlsx.FlexGridXlsxConverter.save(grid,{formatItem:formatItemFn},"Grid.xlsx");
    
    formatItemFn(args){
    	//code here
    }
    

    Please refer to the following demo sample that implements the same;

    http://demos.wijmo.com/5/Angular/ExcelImportExport/ExcelImportExport/FlexGridImportExport.htm

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels