asp導出excel的文件,附加php的方法
[
2008/09/10 15:53 | by Else ]
2008/09/10 15:53 | by Else ]
<% Response.ContentType = "application/vnd.ms-excel" %>
<table width="164" height="61" border="1">
<tr>
<td align="center">編號</td>
<td align="center">姓名</td>
</tr>
<tr>
<td align="center">6</td>
<td align="center">Else</td>
</tr>
</table>
<table width="164" height="61" border="1">
<tr>
<td align="center">編號</td>
<td align="center">姓名</td>
</tr>
<tr>
<td align="center">6</td>
<td align="center">Else</td>
</tr>
</table>
看asp代碼的部分是不是很簡單?
相對而言 php的導成excel的代碼
Excel to DataGridView using excel 2007
[
2008/06/20 17:14 | by Else ]
2008/06/20 17:14 | by Else ]
object oMissing = Missing.Value;
Microsoft.Office.Interop.Excel.Application ExcelObj =
new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook WBook;
Microsoft.Office.Interop.Excel.Worksheet WSheet;
Microsoft.Office.Interop.Excel.Range Selection;
WBook = ExcelObj.Workbooks.Open(@"c:\test\1.xlsx",
oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, oMissing);




