SSRS export to Excel UNFORMATTED - excel

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

You could export to a CSV and import that into a spreadsheet, possibly with some sort of template sheet for the particular report.

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.

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.

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.

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.

Related

Blank rows when exported to Excel from Crystal Report with Sub Report

we have a Crystal report with Suv-report. When we tried exporting it to Excel, it creates a blank row above and below each row with data that comes from the sub-report. how to resolve this?
Main Report
Sub Report - TranDetails
I've tried the below:
Suppressing empty sections
Suppress blank sub-report
Resizing the fiels
Aligning fields.
Is there any other way to resolve this?
According to this blog by Ken Hamady, "The only method I found that worked was to use the regular Excel Export instead of “Data Only”. But you have to line up the subreport (as well as the objects within the subreport) so that they are in line with the main report objects. Line them up carefully and they will export to excel with subreport objects aligned correctly."
As an alternative, at least one of the 3rd-party Crystal Reports automation tools listed here automatically removes blank rows from Excel exports.

Export SSRS Report to Excel but then add formulas and formatting to create a worksheet that users can add own data (Power Automate?)

I have created a report in SSRS that is several tables. I can export the report to Excel easily enough but the users want to have the ability to input their own numbers in a line below the tables. This line (y) would be followed with another summary line(y+z, or x-y=z, whatever). Yes, they can open the report insert extra lines, add formulas and formatting... but since this report will be run monthly and there are 11 tables in this report it would be nice if there is a Power Automate solution to add lines, formulas and formats or some other solution. Feel free to post potential solutions or teaching resources that may allow me to piece together a solution. Thank you.
I haven't tried anything yet. The only solution I can do at the moment is create a Excel template where I paste the exported spreadsheet and it gets 'lookedup' by a second tab with the proper/end formatted spreadsheet. Would like to modernize the solution(and learn)....although learning VBA is not solution I am looking for....

MATLAB's xlsread gives different data than shown by Excel - hidden sheets

I want to use xlsread in MATLAB R2017b to read from an externally supplied data file. Usually, this works fine for me. However, in this case I get data I can't find in the .xls file and I don't know what happened.
Here is screenshot of the .xls:
and here of the corresponding raw from xlsread:
Note that there is data in MATLAB (e.g. 'Report tem...') that cannot be found in Excel, that the columns are in a different order and that their headers also differ.
The data file is from Svenska Kraftnät, the Swedish Transmission System Operator and contains the generation and consumption of electrical energy for a certain year. You can find it here.
I use the following line to import the data in question (I am only interested in the numerical data and the timestamps, but used the raw to try to understand what is going on here):
[num,~,raw] = xlsread('n_fot2013-01-12.xls');
I am sorry if this a bad format for the question or if this is a dupe, but I didn't have a clue how to make this question more general. Please feel free to suggest improvements!
Your workbook has a hidden sheet in it, and it is that sheet that is being read.
To read the visible sheet, specify the sheet name:
[num,~,raw] = xlsread('n_fot2013-01-12.xls','Förb + prod i Sverige');
To view the the hidden sheet, on the Home tab, in the Cells group, click Format > Visibility > Hide & Unhide > Unhide Sheet. Then select the hidden sheet.
There isn't a way to tell xlsread to only read visible sheets, and by default it reads the first sheet (hidden or not).

SSIS export to Excel template - keep row height

I have a following excel 2007 template (.xlsx):
I have set up an SSIS process to copy that template and populate the first two columns with data as the file will be printed and then signed by order recipients. Everything is going well except for one thing - after the process populates the template with data, the cells don't retain their size - making signature cells too small.
Any ideas on how to force excel to keep the cell heights ?
One idea would be to create a macro that runs when the workbook is opened and it sets the row height using the Range.RowHeight property, here:
https://msdn.microsoft.com/en-us/library/office/ff193926.aspx
If anyone ever has a similar issue, I managed to find a workaround. Instead of using SSIS I'm using SSRS where I keep the cell height by adding an "invisible (white text on white background) column at the end. I set up an SSRS subscription to automatically export the data and send as an Excel.

How to have an SSRS report export to different excel sheets by each subreport?

I have a report that contains several subreports that are very similar to the main/base report. I want each subreport's data to be housed on a separate tab when the user exports the report as Excel.
I found a similar answer here, but it's not subreport-specific (I don't see a "PageBreak" property on Subreports, so the answer there doesn't seem to help me).
How can I cause the exported Excel file to break into separate sheets on each subreport, and with the name of each subreport on its respective sheet or the text property of the label that I place above each subreport?
Place the subreport inside of a rectangle control and set the PageBreak options on the rectangle.

Resources