Solved

Knowing the right EXCEL export type to use

Posted on 2002-07-22
4
549 Views
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.

Thanks,
dreenaj
0
Comment
Question by:dreenaj
  • 2
4 Comments
 
LVL 100

Expert Comment

by:mlmcc
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
mlmcc
0
 

Author Comment

by:dreenaj
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?

dreenaj
0
 
LVL 100

Expert Comment

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

http://support.crystaldecisions.com/library/kbase/articles/c2009646.asp

mlmcc
0
 
LVL 4

Accepted Solution

by:
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 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.

http://support.crystaldecisions.com/communityCS/TechnicalPapers/scr_exportexcel.pdf


Goodluck,
jrmn


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

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…
This video discusses moving either the default database or any database to a new volume.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now