Hello,I have a XamDataGrid with horizontal orientation. When I export to Excel, it exports with the default (vertical) orientation. Is it possible to have it export with horizontal orientation?Thanks,Dave
It appears it's possible; I've found Infragistics.Excel.Orientation. Now I have to figure out where it's used...
This seems to only control printing. It doesn't affect how the export occurs. Back to square 1... Has anybody been able to export a horizontally-oriented XamDataGrid to Excel and have that horizontal orientation retained in the spreadsheet?
Changing the orientation is just switching column and row indexes. So, probably you can use something like this:
private void DataPresenterExcelExporter_CellExporting(object sender, CellExportingEventArgs e)
{
e.Cancel = true;
int row = e.CurrentRowIndex;
int col = e.CurrentColumnIndex;
e.Workbook.Worksheets[e.CurrentWorksheet.Index].Rows[col].Cells[row].Value = e.Value;
}