GridViewDataControl.Export(Stream stream, GridViewExportOptions options) , ExcelML, groups are missing

6 posts, 0 answers
  1. Paul
    Paul avatar
    7 posts
    Member since:
    Feb 2015

    Posted 09 Jun 2015 Link to this post

    I export data from my grid to Excel (v2013.1.422.45). Data grouped by some field.

    var options = new GridViewExportOptions

    {

    Format = ExportFormat.ExcelML,
    ShowColumnHeaders = true,
    ShowColumnFooters = true,
    ShowGroupFooters = true,
    Encoding = Encoding.UTF8
    };

    gridControl.Export(stream, options);

    Groups are missing. I tried to use ElementExporting handler but there is no event with ExportElement.GroupHeaderRow (GroupHeaderCell, GroupIndentCell) data (just Footer).

     

  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 09 Jun 2015 Link to this post

    Hello Paul,

    The data will be exported in grouped state, but group rows will be visually displayed only in HTML format. What you can try instead is to benefit from our new ExportToXlsx method. In that way you will have everything exported just as it is in the grid. 

    Regards,
    Maya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Paul
    Paul avatar
    7 posts
    Member since:
    Feb 2015

    Posted 09 Jun 2015 in reply to Maya Link to this post

    Thank you for the answer.

    Is there any way to add Group information (visually displayed) to Excel file using my version and ExcelML format?

    Also ... If I use HTML format Excel displays warning message (like http://docs.telerik.com/devtools/wpf/controls/radgridview/export/troubleshooting/warning-message-excel). How can I fix it?

  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 09 Jun 2015 Link to this post

    Hi Paul,

    You can test the functionality in our demos

    Regards,
    Maya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  5. Paul
    Paul avatar
    7 posts
    Member since:
    Feb 2015

    Posted 09 Jun 2015 in reply to Maya Link to this post

    Is there any way to add Group information (visually displayed) to Excel file using my version and ExcelML format?Also ... If I use HTML format Excel displays warning message (like http://docs.telerik.com/devtools/wpf/controls/radgridview/export/troubleshooting/warning-message-excel). How can I fix it?

    ???

  6. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 12 Jun 2015 Link to this post

    Hi Paul,

    You can modify the exported file in ElementExported event as illustrated in the "Export" article. However, since the group rows are not exported, you will need to implement custom logic, find the last row of certain group and insert group row after it. 



    Regards,
    Maya
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top