将HTML表格导出成WORD、ACCESS、EXECEL等文件格式?

湘王
聚能技术官方账号
2003-12-27 09:23:43
同上
...全文
513 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
hcsunjun 2003-12-31
  • 打赏
  • 举报
回复
这个在IE中控件不了,只能在word中用vba控制
seeu1688 2003-12-31
  • 打赏
  • 举报
回复
office2000以后,ie中选取表格,粘贴至word文档,再保存即可。excel也是如此。
access是否可以通过excel的csv文件导入?
possible_Y 2003-12-31
  • 打赏
  • 举报
回复
导出到EXCEL :
http://www.csdn.net/Develop/read_article.asp?id=23055
possible_Y 2003-12-31
  • 打赏
  • 举报
回复
导出成WORD:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<div id="Layer1" >下在内容下在内容下在内容
<input type=button name='button_export' title='导出导word' onclick=OpenWord() value=下载到word></div>
</div>

<p>不需要的内容不需要的内容不需要的内容</p>
<table border="1">
<Tr><Td>1</td><Td>2</td><Td>3</td></tr>
<Tr><Td>4</td><Td>5</td><Td>6</td></tr>
<Tr><Td>7</td><Td>8</td><Td>9</td></tr>
</table>
</body>
</html>
<script language="javascript">
function OpenWord(){
Layer1.style.border=0
ExcelSheet = new ActiveXObject('Word.Application');
ExcelSheet.Application.Visible = true;
var mydoc=ExcelSheet.Documents.Add('',0,1);
myRange =mydoc.Range(0,1)
var sel=Layer1.document.body.createTextRange()
sel.select()
Layer1.document.execCommand('Copy')
sel.moveEnd('character')
myRange.Paste();
location.reload()
ExcelSheet.ActiveWindow.ActivePane.View.Type=9
}
</script>
fzel_net 2003-12-31
  • 打赏
  • 举报
回复
header("Content-disposition: filename=file.doc");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
<!-- 下面写你的显示程式 -->
nik_Amis 2003-12-31
  • 打赏
  • 举报
回复
up
achill 2003-12-30
  • 打赏
  • 举报
回复
楼上的大哥,如果在IE上打开了word文件,有什么办法可以做到禁止复制??
wanghr100 2003-12-28
  • 打赏
  • 举报
回复
直接用word打开html文件.
然后选取相应的表格.
Ctrl+C, Ctrl+V
execel的方法也差不多,

再就是execel可以转成access..
打开access,新建个数据库,导入数据,
选择execel文件,按向导一步一步,
可完成表的导入.
yjgx007 2003-12-27
  • 打赏
  • 举报
回复
html格式文件直接在word中打开

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧