Export Excel column as hidden & modify headers

Posted by: fixed-term-pascal-hanel on 14 September 2017, 12:10 pm EST

    • Post Options:
    • Link

    Posted 14 September 2017, 12:10 pm EST

    Dear support,

    my customer wants to export FlexGrid data as an excel file, then edit the excel and import it again to update the data.

    Therefore they need to export the column ID of the datasets and hide this column in the exported excel. How is this possible? My first attempt was using the includeColumns function, but then the columns are not exported anymore. I need to export them, but hide the column in Excel because I need the ID for the mapping of the updated items.

    Furthermore, some of the columns are mandatory to be filled out. So I want to add '[*] ’ in front of the exported column headers. I tried this with the IFlexGridXlsxOptions ‘formatItem’ but I found that this is only for the data rows and not for the headers. Am I right with this? How can I achieve my requirement?

    Thank you

  • Posted 14 September 2017, 12:10 pm EST

    Hi,

    If FlexGrid has any hidden column, it will export as hidden column to Excel.

    If you would change Column header with [*] marks, it will be exported without using formatItem property.

    Regarding formatItem property for exporting custom columnHeader, it was a known issue to us and has been fixed in 335+ build. Most likely, it will be released in the end of the August.

    For your reference, please refer to the attached sample that implements the same.

    Thanks,

    Manish Kumar Gupta

    2017/07/FlexGrid_export_hidden_customColumnHeader.zip

  • Posted 14 September 2017, 12:10 pm EST

    Hi,

    thanks for your reply, this is okay as a workaround and helped me out well!

    Now there is an additional request to only export selected rows. We have a custom multiselect extension for our grid, which stores the IDs of the selected rows. So I can easily filter the array of items and export them, but this also modifies the grid. I only want to filter the rows for export. Is there any way to do this?

    Thanks,

    Pascal

  • Posted 14 September 2017, 12:10 pm EST

    Hi Pascal,

    You can show only selected rows in exported Excel file by setting visible to false for unselected rows using Visible property of WorkbookRow class.

    For your reference, please refer to the attached sample that implements the same.

    Thanks,

    Manish Kumar Gupta

    2017/07/FlexGrid_export_selectedRows.zip

  • Posted 1 July 2019, 4:53 am EST

    Hi Manish,

    is it possible to export selected row items from grid using Listbox selection mode to excel file using FlexGridXlsxConverter class.

    Thanks,

    Arjun

Need extra support?

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

Learn More

Forum Channels