Go Premium for a chance to win a PS4. Enter to Win


Knowing the right EXCEL export type to use

Posted on 2002-07-22
Medium Priority
Last Modified: 2013-12-03
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.

Question by:dreenaj
  • 2
LVL 101

Expert Comment

ID: 7169280
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

Author Comment

ID: 7170952
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?

LVL 101

Expert Comment

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



Accepted Solution

jrmn earned 340 total points
ID: 7181603
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 wider...it 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.




Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question