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 ?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With