将浏览器表格导入到word
来源:互联网 发布:关于淘宝货源软件骗局 编辑:程序博客网 时间:2024/04/30 07:13
<input type="button" name="out_word" onclick="vbscript:buildDoc(data)" value="导出到word" class="notPrint">
<%
%>
<SCRIPT LANGUAGE=VBScript>
<!--
Private Sub buildDoc(tbl)
Dim objWordApp
Dim objWordDoc
Dim objParagraph
Dim objRange
Dim objTable
Dim row, col
Dim i, j
row = tbl.rows.length
col = tbl.rows.item(0).cells.length
Set objWordApp = CreateObject("Word.Application")
Set objWordDoc = objWordApp.Documents.Add
objWordApp.Visible = True
Set objWordApp = Nothing
Set objParagraph = objWordDoc.Paragraphs.Add
Set objRange = objParagraph.Range
With objRange
.InsertBefore "哈哈哈"
.ParagraphFormat.Alignment = 1
.Bold = True
.Font.Name = "隶书" //设定标题字体
.Font.Size = 15
End With
Set objRange = Nothing
Set objParagraph = Nothing
Set objParagraph = objWordDoc.Paragraphs.Add
Set objRange = objParagraph.Range
objRange.InsertBefore ("")
Set objTable = objWordDoc.Tables.Add(objRange, row, col)
Set objRange = Nothing
Set objParagraph = Nothing
For i = 1 To row
For j = 1 To col
objTable.Cell(i, j).Range.Text = tbl.rows.item(i-1).cells.item(j-1).innerText
Next
Next
Set objTable = Nothing
Set objWordDoc = Nothing
End Sub
//-->
</SCRIPT>
<table id="data" width="200" border="1">
<tr>
<td>11</td>
<td>11</td>
</tr>
<tr>
<td>22</td>
<td>22</td>
</tr>
<tr>
<td>33</td>
<td>33</td>
</tr>
<tr>
<td>44 </td>
<td>44</td>
</tr>
</table>
- 将浏览器表格导入到word
- 将浏览器文本导入到word
- 将word中表格批量导入到Excel
- 将 Excel 表格导入 Word
- 使用VBA将Excel数据导入到Word的表格中
- 如何使用免费控件将word表格中的数据导入到excel中
- 将HTML表格导入到Excel
- 将excel表格导入到DataGridView
- 将GridView导入到Excel和word
- vs2010导入word表格
- 页面的表格导入到WORD文件中去
- 把html的表格导入到excel,word中
- ASP中的表格导入到Word中打印
- 把html的表格导入到excel,word中
- PowerDesigner将pdm数据库表导出到word表格中
- C# 将excel表格嵌入到Word中
- 怎样快速将excel表格内容转换到word中
- 如何将其它浏览器的收藏夹导入到Firefox浏览器
- 特定时间执行某程序
- 怎样取得网页中的HTML源代码
- 读取一个EXCEL的文件,然后将其转化成HTML的表格
- 把一个网页文件的内容导入到word里
- 将浏览器文本导入到word
- 将浏览器表格导入到word
- 服务器端打开word
- 客户端打开word并保存为html格式
- vbscript自动配置IIS
- 浏览器表格导出到Excel
- msxml3.dll 错误 '800c0005' 系统未找到指定的资源。
- 获得数据库的空间大小,已使用的数据库空间大小
- 判断一个字符串里面包含有中文或者英文
- n 行n列的显示数据