Merged Cells Problem in Excel Export
Hi all,
I have a basic matrix report but whenever I export this report to Excel, some of the cells end up becoming merged. Is there any way to avoid this using Reporting Services instead of formatting the cells directly in Excel?
Any help is greatly appreciated!
December 3rd, 2007 8:31pm
No, that has been an ongoing thread on SSRS. If you have a page header/footer, try disabling it and see if that helps the merged cells issue.
In SSRS2008, the Excel export is being upgraded, from what I understand.
BobP
Free Windows Admin Tool Kit Click here and download it now
December 3rd, 2007 8:52pm
Is there an alternative way to set up the report with the same results but fixing the merged cell problem?
December 4th, 2007 5:13pm
The following blog post and comments provide the solutions that may work for you.
http://blogs.msdn.com/chrisbal/archive/2006/07/08/659545.aspx
Key points from the post:
Make sure the left and right edges of allreport items line up with one another. This is the #1 cause of merged cells. Referring to the example above, if the headerTextbox's left and right edges lined up precisely with the width of the first table column, the merge would not be necessary. This technique should solve this problem for the majority of cases.
Even if you do line up everyting precisely, you may find in some rare cases that there are still some columns merged. This could bedue to internal rounding and unit conversion issues when we lay out the Excel worksheet at render time. Report Definition Language allows you to specify position and size values in a number of different measurement units such as inches, pixels, centimeters, and points. But, internally the Excel format wants everything to be in points. To minimize the amount of conversion that we have to do at render-time to change your inches and centimeters to points, consider specifying all of your measurments in points for the most direct results. One inch is 72 points. This is a much rarer case, so consider following this step if the technique described in #1 still does not solve your problem. This will be substantially improved in the next version of Reporting Services.
Use the third-party report design and rendering tool SoftArtisans OfficeWriter. Using OfficeWriter, reports are designed using Excel as the authoring tool and the Excel document itself becomes the report layout definition. Because you are both designing and delivering in Excel,you can achieve preciseExcel layout.
Config file change options:
Merged cells were present mostly in the regions which is interfering with left and right edges of report items in report header.
So i tried to keep the header into excel header. This can be done by including SimplePageHeaders=true in device info. Another tips is to remove the blank columns by adding RemoveSpace item in device info.
A sample of reconfiguring device info thro Reportserver.config is pasted below.
<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering">
<Configuration>
<DeviceInfo>
<SimplePageHeaders>true</SimplePageHeaders>
<RemoveSpace>0.012in</RemoveSpace>
</DeviceInfo>
</Configuration>
</Extension>
Free Windows Admin Tool Kit Click here and download it now
December 6th, 2007 1:35am
How can I change the default configuration of the rendering settings of ReportViewer component?
May 5th, 2009 12:39pm
The following blog post and comments provide the solutions that may work for you.
http://blogs.msdn.com/chrisbal/archive/2006/07/08/659545.aspx
Key points from the post:
Make sure the left and right edges of allreport items line up with one another. This is the #1 cause of merged cells. Referring to the example above, if the headerTextbox's left and right edges lined up precisely with the width of the first table column, the merge would not be necessary. This technique should solve this problem for the majority of cases.
Even if you do line up everyting precisely, you may find in some rare cases that there are still some columns merged. This could bedue to internal rounding and unit conversion issues when we lay out the Excel worksheet at render time. Report Definition Language allows you to specify position and size values in a number of different measurement units such as inches, pixels, centimeters, and points. But, internally the Excel format wants everything to be in points. To minimize the amount of conversion that we have to do at render-time to change your inches and centimeters to points, consider specifying all of your measurments in points for the most direct results. One inch is 72 points. This is a much rarer case, so consider following this step if the technique described in #1 still does not solve your problem. This will be substantially improved in the next version of Reporting Services.
Use the third-party report design and rendering tool SoftArtisans OfficeWriter. Using OfficeWriter, reports are designed using Excel as the authoring tool and the Excel document itself becomes the report layout definition. Because you are both designing and delivering in Excel,you can achieve preciseExcel layout.
Config file change options:
Merged cells were present mostly in the regions which is interfering with left and right edges of report items in report header.
So i tried to keep the header into excel header. This can be done by including SimplePageHeaders=true in device info. Another tips is to remove the blank columns by adding RemoveSpace item in device info.
A sample of reconfiguring device info thro Reportserver.config is pasted below.
<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering">
<Configuration>
<DeviceInfo>
<SimplePageHeaders>true</SimplePageHeaders>
<RemoveSpace>0.012in</RemoveSpace>
</DeviceInfo>
</Configuration>
</Extension>
Is this solution for report viewer??? or can i make this change for the report server too?
Free Windows Admin Tool Kit Click here and download it now
May 5th, 2009 4:41pm
These instructions are for server reports. My reports are local and ReportViewer 2005 shows them. Is there any configuration file for web based ReportViewer component?
May 6th, 2009 7:30am
There is a very simple technique, just use the width of all text boxes,rectangles and any thing whatever you are using in round figure. e.g. don't use like this: 1.2451in and like this : 2.44758in, 1.7584in You must use all width in round figure like this: in comparison to 1.245in use: 1.3in and put the next text box adjacent to it. and same way don't use 2.44758in : use 2.5 and put the location of next box on the bases of width of earlier text boxes. Use this be confidently. Thanks! Abdul Aziz
Free Windows Admin Tool Kit Click here and download it now
September 25th, 2009 3:44pm
I had a similar problem. My users would export reports to Excel and then want to sort them in various ways. Sorting in Excel didn't work because of the merged fields.It turned out that, for our reports, the merged cells were being caused mostly by the report headers and footers. We have developed report templates containing standard headers and footers (as well as database connections, etc.) that we use as a starting point for new reports. Additionally, we usually add a report legend textbox to the body before the first table or matrix to identify the parameters used to run the report. These were causing the merged cells when exported to Excel, not the tables or matrixes.I developed a cheap and dirty solution for reports that I knew will be primarily exported to Excel. I get rid of the footer (it won't export anyway). Then I copy everything in the header to the top of the body and get rid of the header. Just before the first table or matrix, I add a textbox message saying that report data begins on page 2. I open the properties dialog of the first table or matrix and select the 'Add a page break before' checkbox.This way, when the report is exported to Excel, the header stuff and legend appear in the first sheet, while the report data appears in the second, separate sheet. Since the second sheet was generated solely from a table or matrix, there will not be any merged fields.When the report is run in Report Manager or exported to PDF, the data begins on page 2 (hence the message). The downside is that the report header only appears on the first page.
November 6th, 2009 12:16am
Abdul Aziz's method of using rounded numbers worked for me. I rounded all my column widths to one decimal point
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2009 8:03pm
Thanks Abdul, this is the simplest method. Its a good post from SQLMonger66 too...keep posting.
April 1st, 2011 9:38am