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]
I'm pretty sure this is a known bug which is fixed. Try getting the latest service release - there was a newer one than the build you are using released in September.
How to get the latest service release - Infragistics Community
With the latest service release of v11 (11.1.20111.2030) this issue persists. The exported excel document was identically mis-spaced as with the older version of 10.3.
Is a case number available for this issue yet and should I anticipate seeing it added to the 'my support activity' section of my account?
Hi rastedt,
As requested, I have created a case to update you via the "my support activity" section of your account. Please note that I will be updating this forum with the information needed to resolve this issue once our developers have completed their review of Development ID 113828.
Please letme know if you have any questions regarding this matter.
Hello,
The fix for "Cell placement in multiband Excel Export" has been resolved in NetAdvantage 2011 Volume 2 and newer. To take advantage of this fix, please download the latest service release using the instructions found here: http://community.infragistics.com/forums/t/29398.aspx
Please let me know if you have any questions.
This behavior was broken further with the aforementioned service release.
1. Every child band is now indented, throwing all column alignment off. Previously it was only the bottom-most band that was shifted out of place.
2. When the export is opened in Excel 2007, the "band" expansion indicators indicate the collapsed state (shows a 'plus' sign) even after the "band" has been expanded. This makes it impossible to collapse the row again once it is expanded. This regression has been fixed in the upcoming service release.
It should also be noted that I was told by support that the behavior of #1 is the now the "fixed" behavior; there will now by default be an alignment discrepency between the grid and the export. The component will no longer try to align the columns correctly and if you want to have the columns aligned properly you will have to force it explicitly in code during the export process.
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.
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.