Knowing the right EXCEL export type to use

Hi Experts,

I wanted to export a 15-column report to EXCEL. I need some info on the following questions:

1. What excel export type will I use for excel 2000. I can also see excel2 to excel8. I'm using Crystal 8.5 running under MSSQL 2000.

2. I wanted to set the exported excel format be on Landscape (or maybe can switch from either portrait or landscape). I'm a bit confused because the RPT I designed will be printed (if the user prints it) in portrait orientation but when I export it to excel, it seems it won't fit anymore on portrait layout...and that it seems I need to change the orientation to landscape inorder to have all the columns printed on a single bond paper. Is there a way to do this?

Please show me a Delphi or VB code how to this if this is possible.

Who is Participating?
Hi Dreenaj,

I did something like this before and mlmcc is right,I find that Excel 8 extended is fine for exporting rpt to Excel 2000.
About your problem with orientation it could be because the font in Excel is slightly larger and so the columns are may be also that the margins could be bigger or something.

What I did before was simply go into Excel and in preview click on setup then choose Fit to 1 page wide and and 0 long (will then grow to what it needs.) You could also alter the margins here if you want.

Another option would be to create a macro inside excel 2000 to do all these things (settings you wanted) automatically and then make it available to the user(s). They will only have to click on it afterwards.

It's not hard to do a macro in Excel. First, export your crystal report to excel. Then go to Tools, Macro, record new macro and give it a name. You will then need to save the macro to a new workbook that you can distribute to your users (or put in a shared area accessable by all users). Then all you need to do is to do all the steps needed to get your report to look as required. Then click on the stop button that is on the screen. Your macro has been recorded. You can then test it by resending the data from the crystal report into excel and click on Tools, macro, click on your new macro and Run....that will be all then.

A macro can be assign to a button or better yet to a keyboard shortcut. For further info, check the help files...I find it very easy to understand. Just remember that user(s) need to open the Macro Workbook before they can run/use  it.

Additionally, take a look at this PDF file (click the link below). This will guide you how to properly setup your rpt to get the best result when you export it to excel.


I believe Excel8 is Excel 97.  I suspect Excel9 will be Excel 2000.

There is a PaperOrientation option on the CR object in VB.
With the Crystal Viewer the code is

CRobj.PaperOrientation = crLandscape

good luck
dreenajAuthor Commented:
Hi mlmcc,

It seems I can only use excel8 at my end.
Could this be a case of old export dll or something?
If this is the case, can you tell me where to download an update file that will support excel9?

Further research on the Crystal web site indicates Excel8 is the correct export engine for Excel 2000.

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.