Reputation: 6722
I'm looking into SSRS with intention of exporting a lot of the reports to excel. The problem is that when you export it changes cell sizes and removes borders to try and keep the original report format.
Is there anyway to stop this happening? So that the report exports to excel with the "usual" excel formatting? If it requires any coding that's fine as most of my reports will be run from C# code.
Thanks Mat
Upvotes: 1
Views: 3228
Reputation: 550
I create a seperate report with the same data, but no formatting.
Include a button to export on the main report, and when they click it, it directs them to an unformatted version of the report that is automatically exported to Excel.
Upvotes: 0
Reputation: 1005
I think what's happening is that you have stacks of fields in your reports that aren't aligned with each other and so when you export to excel, it compensates and generates extra columns to try to come close to what you report looks like.
I used to get this all time and then I figured out that if you used as little tables as possible while using more grouping within that grid, it goes along way to send a clean format to excel. Also watch out if you use a report header whose ends don't align to columns within the report.
So match object's begin and ends with other objects' or span of cells' begins and ends.
Upvotes: 0
Reputation: 21505
It's not pretty, but you could consider generating Excel sheets from the XML renderer, as described here - this would give you full control over the appearance of the worksheet.
Upvotes: 0
Reputation: 48016
You could export the data to Sheet2. Mark sheet 2 as hidden.
Create your designer report on Sheet1.
Run an Excel Macro to read data from Sheet2 and put on Sheet1.
Upvotes: 0
Reputation: 66622
You could export to a CSV and import that into a spreadsheet, possibly with some sort of template sheet for the particular report.
Upvotes: 4