Columns get shifted in Excel file exported from a ASP Page using Crystal Report 9

In my ASP application there is a provision for PDF and Excel File Export. This is done with the help of Crystal Report 9. I am Using the same Crystal report file for both PDF export and Excel Export. In PDF export it works fine. But in Excel export the format of columns  get   changed and data comes in improper colums, and it is not same as PDF File. What may be the Problem??.  
Who is Participating?
Hi winsoftech,
I guess it's the same problem that everybody else has with exporting to XL from CR.(:-)

I don't know anything about ASP and CR but in the CR UI there is an option 'Excel (Extended) ' in the export formats; this usually produces a slightly better result than the plain Excel option, and there might be (don't have V9 here at the moment)  a 'Data Only' option, which is OK  for creating a straight rows and columns  output but has no formatting.
There is a way to format a CR to export perfectly to excel.  Here are a list of things I do.

1.  Make sure that all columns are the same width.
2. Make sure that there is no more than the very minimum space between the cells.  Typically what I see in development is that the columns are just place on the report and expanded to the full lenght of the column.  You do not need to do this if it is going into excel and you are worried about space.  
3.  If you require a space between two column than apply the following. For CR 9 or low: add a text box>type in the word "space"> then right click>go to the general tab>click on suppress. For CRXI: Insert a blank text box.  
4. Make sure that everything is left justified.  You may need to modify a column to right but if the above is set up correctly you should not have to worry about this.

Again the key to excel is everything must match up.  I have found that organizing the report like things helps the application understand where to put the data.

Hope this helps.
To expand on the previous comments, here is a document from Crystal with help on how to format a report for exporting to Excel.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.