XLSX rendering format is not available.

1 posts, 0 answers
  1. LEONARDO
    LEONARDO avatar
    1 posts
    Member since:
    Jul 2018

    Posted 06 Jul 2018 Link to this post

    Hi to all,
    I'm trying to create a solution console that it has generate a XLSX file from my report.
    I'm using this code, it gives me an error "XLSX rendering format is not available." when execute reportProcessor.RenderReport()

    Telerik.Reporting.Processing.RenderingResult EseguiReport(Telerik.Reporting.Report report, string format)
     
            {
                Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                Telerik.Reporting.Processing.RenderingResult renderingResult =  reportProcessor.RenderReport(format, report, null);
     
                return renderingResult;
            }

     

    I have already add these dll:
    DocumentFormat.OpenXml version 2.8.1
    Telerik.Reporting
    Telerik.Reporting.OpenXmlRendering.2.7.2.dll
    And added a bindingRedirect in the application configuration file for the DocumentFormat.OpenXml.dll assembly.

    <dependentAssembly>
            <assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="31bf3856ad364e35" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-2.8.1.0" newVersion="2.8.1.0"/>
    </dependentAssembly>

    Also, i set CopyLocal property must be set to True to make sure that the proper DocumentFormat.OpenXml.dll is copied in the project's Bin folder.

Back to Top