SAP Knowledge Base Article - Public

1211753 - Exporting to Excel results in shifted columns and extra blank rows

Symptom

Exporting a report to Microsoft Excel causes shifted columns and blank rows to be inserted in the exported file.

Cause

<p>This behavior occurs because exporting to Excel places report objects into cells. Crystal Reports will try to put objects into cells in such a way as to preserve the look of the original report.</p>

Resolution

<p>To improve the appearance of reports exported to Excel, the report must be formatted precisely before exporting. Follow these design and exporting guidelines.</p><div>Enable Snap to Grid:</div><ol start="1"><li>Click <strong>File</strong> &gt; <strong>Options</strong>.</li><li>Click the <strong>Layout</strong> tab, then select <strong>Snap to Grid</strong> in the <strong>Grid Options</strong> section.</li><li><div>Click <strong>OK</strong> to return to the report.</div></li></ol><div>Use guidelines:</div><ol start="1"><li>Click <strong>File</strong> &gt; <strong>Options</strong>.</li><li>Click the <strong>Layout</strong> tab, then click 'Show guidelines in Design' and 'Show guidelines in Preview' in the 'View Options' section.</li><li>Click 'OK' to return to the report.</li><li>Click the horizontal or vertical ruler (above or to the left of the report) where you want to insert a guideline. A new guideline is inserted at the point you clicked. Objects dragged to guidelines 'snap' to them.</li></ol><div>Ensure fields and objects do not overlap:</div><ol start="1"><li>Click the <strong>Design</strong> tab.</li><li><div>Move or resize all objects so that their borders do not touch or overlap.</div></li><li><div>Set all objects in the same row to the same height, and in the same column to the same width.</div></li><li><div>Minimize gaps between objects. Set gaps to the same height and width.</div></li><li><div>Set the width of all objects to the minimum required to display the whole object.</div></li></ol><div>Exporting suggestion:</div><ol start="1"><li>Under <strong>Column Width</strong>, choose <strong>Column width based on objects in the</strong> and then select the section that contains the widest objects (such as Details or a Group Footer).</li></ol><table border="0" cellpadding="5" style="width: 100%; border-collapse: collapse"><tbody><tr><td style="vertical-align: top; width: 70px; border: black 1px solid"><p align="center"><strong>NOTE</strong></p></td><td style="vertical-align: top; border: black 1px solid"><p>If no particular section contains the majority of the report data, select the <strong>Constant Column Width</strong> option and experiment with widths.</p></td></tr></tbody></table>

See Also

For more information about exporting to Excel, refer to the article Crystal Reports Designer Version 10: Exporting to Microsoft Excel on SCN. (The article is specific to Crystal Reports 10; however, the principles are equally valid for CR XI r1, r2, CR2008 and higher versions .)

Keywords

EXCEL EXPORT EXPORTING ALIGNMENT COLUMN ROW BLANK FORMATTING FORMAT Seagate Crystal Reports Exporting to to any version of Excel Columns change position and extra blank rows are inserted , c2006244 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013 ; SAP Crystal Reports XI ; SAP Crystal Reports XI R2