I am using the UltraGridExcelExporter to create an excel worksheet. The grid I am exporting has multiple bands, the column collections in all of the bands are the same and in the same visible order and the column width are aligned. See attached screenshot.jpg.
In the exported file the cells are not aligned properly (the headers are correct). The first band is offset by 6 cells, i.e. what should be in cell A2 is in cell G2. For the remaining bands the cells are offset by a number corresponding to the band index, the first cell of band index 1 is in column B, for band index 2, column C, etc. See attached export.xlsx.
Is there anything I can do to make the exported cells appear in the same column they do in the grid?
[I am using version 10.3.20103.2094]
How to get the latest service release - Windows Forms - Service Releases
We are also facing the same issue in 12.1.
Would like to know from where we could download the NetAdvantage® for Windows Forms 12.1 Service Release.
Regards
Mohideen
When I said "always" I was referring to the historical intended behavior of the control.
Yes, there was an aberration where this was broken in service release. But aside from that one small glitch, the behavior has always been to indent child rows in Excel just as they are indented on-screen by default. I tested this all the way back to v8.1 and it has always worked the same.
"This is the way Excel Exporting has always worked." Not true. Please see the attached screenshot showing an export from the 12.1 2008 build. The columns are properly aligned except for the bottom-most band (not pictured), and no manipulation of the layout at export time is performed. That was the issue I have continued to follow up on this thread about.
My experience with the exports is that the column alignment was respected (for the most part). If the choice has been made to no longer attempt to respect that alignment, then I will accept that as the new normal.
However, setting the indentation to 0 at export time (on the layout passed into ExportStarted) has proven to break other aspects of the grid when the bands have not been expanded... Once I am able to isolate this behavior in a sample project I will provide it, but until then we're stuck in broken service release limbo.
As for #2, yes that has been fixed in the upcoming release as I mentioned.
1) the indentation of each child band is correct. There is an indentation visibly on the screen and so there is a similar indentation in Excel. This is the way Excel Exporting of the grid has always worked and it is the correct behavior. The cells in each column are aligned with the column headers for that column.
If you want the columns in each band to line up with the columns in other bands, you can easily achieve this by setting the Indentation on each band in the export layout to 0. You can do this in the ExportStarted event.
2) This is a bug. I am pretty sure it is fixed in the latest service release which was posted last week. If it's not in that one it will be in the next one.