cancel
Showing results for 
Search instead for 
Did you mean: 

Export to excel 2007

Former Member
0 Kudos
136

Hi,

i've create a report that I need to export in excel 2007.

If I export the report to Excel 2003 it works correctly.

If I export the report to Excel 2007-2010 (format ExcelWorkbook) it works but it lose the format style.

It's my mistake or is impossible to export a report automatically to excel 2007-2010?

I use CR for Visual Studio 2010 and CR Runtime 13.0.1.

Thks for your help.

Sacha

This is my code

var exlOption = new ExcelFormatOptions { ShowGridLines = true };

rpt.ExportOptions.ExportFormatType = ExportFormatType.Excel;

rpt.ExportOptions.FormatOptions = exlOption;

rpt.ExportToDisk(ExportFormatType.Excel, fileName); //it work correctly for Excel 2003

//ExportFormatType.ExcelWorkbook (if I try to export for Excel 2007-2010

rpt.Close();

rpt.Dispose();

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Can you post a link to screen shots of your report exported to Excel 2003 and Excel 2007-2010?

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Former Member
0 Kudos

Hi Ludek,

this are the two screens.

[Excel 2003|http://www.sjmatasci.ch/screen/Export_excel_2003.png]

[Excel 2007|http://www.sjmatasci.ch/screen/Export_excel_2007.png]

You see the same data, but the xlsx is not "styled" and xls is perfect styled.

Thks for the help.

Sacha

Answers (1)

Answers (1)

Adam_Stone
Active Contributor
0 Kudos

If you look at the developers guide in the what's new section, you will see that it mentions that the New format is data-only. It is essentially the same as the excel data-only option that was there prior, just now supports the new format. Having an option to export to the new format while keeping the formatting of the report sounds like a good idea to post onto Idea Place (link in the banner at the top of the page).