Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
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…

719 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