生成Excel文件范例(1):客户端

发表于:2007-07-14来源:作者:点击数: 标签:
输入页面的代码: ------------------------------- !DOCTYPE HTML PUBLIC -//W3C//D TD HTML 4.01 Transitional//EN html head meta http-equiv=Content-Type content=text/html; charset=gb2312 title无标题文档/title /head body form name=form1 method=p
输入页面的代码:
-------------------------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<form name="form1" method="post" action="showExcel.php">
  <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td>名称</td>
      <td>地址</td>
      <td>QQ号</td>
      <td>电子邮件</td>
    </tr>
    <tr>
      <td><input name="data[0][username]" type="text" id="data[0][username]"></td>
      <td><input name="data[0][add]" type="text" id="data[0][add]"></td>
      <td><input name="data[0][qq]" type="text" id="data[0][qq]"></td>
      <td><input name="data[0][email]" type="text" id="data[0][email]"></td>
    </tr>
    <tr>
      <td><input name="data[1][username]" type="text" id="data[1][username]"></td>
      <td><input name="data[1][add]" type="text" id="data[1][add]"></td>
      <td><input name="data[1][qq]" type="text" id="data[1][qq]"></td>
      <td><input name="data[1][email]" type="text" id="data[1][email]"></td>
    </tr>
    <tr>
      <td><input name="data[2][username]" type="text" id="data[2][username]"></td>
      <td><input name="data[2][add]" type="text" id="data[2][add]"></td>
      <td><input name="data[2][qq]" type="text" id="data[2][qq]"></td>
      <td><input name="data[2][email]" type="text" id="data[2][email]"></td>
    </tr>
    <tr>
      <td><input name="data[3][username]" type="text" id="data[3][username]"></td>
      <td><input name="data[3][add]" type="text" id="data[3][add]"></td>
      <td><input name="data[3][qq]" type="text" id="data[3][qq]"></td>
      <td><input name="data[3][email]" type="text" id="data[3][email]"></td>
    </tr>
    <tr>
      <td><input name="data[4][username]" type="text" id="data[4][username]"></td>
      <td><input name="data[4][add]" type="text" id="data[4][add]"></td>
      <td><input name="data[4][qq]" type="text" id="data[4][qq]"></td>
      <td><input name="data[4][email]" type="text" id="data[4][email]"></td>
    </tr>
    <tr>
      <td><input name="data[5][username]" type="text" id="data[5][username]"></td>
      <td><input name="data[5][add]" type="text" id="data[5][add]"></td>
      <td><input name="data[5][qq]" type="text" id="data[5][qq]"></td>
      <td><input name="data[5][email]" type="text" id="data[5][email]"></td>
    </tr>
    <tr>
      <td><input name="data[6][username]" type="text" id="data[6][username]"></td>
      <td><input name="data[6][add]" type="text" id="data[6][add]"></td>
      <td><input name="data[6][qq]" type="text" id="data[6][qq]"></td>
      <td><input name="data[6][email]" type="text" id="data[6][email]"></td>
    </tr>
    <tr>
      <td><input name="data[7][username]" type="text" id="data[7][username]"></td>
      <td><input name="data[7][add]" type="text" id="data[7][add]"></td>
      <td><input name="data[7][qq]" type="text" id="data[7][qq]"></td>
      <td><input name="data[7][email]" type="text" id="data[7][email]"></td>
    </tr>
    <tr>
      <td><input name="data[8][username]" type="text" id="data[8][username]"></td>
      <td><input name="data[8][add]" type="text" id="data[8][add]"></td>
      <td><input name="data[8][qq]" type="text" id="data[8][qq]"></td>
      <td><input name="data[8][email]" type="text" id="data[8][email]"></td>
    </tr>
  </table>
      
    <input type="submit" name="Submit" value="Excel查看">
</form>
<a href="show_source.php" target="_blank">查看程序代码</a>
</body>
</html>

原文转自:http://www.ltesting.net