Export to excel

Posted by: vjsvjs on 8 September 2017, 3:20 pm EST

  • Posted 8 September 2017, 3:20 pm EST

    While exporting from spreadgrid to excel my hiddens columns are come to visible when unhide option choose in excel

    I written

    Grid1.SaveExcel(xDestinationPath, FarPoint.Excel.ExcelSaveFlags.SaveAsViewed) // visible columns only export but custom column header is not display properly

    Grid1.SaveExcel(xDestinationPath, FarPoint.Excel.ExcelSaveFlags.SaveCustomColumnHeaders) // it display with custom column header & hidden column also export

    I have to lock the unhide option, can you say the best way?

  • Marked as Answer

    Replied 8 September 2017, 3:20 pm EST


    As mentioned in following documentation link, the 'invisible rows and columns in Spread' are exported as 'hidden rows and columns' in Excel and hence user can later view hidden columns by unhiding them:
    Please note that this is design behaviour of Spread.

    A possible workaround to achieve desired requirement is to create a temporary Spread with visible columns & no hidden column and export this temporary Spread to Excel.
    Hope it clarifies.
    Best Regards,
    Shubham Srivastava
  • Replied 8 September 2017, 3:20 pm EST

    thank you,

    is there any other way (Without temporary spread )?
  • Replied 8 September 2017, 3:20 pm EST


    Unfortunately, we couldn't find any other way to export only visible columns.

Need extra support?

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

Learn More

Forum Channels