'How to avoid JasperReport's report row split in Excel?

I am generating Excel report using jasperreports-6.1.0.jar. I am getting row split issue in excel when text field length is more than 220 characters.

enter image description here

JRXML details:

        <textField isStretchWithOverflow="true" isBlankWhenNull="true">
            <reportElement uuid="55da47e9-de3c-45ac-9b42-c0b9ee2bdcce" style="Sans_Normal" positionType="Float" stretchType="RelativeToTallestObject" x="775" y="0" width="27" height="70" isPrintInFirstWholeBand="true" isPrintWhenDetailOverflows="true">
                <property name="net.sf.jasperreports.export.xls.auto.fit.column" value="true"/>
                <property name="net.sf.jasperreports.export.xls.auto.fit.row" value="true"/>
                <property name="net.sf.jasperreports.export.xls.wrap.text" value="true"/>
            </reportElement>
            <box>
                <leftPen lineWidth="0.5"/>
                <bottomPen lineWidth="0.5"/>
                <rightPen lineWidth="0.5"/>
            </box>
            <textElement>
                <font size="10"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{annotationValue}]]></textFieldExpression>
        </textField>

I added below jrxml property for entire report:

<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows" value="true"/>
<property name="net.sf.jasperreports.export.xls.white.page.background" value="false"/>
<property name="net.sf.jasperreports.export.xls.wrap.text" value="true"/>
<property name="net.sf.jasperreports.print.keep.full.text" value="true"/>


Solution 1:[1]

I had the same problem. Unfortunately, all attempts to use the properties to solve the problem have been unsuccessful.

I solved the problem by setting the Split Type property of the Detail section to Prevent.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 zajonc