Exporting SSRS Reports to Excel

  • 18 July 2014
  • 2 replies
  • 116 views

Badge +10

Hi guys,

 

I have a requirement for users to be able to export a list view to excel. Since this is not available out of the box I have decided to have a button on the list view hat says "Export to Excel". When this button is clicked, a smartobject (further explaination below) is called that gets the excel file and then opens a subview with a file control where the returned file will be loaded. The user can then click on the file to download.

 

Now, I have created a SSRS report which basically contains all the list view data. I create a smartobject method by using one f the methods that K2 provide for reports under the SQL Reporting Services Instance Type to export the repot to Excel. I can see that there are two types "Export to CSV" and "Export to Excel Open XML".

 

The "Export to CSV" seems to do the job and produces a file which can be opened in Excel just by duble clicking if Excel is installed, as I am assuming .csv file type is set to open in Excel on most windows machines. However, as it is a CSV file, the SSRS report loses all formatting whcih is causing a few issues visually. 

 

The "Export to Excel Open XML" produces a .zip file. Although it keeps the formatting once you force Excel to open the file, users will not know that this is a excel file as the extension is .zip. Users will either try to unzip the file or when they double click it will open with a file extracting program as .zip will not be set by default to open in Excel on almost all windows machines. 

 

Just wondering if you guys have a better solution to this than the above two.

Thanks in advance.


2 replies

Badge +7

Is there a requirement that prevents you from just sending them directly to the SSRS report?  I had reports that if a user opened a form, I would pass that form ID to a SSRS report.  They would always have access, and I'm guessing if they wanted to print or download they could do it from the SSRS screen.

Badge +10

Apologies for the late reply. 

 

The ssrs option i think is not intuitive enough for most users. They want a click and download kind of interface. I guess only other method is to write my own code to export the file which may not be worth the time. I think I will just stick to CSV for now.

 

Thanks for your reply. 

Reply