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

Exporting report to Excel 2007: Scale to Fit, shrink width in 1 page

4 Answers 209 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Epep
Top achievements
Rank 1
Epep asked on 14 Aug 2018, 07:27 PM

Hi,

I have created several reports using Telerik reporting. But when the user exports a report, at least to Excel, I have to be able to set the Width to 1 page by default. I have tried several options but I don't seem to be able to set this property using the configuration sections. I am currently using reports in an MVC project. In the device information settings for Excel 2007, I cannot find any configuration to control this property. Is there some how to achieve this?

This requirements is a must from the client, since they don't want to go to the Page Setup -> Scale to Fit menu on Excel to do this change. Currently they have a completely custom solution to generate reports in Excel and this option is already set on this solution, so they consider this missing functionality as a downgrade to their current solution which is unacceptable for them.

I would appreciate a lot to have the same functionality also on PDF, since their reports are quite large and they want to fit them inside one page when exporting to PDF (I know I can play with the font sizes and textbox/table columns sizes but since I have already done the reports, doing these changes will require a lot of time which I unfortunately don't have at this moment).

 

Thanks

4 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 17 Aug 2018, 01:55 PM
Hello Epep,

By design the exported Excel file is configured to use the default scaling option which happens to be No Scaling. The export to Excel settings do not expose an option to change this configuration to Fit Sheet on One Page at the moment. You can request such feature in the Ideas & Feedback portal.

Regards,
Nasko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Epep
Top achievements
Rank 1
answered on 17 Aug 2018, 09:39 PM

Hello Nasko,

I have also opened a support ticket. Actually I need to find a way how to update the Excel file through the OnGetDocument method. I am able to get the byte array but whenever I try to convert it by using any components (in my case I tried with EPPlus), the Excel file does not load the data. I think there might be some encoding issue, but I don't know what's the encoding on the args.Bytes property.

I think, if I am able to correctly get and update the args.Bytes property, it will be much easier to not just set the Fit Sheet on One Page, but also to make more changes to the export result.

Kind Regards

0
Epep
Top achievements
Rank 1
answered on 20 Aug 2018, 06:59 PM
Well, this seems like a strange issue now, because I haven't got any feedback neither at the support ticket (until now the ticket is a monologue of me discussing about the issue)... I am not going to write at the support ticket anymore because the time for the deadline there keeps growing any time I write down some more findings regarding the tests that I do...
0
Todor
Telerik team
answered on 22 Aug 2018, 10:35 AM
Hello Epep,

I answered your queries in the support ticket you opened on the same topic. I will summarize my answers also here.

EPPlus is a third part library that we do not claim to support.
For Excel and other Microsoft Office formats Telerik Reporting internally uses Open XML SDK for Microsoft Office. You can test using the same package for post-processing the already rendered Excel report.

An alternative is to use Telerik Document Processing Libraries.

The XLSX rendered report is encoded with UTF-8.

Note that the response time for your support plan is 72 hours (check Support Plans).

Regards,
Todor
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Epep
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Epep
Top achievements
Rank 1
Todor
Telerik team
Share this question
or