<div class="codetitle"> <span><a style="CURSOR: pointer" data="22999" class="copybut" id="copybut22999" onclick="doCopy('code22999')"><u>复代码码</u></a></span> 代码如下:</div> <div class="codebody" id="code22999"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 전환//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br><html xmlns="http://www.w3.org/ 1999/xhtml"><br> <head><br> <제목> 새 문서 </title><br> <meta name="generator" content="editplus" /><br> <meta name="author" content="" /><br> <meta name="keywords" content="" /><br> <meta name="description" content="" /><br> <SCRIPT LANGUAGE="javascript"> <br> <!-- <BR> function AutomateExcel() <BR> { <BR> // Excel을 시작하고 Application 개체를 가져옵니다. <BR> var oXL = new ActiveXObject("Excel.Application"); <BR> // 새 통합문서를 받으세요. <BR> var oWB = oXL.Workbooks.Add(); <BR> var oSheet = oWB.ActiveSheet; <BR> var 테이블 = document.all.data; <BR> var hang = table.rows.length; <BR> var lie = table.rows(0).cells.length; <BR> // 셀 단위로 테이블 헤더를 추가합니다. <BR> for (i=0;i<hang;i ) <BR> { <BR> for (j=0;j<lie;j ) <BR> { <BR> //oSheet.Cells(i 1, j 1).Font.Bold = True <BR> //oSheet.Cells(i 1,j 1).Font.Size = 50 <BR> //oSheet.Cells(i 1,j 1).Alignment = 2<BR> oSheet.Cells(i 1,j 1).value = table.rows(i).cells(j).innerText; <BR> } <BR> } <BR> oXL.Visible = true; <BR> oXL.UserControl = true; <BR> } <BR> //--><br> </SCRIPT><br> </head><br><br> <br> <body><br> <표 테두리= "1" width="100%" id="data"><br> <tr><br> <td> 姓name</td><br> <td colspan="2">年龄</td><br> <td>日期</td><br> </tr><br> <tr><br> <td>6</td><br> <td>25</td><br> <td colspan="2">8</td><br> < ;/tr><br> <tr><br> <td height="22">1</td><br> <td height="22">2</td><br> <td colspan="2" height="22">4</td><br> </tr><br> </table><br><input type="button" name=" out_excel" onclick="AutomateExcel();" value="导take到excel" class="notPrint"><br> </body><br></html><br> </div>