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

Export to excel and merge cell

4 Answers 454 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 16 Dec 2009, 06:08 AM
When a report is exported to Excel, it generally works fine. However, here is one problem that I am encountering. In some textbox field, I have CanGrow set as True. Therefore, it the data is longer than the allowed field, it will print to next line which is fine. The problem comes when this is exported to Excel.  If the field is exported Excel, the textbox occupies more than one row(merged row) instead of the whole text should be in one row with longer field.  This prevent the user from sorting properly form Excel.

For example, if it should print, "Hello world, this is me", In textbox it will print as follow.
|Hello World|
|This is me  |

In Excel, it will print,
ROW A  |Hello World|
ROW B  |This is me  |

I would like it to print
ROW A  |Hello World|
              |This is me  |
ROW B

How can this be fixed?

4 Answers, 1 is accepted

Sort by
0
Chavdar
Telerik team
answered on 16 Dec 2009, 04:26 PM
Hello Paul,

This can only be achieved with the Table report item as it defines specific rules about how the items should behave when they grow or shrink. Give a try and let me know if you are experiencing any difficulties with this approach.


Regards,
Chavdar
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Augusto Cosatti
Top achievements
Rank 1
answered on 17 Nov 2010, 02:20 PM
Hello.

I have a similar problem but with the height of the exported rows.

The report has a field (CanGrow=true) that displays fine in the viewer, the text is wrapped and displayed on the two lines (see Row_height_ReportViewer.jpg). When I export to Excel, the texte is rendered into 2 merged cells and the problem is that the height of the second row is too small and the text is not fully visible (see Row_height_Excel.jpg).

How can I do to have the same row height.

I have the reporting working fine and I don't want to rewrite it using what you call the Table items.

Thanks for you help
Augusto
0
Paul
Top achievements
Rank 1
answered on 17 Nov 2010, 04:40 PM
I don't think you have any other options. You have to use Table. I modified all my reports to use table but, it is a bit harder to use.
0
Steve
Telerik team
answered on 17 Nov 2010, 05:58 PM
Hi Augusto,

My colleague has already provided a solution for this - the table item, which has specific rules taking care of the height of inner items. This happens because some of the applications use different line spacing while drawing text lines, while we measure using the same line spacing for all formats. This is where the difference comes from - as we have no way of knowing what line spacing would a viewer software (Acrobat, Excel etc.) use. In other words, we've made it look correct for the image rendering (PDF) and excel in particular is drawing the text lines with different line spacing.

Once again, to address this peculiarity, use the Table item.

Kind regards,
Steve
the Telerik team
See What's New in Telerik Reporting in Q3 2010 on Wednesday, November 17, 11am Eastern Time: Register here>>
Tags
General Discussions
Asked by
Paul
Top achievements
Rank 1
Answers by
Chavdar
Telerik team
Augusto Cosatti
Top achievements
Rank 1
Paul
Top achievements
Rank 1
Steve
Telerik team
Share this question
or