Skip to Content

Format an Excel export using Crystal Reports

If you are generating a downloadable report out of Vinyl that is an Excel workbook file type, Crystal Reports can be used to generate and format the Excel file.

Export process

Note that this export process is useful in instances where the standard export format does not achieve the results you are looking for. The process involves setting up a Crystal Reports page in Vinyl following the standard process and uploading the completed Crystal Report back to that resultant page. Once it is confirmed that the Crystal Report runs properly on the page, an export process can be used to convert the PDF that Crystal Report generates into an Excel workbook. This can be done by creating an Event that uses the Plugin Save Report along with creating a Business Rule in the Parameter table that specifies the following columns:

  • reportGuid
  • filName
  • exportFormatType

This is where the file name and file type being downloaded get specified. In this case an Excel Workbook is the desired file format. The reportGuid is the guid from the Crystal Report page that is run. This can be found by going to that page and selecting Design this page, clicking Edge Case Settings and copying the controlID in the URL. For more information regarding the use of the Save Report Plugin, refer to the article "plugin save report".

Formatting the Excel file using Crystal Reports

Placing text and data fields into their own sections ensures they will be placed into separate rows in the Excel file (Fields placed in the same section will be displayed in the same row in Excel)

Img 2

Use blank fields to adjust spacing in Excel sheet (Using a blank field as the first field in a section can allow the data fields to start at Column B instead of Column A as they otherwise would)

Img 3

Placing sub reports into different sections allows them to dynamically grow in Crystal Reports without overlapping each other, this carries over into the Excel file

Img 4

Formatting of data fields in Crystal Reports carries over into the Excel file

Img 5


This Crystal Report...

Img 6

Looks like this when exported to Excel:

Img 7

Limitations and unknowns

  • Formatting of text does not seem to carry over from the Crystal Report to Excel file. In the export from Crystal Report PDF to the Excel file, Excel appears to bring in everything as plain text from the PDF only keeping the formatting of data fields.
  • Boxes and lines do not appear in the Excel file, only text and data fields
  • Not able to pass in font colors using this method