This is a migrated thread and some comments may be shown as answers.

Export excel aggregate cell misalignment

6 Answers 741 Views
Grid
This is a migrated thread and some comments may be shown as answers.
IT
Top achievements
Rank 1
IT asked on 23 Feb 2015, 11:19 AM
Hi Guys,

I have notice when exporting a groupped grid to excel the aggregate cells in excel are offset for some reason to the left and do not match the browser grid aggregate layout and as such the exported file doesnt look as good as it should.
This can behavior can easily be replicated in the kendo demo page at http://demos.telerik.com/kendo-ui/grid/excel-export

Cheers!


6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 25 Feb 2015, 07:23 AM
Hi Cornel,

Excel export doesn't currently apply any alignment out of the box. To align the cell text you need to customize the output file and set the hAlign attribute of the required cells.

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
IT
Top achievements
Rank 1
answered on 02 Mar 2015, 02:18 AM
Hi Atanas,

Yes alignment is one thing but im talking about the exported cell offset mismatch. For example in the kendo excel export demo page add an additional groupping by 'Product Name' then under column 'Units On Order' there will be 2 rows of aggregates for Average. All good till here but when exported to excel the Average cell is offseted to the left and appears under 'Unit Price' column instead of 'Units On Order' as it should be per kendo grid.

Cheers!
0
Accepted
Atanas Korchev
Telerik team
answered on 04 Mar 2015, 07:06 AM

Hello Cornel,

I see what you mean. This actually is a bug rather than misalignment. There is one cell missing during nested grouping. I've landed a fix for this and it will be part of the next internal build.

Regards,
Atanas Korchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
IT
Top achievements
Rank 1
answered on 04 Mar 2015, 07:27 AM
Hi Atanas,

Sounds great and looking forward for the fix! 
Cheers.
0
Alan
Top achievements
Rank 1
answered on 16 May 2017, 03:14 PM

Looking at the demo mentioned in the 1st post (http://demos.telerik.com/kendo-ui/grid/excel-export) it appears that the alignment issue still exists when the export is done as of 5/16/2017. When I do an export from the demo url, the aggregate cell is offset to left while the column cells are aligned to the right.

See attached.

Is this still an issue or am I looking at this incorrectly?

0
Alex Hajigeorgieva
Telerik team
answered on 18 May 2017, 10:57 AM
Hello Alan,

I believe that the missing cell issue has been fixed. I did a test with Kendo UI from 2015 before the fix was pushed by my colleague following the steps Cornel mentions, i.e.

- add an additional grouping by 'Product Name' then under column 'Units On Order', there will be 2 rows of aggregates for Average.
- when exported to excel the Average cell is offset to the left and appears under 'Unit Price' column instead of 'Units On Order'



Result in Excel:



http://dojo.telerik.com/uMevu

If you test the same grid with the current version, the output is as expected:




Here is the demo with the latest version I used:

http://dojo.telerik.com/aMosES

For the complete list of cell properties, please check the Kendo UI Workbook namespace:

http://docs.telerik.com/kendo-ui/api/javascript/ooxml/workbook#configuration-sheets.rows.cells

Finally, if you are referring to the cell alignment - the default excel behaviour is to align text to the left and numbers to the right based on their type:



Kind Regards,
Alex Hajigeorgieva
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
IT
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
IT
Top achievements
Rank 1
Alan
Top achievements
Rank 1
Alex Hajigeorgieva
Telerik team
Share this question
or