The snippet below is used to download a file, with extension is xls. After exporting, the downloaded file is not opening in Excel 2013 or previous versions, nor in Office 365, until I unblock the file from its properties. It is opening only in MS Excel 2016. Can some please help me how to resolve this and how to make it to open in "Protected View" by default?
Actually yesterday I got the issue. Without HTML tags it exports properly. If I add HTML tags, it causes the issue.
<cfheader name="Content-Disposition" value="attachment; filename=xyz.xls">
<cfcontent type="application/vnd.ms-excel">
<cfoutput> <table border='1'> <tr> <td>123</td> <td>456</td> <td>789</td></tr> </table> </cfoutput>