cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically specify Excel Data Only as my export type?

Former Member
0 Kudos

When I use the CRViewer to view a report and press the Export button, there are options for exporting to Microsoft Excel 97-2000 (XLS) and Microsoft Excel 97-2000 - Data Only (XLS).

How do these map to the ExportOptions? I'm using ExportOptions to programmatically specify the type of export for a report. I can see that there is a formatType setting with values for things like crEFTExactRichText and crEFTPortableDocFormat and crEFTExcel97, etc. Which value do I use for exporting to Microsoft Excel 97-2000 - Data Only? The documentation doesn't list a constant for a 'data only' formatType.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

By trial and error I was able to determine that using crEFTExcel80Tabular will produce the Data Only output I need.

Former Member
0 Kudos

Hi Jackie,


/*Code for Export in Data only*/
{
ReportDocument Rdoc = new ReportDocument();
Rdoc.ExportToDisk(ExportFormatType.ExcelRecord,"C:\\Windows\\temp\\CrystalReport1"));
}

/*Code for Export in Excel format*/
{
ReportDocument Rdoc = new ReportDocument();
Rdoc.ExportToDisk(ExportFormatType.Excel,"C:\\Windows\\temp\\CrystalReport1"));
}

Hope that helps!!

Regards,

Shweta