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

5 posts, 0 answers
  1. Epep
    Epep avatar
    7 posts
    Member since:
    Jul 2018

    Posted 14 Aug Link to this post

    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

  2. Nasko
    Admin
    Nasko avatar
    1023 posts

    Posted 17 Aug Link to this post

    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
  3. Epep
    Epep avatar
    7 posts
    Member since:
    Jul 2018

    Posted 17 Aug in reply to Nasko Link to this post

    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

  4. Epep
    Epep avatar
    7 posts
    Member since:
    Jul 2018

    Posted 20 Aug in reply to Epep Link to this post

    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...
  5. Todor
    Admin
    Todor avatar
    175 posts

    Posted 22 Aug Link to this post

    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
Back to Top