I am using excel export control, and I'm wondering how to do a few things.
1) when the user exports the contents of the grid to excel, how do I change the page layout to landscape?
2) How do I automatically expand the "plus signs" in the excel document that is exported?
I'm not sure about the exporter, but there is no way to automatically expand a parent row directly through the Excel object model. However, you can set Hidden to False on all child rows to manually expand a parent row.
You can set a worksheet to Landscape by accessing the worksheet directly and settings it's PrintOptions.Orientation property to Landscape.
I've read the posts, and for automatically expanding the parent rows, no one seems to have found a solution. so is this even possible?
For the landscape issue - that is not a propery of Excel exporter... only the document exporter, but I was hoping someone knew of a different way to get this to work for excel.
Thanks again!
Hello,
1) I am not 100% sure this is built in (though I might be wrong). Landscape as an layout is supported by our PDF exporter, e.g.
UltraWebGridDocumentExporter1.TargetPaperOrientation =PageOrientation.Landscape;
But I am not sure this applies to Excel (not sure how to set Landscape as default in Excel or even if this is possible at all).
2) If your grid has plus signs, then I guess you are having a hierarchical grid (master -> detail) that you wish to export in full expanded mode.
I can suggest following the following forum thread:
http://forums.infragistics.com/forums/p/1054/11254.aspx#11254
Or in fact, any of the search matches here
http://forums.infragistics.com/search/SearchResults.aspx?q=export+hierarchical+grid+to+excel
HTH