Jump to content
We've recently updated our Privacy Statement, available here ×

Cells merged in Excel file


tdubovchenko

Recommended Posts

Hi All,

I have a report comprising main report and four subreports which is meant to be exported to Excel file. Each subreport is shown on separate sheet, for some reazon cells are merged in first column on every sheet. All report elemnts have same wdth and aligned properly. How can I avoid this merging? I tried to  use properties:

<property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/>
 <property name="net.sf.jasperreports.print.keep.full.text" value="true"/>
 <property name="net.sf.jasperreports.export.xls.sheet.names.all" value="Detailed summary/Compute details/Logical storage/Physical storage"/>
 <property name="net.sf.jasperreports.awt.ignore.missing.font" value="true"/>
 <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
 <property name="net.sf.jasperreports.export.xls.collapse.row.span" value="true"/>
 <property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
 <property name="net.sf.jasperreports.export.ignore.page.margins" value="true"/>

But they do not make any difference.

What am I missing?

Thank you.

Tania.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Check the comments on http://community.jaspersoft.com/wiki/xls-export-parameters-jasperreports-server to see if that helps.

To see if that helps, at a quick glance your report looks fine in  the allignment, in the XLS expoer it looks like the "Environment" column is the only only one merged. And looking at your JRXML I see that the column header is diferent than the rest it has a textfield that is setting and XLS Column width property (see below) and I think that that one is the culprit.

<textField>
<reportElement uuid="85f1bec4-a998-4e90-a6ac-ef821325013d" x="0" y="0" width="100" height="40" isPrintWhenDetailOverflows="true">
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.column.width" value="100"/>
</reportElement>
<textElement markup="none"/>
<textFieldExpression>
<![CDATA[ "Environment" ]]>
</textFieldExpression>

</textField>

 

Link to comment
Share on other sites

  • 6 months later...

I found that expanding the width of the entire report and shifting cells to the right of the area where the merge happens cleaned it up for me. The columns where the merge happened was reduced to 0 in width and empty when I ran the report again. If you don't mind the extra columns being there as they are all but invisible then this solution is confirmed to work. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...