SSRS report - export to Excel

mark goldin 706 Reputation points
2021-12-13T13:44:02.96+00:00

I am exporting a report into excel which runs in ReportViewer in Local Mode - NO SSRS server.
The command is this:
ReportViewer1.LocalReport.Render("EXCEL", null, out mimeType, out encoding, out extension, out streamids, out warnings);

That creates xls file, while I want xlsx. Is that possible?

Thanks

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
{count} votes

4 answers

Sort by: Most helpful
  1. Olaf Helper 47,586 Reputation points
    2021-12-13T14:13:16.103+00:00

    That creates xls file, while I want xlsx. Is that possible?

    You already use the format parameter "EXCEL", there is no other for Excel format and if you get XLS, then may because you use an old version of ReportViewer.


  2. Isabellaz-1451 3,616 Reputation points
    2021-12-14T01:24:56.977+00:00

    Hi @mark goldin ,
    By right-clicked on the project ,choose ‘manage NuGet packages ’ ,in the installed segment,you can search for the ‘ ReportViewer’ ,and then you will get the ReportViewer installed version .

    Best Regards,
    Isabella


    If the answer is the right solution, please click "Accept Answer" and upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. Isabellaz-1451 3,616 Reputation points
    2021-12-14T07:42:22.643+00:00

    Hi @mark goldin

    I think this is the latest ,you can choose the Browser segment ,and search for it .

    157382-image.png

    Best Regards,
    Isabella

    0 comments No comments

  4. Nick Christie 1 Reputation point
    2025-04-22T00:29:16.4+00:00

    render to EXCELOPENXML

    use this to get the available modes

          var rv = new Microsoft.Reporting.WinForms.ReportViewer(); // Corrected namespace and class instantiation
    
          foreach (var re in rv.LocalReport.ListRenderingExtensions())
    
          {
    
              Debug.WriteLine(re.Name.ToString());
    
          }
    
          //Excel
    
          //EXCELOPENXML
    
          //IMAGE
    
          //PDF
    
          //WORD
    
          //WORDOPENXML
    
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.