I've looked at the export to excel sample provided in your sample browser, but the sample code exports all rows/columns into excel even if they aren't visible. Is there any way to only export visible rows/columns(for example: if total rows were hidable)?
Bump.
The tricky part here seems to be the row and column headers and adjusting their positions/cell merging. Since the placement of the actual cells with data is them is easy.
Hello Ryan,
Thank you for post. I have been looking into your question and the sample application for exporting the XamPivotGrid to excel is exporting the current view of the control. It is exporting the same data that is visible in the XamPivotGrid. I am attaching a sample application that is showing how the approach is implemented.
The sample is using Infragistics Excel Engine and you can use it as bases and modify it based on your needs. You can read more details on the Excel Engine here: http://help.infragistics.com/Doc/WPF/current/CLR4.0/?page=WPF_Infragistics_Excel_Engine.html.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir, MCPD
Developer Support Supervisor - XAML
Infragistics
www.infragistics.com/support
I am just checking if you require any further assistance on the matter.
Thank you for your reply and the clarification. After looking into the functionality that you are trying to achieve and the current approach for exporting the XamPivotGrid is exporting the result of the DataSource. You can use this approach as basis and modify it to suits your scenario. Also you can submit a new product idea for having a sample in our Samples Browser that handles the scenario that you wish.. You can suggest new Product Ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
Steps to create your idea:
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.
Thank you for sending me the sample from the sample browser.
As I stated, that exporter sample exports even rows/columns with visibilities set to false. For instance, if I said...
xamPivotGrid.DataRows.Where(x => x.IsTotal).ToList().ForEach(i => i.IsVisible = false);
The rows would still be shown in an excel export.
I wanted to know if there was a way to only export the rows/columns with a visibility set to true. Calculating the new row/column spans and the new positioning of the headers can get quite complex.