I create an excel file in ASP with:
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "attachment; filename=excel.xls"
Response.ContentType = "application/download"
It's possible to SAVE the xls file on server - to download next?
another question - When I open the xls file on excel I receive an error about the file format. why?
the code:
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<style>
<!--
@page
{
mso-header-data:"&CDate\: &D\000A<%=strHeader%>";
mso-footer-data:"&CPage &P";
mso-page-orientation:landscape;
margin:1in .3in .6in .4in;
}
br
{
mso-data-placement:same-cell;
mso-width-source:auto;
}
.wborder {
border-color: #FFF;
}
-->
</style>
<!--[if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>EXCEL</x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo/>
</x:Print>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
</x:Pane>
</x:Panes>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><![endif]-->
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
<table border="1">
<tr>
<td class="wborder" width="100"></td>
</tr>
</table>
</body>
</html>
tks!!