ContentType: application/vnd.ms-excel 即可!!
以下為 asp 程式的範例:
代碼: 選擇全部
<%@ Language=VBScript %>
<%Response.ContentType = "application/vnd.ms-excel"%>
<TABLE>
<TR>
<TH>Col 1</TD>
<TH>Col 2</TD>
<TH>Total</TD>
</TR>
<TR>
<TD>1</TD>
<TD>2</TD>
<TD><FONT color=#000080>=sum(a2:b2)</FONT></TD>
</TR>
<TR>
<TD>4</TD>
<TD>6</TD>
<TD><FONT color=#000080>=sum(a3:b3)</FONT></TD>
</TR>
</TABLE>