<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>渡//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br><br> <br> ;新文件<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 table = document.all.data; <BR> varhang = table.rows.length <BR> varhang = table.rows.length <o > var lie = table.rows(0).cells.length; <BR><<//逐個儲存格新增表格標題。 <BR>For (i=0;i<hang;i ) <BR>{ <BR>for (j=0;j<lie;j ) <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>//--><br><br> ><br> <br> <br> <br><br><td>; 姓名<br> </td> <td colspan="2">年齡</td> <br><td>出生日期</td> <br><br> <tr> <br><td>6</td> <br><td>25</td> <br><td colspan="2">8</td> <br><br></tr> <tr> <br><td height="22">1</td> <br><td height="22">2</td> <br> <td colspan="2" height="22">4</td> <br><br><br><input type="button" name=" out_excel" onclick="AutomateExcel();" value="匯出至excel" class="notPrint"><br> <br><br> </tr> </div>