File open in excel version 2013 but not on 2016?
Asked Answered
C

1

9

I am sending the html content as excel from my webserver server with the following headers

    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment;filename=test.xls");

I am able to open the file on excel version 2013 but not on 2016. On 2016 version, it says The file is corrupt and can not be opened however once I activate File > Properties > Security> Unblock the file opens up ? Is there any header or other setting where I can specify to unblock security (or other configuration) so that I am able to open the excel file like I do on 2013 ?

Cupric answered 14/10, 2016 at 7:46 Comment(4)
Have you tried changing to xlsx format?Elizabethelizabethan
@Elizabethelizabethan i did try that but that does not work tooCupric
I don't have 2016 here to test but there seems to be some good reports of this fix (albeit for Word the settings are the same in Excel). blog.lekman.com/2012/10/…Buddybuderus
Have you tried sending an excel file created in 2016? Would be good to know if this is about the content you are sending - if you generated it, it could actually contain xml errors - or just a header issue.Righteousness
E
2

The security settings are set in Excel: not in the workbook. Check File/Options/Trust Centre. You need to compare the settings in both 2013 and 2016. Possibly External Content or File Block settings.

At a guess, 97-2003 workbooks are blocked.

Elizabethelizabethan answered 15/10, 2016 at 10:45 Comment(1)
Its exactly same.Cupric

© 2022 - 2024 — McMap. All rights reserved.