Copy Code code as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title> New Document </title>
<meta name= "generator" content= "EditPlus"/>
<meta name= "Author" content= ""/>
<meta name= "keywords" content= ""/>
<meta name= "description" content= ""/>
<script language= "JavaScript" >
<!--
function Automateexcel ()
{
Start Excel and get Application object.
var oXL = new ActiveXObject ("Excel.Application");
Get a new workbook.
var owb = OXL.Workbooks.Add ();
var osheet = Owb.activesheet;
var table = Document.all.data;
var hang = table.rows.length;
var lie = table.rows (0). Cells.length;
ADD table headers going cell by cell.
for (i=0;i{
for (j=0;j<lie;j++)
{
Osheet.cells (i+1,j+1). Font.Bold = True
Osheet.cells (i+1,j+1). Font.Size = 50
Osheet.cells (i+1,j+1). Alignment = 2
Osheet.cells (i+1,j+1). Value = Table.rows (i). Cells (j). innertext;
}
}
oXL.Visible = true;
Oxl.usercontrol = true;
}
-->
</SCRIPT>
<body>
<table border= "1" width= "100%" id= "Data" >
<tr>
<td> name </td>
<TD colspan= "2" > Age </td>
<td> Birth date </td>
</tr>
<tr>
<td>6</td>
<td>25</td>
<TD colspan= "2" >8</td>
</tr>
<tr>
<TD height= ">1</td>"
<TD height= ">2</td>"
<TD colspan= "2" height= ">4</td>"
</tr>
</table>
<input type= "button" Name= "Out_excel" onclick= "Automateexcel ();" value= "Export to Excel class=" Notprint ">
</body>