Knowing the right EXCEL export type to use

Posted on 2002-07-22
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 100

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 100

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 85 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 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

821 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