This is a migrated thread and some comments may be shown as answers.

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

5 Answers 158 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 09 Jun 2015, 06:11 AM

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).

 

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 09 Jun 2015, 08:14 AM
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
0
Paul
Top achievements
Rank 1
answered on 09 Jun 2015, 09:01 AM

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?

0
Maya
Telerik team
answered on 09 Jun 2015, 09:40 AM
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
0
Paul
Top achievements
Rank 1
answered on 09 Jun 2015, 11:10 AM

[quote]

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?

[/quote]

???

0
Maya
Telerik team
answered on 12 Jun 2015, 07:47 AM
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
Tags
GridView
Asked by
Paul
Top achievements
Rank 1
Answers by
Maya
Telerik team
Paul
Top achievements
Rank 1
Share this question
or