1

I have develop a report and export as excel file. When download that excel file it can not open in microsoft excel. it shows unknown file format. When export in pdf it open in adobe reader directly. Why the excel file not open directly.

Singaravelan
  • 809
  • 3
  • 19
  • 32

2 Answers2

2

Use Fiddler or the IE developer tools to examine the Content-Type header of the HTTP response. It should be: `Content-Type: application/vnd.ms-excel' (see here).

Also, look for a header like Content-Disposition: attachment; filename=foo.xls. If no such header is present, consider adding one.

Community
  • 1
  • 1
EricLaw
  • 56,563
  • 7
  • 151
  • 196
0

I solved using open windows explorer->Tools->Folder Option-> select "File Types" tab -> click on "New" button and Click on "Advanced" button provide the extension and choose Microsoft Office excel application ->OK(twice)

That's it.

Singaravelan
  • 809
  • 3
  • 19
  • 32