cancel
Showing results for 
Search instead for 
Did you mean: 

CrystalDecisions.[Shared].ExportFormatType for Microsoft office 2010

Former Member
0 Kudos

Hi


we are working in VS 2012,  and we have microsoft office 2010 installed in our machine, using Crystal report 13.0.7 version

in our code we are using the below code for viewing/uploading and downloading .doc and .xls file

CrystalDecisions.[Shared].ExportFormatType.WordForWindows

Me.Response.ContentType = "application/msword"

"Content-Disposition", "attachment; filename=" & FileName & ".doc")

but we want to replace .doc with .docx and .xls with .xlsx.

So can you please suggest the exportformattype to be used for .docx and .xlsx.

Another issue that i am facing on opening the .docx document.

Error is as follows 'The File 'Filename.docx' cannot be opened because there are problems with the contents'

If one tries to download the same MS Word (2010) claims that the document was broken. But if you click through the repair dialogs, the document could be 'recovered'.

But in the recorded http request/response data I see a mime type of 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' which is correct. 

The error appears not only if you directly open the document, it 'persists' with the saved document if you choose to save the file to disk and open it later. If you open the file from disk after download the error appears too.

Regards,

Praseeda

Message was edited by: Praseeda Prathap

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hi Praseeda

I will answer your 1st question here. For the second question, as per the Rules of Engagement, please create a new Discussion.

Re export to XLSX, see KBA: 1645531 - Export to Excel (2007 - 2010) - ExcelWorkbook (XLSX) loses format style

For more details see

For application samples see: Crystal Reports for .NET SDK Samples - Business Intelligence (BusinessObjects) - SCN Wiki

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Answers (0)