Reputation: 1998
In a current project I have to generate an Excel report. I do have the the Excel file as a template which contains some static data along with some fields which contain parameter values.
On the bottom of the Excel file there should be a table which contains data from Dataset.
Now I am wondering if there is a way/ tool to generate the rdl file from the Excel file rather than creating it by myself (which would be very cumbersome...)
On the other hand is there a way to link static Excel content into the .rdl file?
Upvotes: 2
Views: 3687
Reputation: 4104
You could use the excel spreadsheet as a data source for the report to pull the information in. But then it would need to be accessible from the report manager server if you're planning on deploying the report. So unless the information in the spreadsheet is going to change I think this will likely be more trouble than it is worth.
If it isn't necessary to deploy it to report manager then you could also try embedding the report in the excel file itself and use SSRS to update the dynamic content and you can just leave the static stuff already there. (Of course, depending on the complexity of what you're doing you could also just automate all of the dynamic stuff in Excel VBA code too.) I've personally never done this, but I've found a couple of blog posts detailing how it could possibly be pulled off. I think this is nifty enough I may have to try it if I ever get the chance. You can even use cell values in the spreadsheet and pass them as parameter values to the report.
I've found a post on embedding the report data as an image that refreshes from the report server. On the upside it seems simple to pull off, but the downside is that it is an image and the numbers won't be available to be individually selected only looked at. So it would be best for charts but not your data table.
Then there is this article which shows how to actually import the values into the spread sheet by pulling it in from SSRS in CSV format and using some VBA code to put it into the excel file. It is a more complicated solution but I think its a pretty cool idea, though I dunno how well it will work in practice.
Otherwise, I think you're stuck recreating the static information and formatting from the excel file in your report.
Upvotes: 2