Copie o código do código da seguinte forma:
<!
<html xmlns = "http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv = "content-type" content = "text /html; charset = gb2312" /> />
<title> Documento não -título </ititle>
<Script Language = "JavaScript">
Função automateWordAUTOPAGING (Prefixion, contagem)
{{
var prado = new ActiveXObject ("word.application");
var odc = owd.documeents.add ();
Odc.show Grammaticalrrs = false;
Odc.showspellinger = false;
var Orange = odc.Range (0,1);
para (i = 0; i <contagem; i ++)
{{
var sel = document.body.createTexTrange ();
var tableName = prefixion+i;
var tabela = document.getElementById (Tableename)
Sel.movetoElementText (tabela);
Sel.Select ();
sel.execCommand ("cópia");
OWD.SELECTION.PASTE ();
OWD.SELECTION.INSERTBAN ();
}
//owd.activedocument.activewindow.view.type=3 // Defina o modo de navegação
owd.visible = true;
};
Função automateexcel (prefixão)
{{
var elim = document.getElementById ("AutomateExcel");
var orangeRef = document.body.createTexTrange ();
Orangef.MovetoEELEMENTTEXT (ELTABLE);
Orangef.execCommand ("cópia");
tentar {
Var appExcel = new ActiveXObject ("Excel.Application");
} captura (e)
{{
alerta ("无法调用 Office 对象 , 请确保您的机器已安装了 Office 并已将本系统的站点名加入到 ie 的信任站点列表中!");
Retornar;
}
AppExcel.visible = true;
AppExcel.workbooks.add ().
AppExcel.Workbooks (1) .Worksheets.item (1) .Columns ("A: A").
//appexcel.workbooks (1) .worksheets.item (1) .columns.com.com
AppExcel = NULL
};
</script>
</head>
<Body>
<input type = "button" value = "export to word paging automático" onclick = "automatewordAutopaging ('tabela', 5)" />
<input type = "button" value = "Exportar para a largura da coluna de controle do Excel" onclight = "AutomateExcel ('tabela')"/>/>
<div id = "AutomateExcel">
<Tabela class = tabp id = "tabela 0" CellSpacacing = 0 CellPadding = 2 alinhamento = borda central = 1>
<tr>
<Td align = "Center"> Título 0 </td>
</tr>
<tr>
<Td align = "Center"> Conteúdo 0 </td>
</tr>
</Tabela>
<br>
<Tabela class = tabp id = "Tabela1" CellSpacacing = 0 CellPadding = 2 alinhamento = borda central = 1>
<tr>
<Td align = "Center"> Título 1 </td>
</tr>
<tr>
<Td align = "Center"> Conteúdo 1 </td>
</tr>
</Tabela>
<br/>
<Tabela class = tabp id = "tabela2" CellSpacacing = 0 CellPadding = 2 alinhamento = borda central = 1>
<tr>
<Td align = "Center"> Título 2 </td>
</tr>
<tr>
<Td align = "Center"> Conteúdo 2 </td>
</tr>
</Tabela>
<br/>
<Tabela class = tabp id = "tabela3" CellSpacacing = 0 CellPadding = 2 alinhamento = borda central = 1>
<tr>
<Td align = "Center"> Título 3 </td>
</tr>
<tr>
<Td align = "Center"> Conteúdo 3 </td>
</tr>
</Tabela>
<br/>
<Tabela class = tabp id = "tabela4" CellSpacacing = 0 CellPadding = 2 alinhamento = borda central = 1>
<tr>
<Td align = "Center"> Título 4 </td>
</tr>
<tr>
<Td align = "Center"> Conteúdo 4 </td>
</tr>
</Tabela>
<br/>
</div>
</body>
</html>