Crystal Reports Online Training

Learn Online, Anytime, Anywhere

Step-by-step tutorials and online videos.

Click Here To Learn More »

19.07 Exporting to Excel

Exporting to Excel

Exporting a report to an Excel spreadsheet gives you options to work with the report areas and how the columns are formatted. The columns can be formatted so that they have headers and that they are all the same width. Table 19-5 shows the properties used for setting the Excel formatting.

Table 19-5. ExcelFormatOptions Properties.

Property Description
ExcelAreaGroupNumbe The base area group number if the area type is group area.
ExcelAreaTyp The area type if you aren’t using constant column width.
ExcelConstantColumnWidt The width of each column (if using constant column width).
ExcelTabHasColumnHeading Boolean that determines if the columns have headings listed.
ExcelUseConstantColumnWidt Boolean that determines if the columns are the same width.

The following listing is very similar to the previous listing. It first creates an ExportOptions object variable, myExportOptions, and tells it that the export file will be saved to a disk file using the the DiskFileDestinationOptions object. The difference is that the format options object is specific to Excel and sets the properties listed in Table 19-5. After setting those properties, it calls the Export() method as the previous listing did.

Listing 19-2. Setting the format to be an Excel...

Get UNLIMITED Crystal Reports Online Training!

Click Here To Start Your Training!

1500+ Tutorial Pages

Complete Crystal Reports Online Training with over 1,500 pages of better than book quality Crystal Reports tutorials.

Step-by-step Online Videos

Learn at your own pace from the comfort of your home! Pause, rewind and watch online training videos anytime!

Online Community

Members-only community where you can post and answer questions. The community is checked on a regular basis by best selling Crystal Reports book author Brian Bischof to help answer your questions.

Cut & Paste Source Code

Save time with simple cut and paste source code you can use right now in your next report!

Click Here To Start Your Training!