Copiar código del código de la siguiente manera:
<!
<html xmlns = "http://www.w3.org/1999/xhtml">
<Evista>
<meta http-equiv = "content-type" content = "text /html; charset = gb2312" /> />
<title> Documento no -tito </title>
<script language = "javaScript">
function AutomateWderAutoPaging (Prefixion, Count)
{{
var Own = new ActiveXObject ("Word.Application");
var odc = owd.documeents.add ();
Odc.showgrammaticalrrs = falso;
Odc.showspellinger = falso;
var naranja = odc.range (0,1);
para (i = 0; i <count; i ++)
{{
var sel = document.body.createTextrange ();
var tableName = prefixion+i;
var tabla = document.getElementById (TableName)
Sel.movetoElementText (tabla);
sel.select ();
sel.execCommand ("copia");
Owd.selection.paste ();
owd.selection.insertban ();
}
//owd.activedocument.activewindow.view.type=3 // Establecer el modo de navegación
owd.visible = true;
};
Function AutomateExcel (prefixión)
{{
var Elim = document.getElementById ("AutomateExcel");
var oranGeref = document.body.createTextrange ();
OrangeF.MovetoEelementText (eltable);
Orangef.execCommand ("copia");
intentar {
Var appExcel = new ActiveXObject ("Excel.Application");
} captura (e)
{{
alerta ("无法调用 无法调用 Office 对象 请确保您的机器已安装了 请确保您的机器已安装了 请确保您的机器已安装了 并已将本系统的站点名加入到 并已将本系统的站点名加入到 并已将本系统的站点名加入到 的信任站点列表中!");
Devolver;
}
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>
</ablo>
<Body>
<input type = "button" value = "exportar a Word automática paginación" onClick = "AutomateWyauToPaging ('Tabla', 5)" />
<input type = "button" value = "Exportar al ancho de la columna de control de Excel" onClight = "AutomateExcel ('Tabla')"/>/>
<div id = "AutomateExcel">
<Table class = tabp id = "tabla0" cellspacing = 0 cellPadding = 2 align = border central = 1>
<tr>
<Td align = "centro"> Título 0 </td>
</tr>
<tr>
<Td align = "centro"> contenido 0 </td>
</tr>
</table>
<br>
<TABLE CLASS = TABP ID = "TABLA1" CELLSPACING = 0 CellPadding = 2 Align = Center Border = 1>
<tr>
<Td align = "centro"> Título 1 </td>
</tr>
<tr>
<Td align = "centro"> contenido 1 </td>
</tr>
</table>
<br/>
<TABLE CLASS = TABP ID = "TABLA2" CELLSPACING = 0 CellPadding = 2 Align = Center Border = 1>
<tr>
<Td align = "centro"> Título 2 </td>
</tr>
<tr>
<Td align = "centro"> contenido 2 </td>
</tr>
</table>
<br/>
<TABLE CLASS = TABP ID = "TABLE3" CELLSPACING = 0 CellPadding = 2 Align = Center Border = 1>
<tr>
<Td align = "centro"> Título 3 </td>
</tr>
<tr>
<Td align = "centro"> contenido 3 </td>
</tr>
</table>
<br/>
<TABLE CLASS = TABP ID = "TABLE4" CELLSPACING = 0 CellPadding = 2 Align = Center Border = 1>
<tr>
<Td align = "centro"> Título 4 </td>
</tr>
<tr>
<Td align = "centro"> contenido 4 </td>
</tr>
</table>
<br/>
</div>
</body>
</html>