社区
ASP
帖子详情
**************如何将网页中的文本转化到world、excel、ppt中?
beifanglang521
2006-03-23 01:32:18
如题,最好是由demo原代码,谢谢各位了。我从网上找到的几个例子好像都有错误,请大侠一定要确定能用阿!!!
...全文
155
5
打赏
收藏
**************如何将网页中的文本转化到world、excel、ppt中?
如题,最好是由demo原代码,谢谢各位了。我从网上找到的几个例子好像都有错误,请大侠一定要确定能用阿!!!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
beifanglang521
2006-03-23
打赏
举报
回复
大家给看看这段代码哪有问题,是将信息写到word里的代码copy到htm直接看就可以了
<html>
<body>
<input type="button" value=ok onclick="vbscript:openword '公安局','2006年2月27日','李贵山','李万寿','详细信息','','',''">
</body>
</html>
<script language="vbscript">
function openword(unit,docutime,man,leader,grouprun,roundrun,leaderun,roundthing) set Wordsheet=CreateObject("Word.Application")
Wordsheet.Application.Visible = true
set doc=Wordsheet.Application.Documents.Add("",False,0,True)
Wordsheet.Selection.ParagraphFormat.Alignment = 1
Wordsheet.Selection.Font.Bold = true
Wordsheet.Selection.Font.size = 30
Wordsheet.Selection.TypeText "值 班 日 报"
Wordsheet.Selection.Font.size = 25
Wordsheet.Selection.TypeParagraph
Wordsheet.Selection.Font.size = 16
Wordsheet.Selection.TypeParagraph
Wordsheet.Selection.Font.Bold = true
Wordsheet.Selection.ParagraphFormat.Alignment = 0
Wordsheet.Selection.TypeText unit & "指挥中心 " & docutime
doc.Shapes.AddLine 85, 185, 510, 185
set shap=doc.Shapes.AddLine( 440, 185, 440, 770)
shap.WrapFormat.AllowOverlap = True
shap.WrapFormat.Side = 3
shap.WrapFormat.DistanceTop = 0
shap.WrapFormat.DistanceBottom = 0
shap.WrapFormat.DistanceLeft = 9
shap.WrapFormat.DistanceRight = 9
shap.WrapFormat.Type = 0
Wordsheet.ActiveWindow.ActivePane.View.SeekView = 10
Wordsheet.ActiveDocument.PageSetup.DifferentFirstPageHeaderFooter = True
Wordsheet.Selection.HeaderFooter.Shapes.AddLine 85, 770, 510, 770
Wordsheet.Selection.Font.size = 16
Wordsheet.Selection.Font.Bold = true
Wordsheet.Selection.TypeText "值班首长:"
Wordsheet.Selection.Font.Bold = false
Wordsheet.Selection.TypeText leader
Wordsheet.Selection.Font.Bold = true
Wordsheet.Selection.TypeText " 值班员:"
Wordsheet.Selection.Font.Bold = false
Wordsheet.Selection.TypeText man
Wordsheet.ActiveWindow.ActivePane.View.SeekView = 0
Wordsheet.Selection.TypeParagraph
With Wordsheet.Selection.ParagraphFormat
.SpaceBeforeAuto = False
.SpaceAfterAuto = False
.FirstLineIndent = 20
End With
'Wordsheet.Selection.WholeStory
Wordsheet.Selection.ParagraphFormat.Alignment = 3
Wordsheet.Selection.Font.Bold = flase
Wordsheet.Selection.TypeText grouprun
Wordsheet.Selection.TypeParagraph
Wordsheet.Selection.TypeText roundrun
Wordsheet.Selection.TypeParagraph
Wordsheet.Selection.TypeText leaderun
Wordsheet.Selection.TypeParagraph
Wordsheet.Selection.TypeText roundthing
end function
</script>
beifanglang521
2006-03-23
打赏
举报
回复
谢谢,不过这样可以创建word怎么才能将文字写到word里呢??
阿_浩
2006-03-23
打赏
举报
回复
在页面的最后加上
Response.ContentType ="application/vnd.ms-xls"
Response.AddHeader "Content-Disposition", "attachment; filename="& curYear & "项目目录册(" & date & ").xls"
response.ContentType ="application/vnd.ms-word"
Response.AddHeader "Content-Disposition", "attachment; filename="& curYear & "参展企业名录一(" & date & ").doc"
response.ContentType ="application/vnd.ms-ppt"
Response.AddHeader "Content-Disposition", "attachment; filename="& curYear & "参展企业名录一(" & date & ").ppt"
beifanglang521
2006-03-23
打赏
举报
回复
什么页面?什么语言?啊,能不能给个完整点的啊,小小的demo就行了,谢谢
sky0120
2006-03-23
打赏
举报
回复
页面顶部加上代码:
1、Response.AppendHeader("Content-Disposition","attachment;filename=msg.doc");
Response.ContentType = "application/ms-word"; '导出WORD
2、Response.ContentType = "application/ms-excel"; '导出excel
Android 30分钟从零开始到Hello
World
Android是什么? 是一个针对移动设备的操作系统和软件平台 基于Linux内核 由 Google和开放手机联盟OHA开发的 容许使用Java语言来开发和管理代码 Android开放源代码,Android遵从Apache ...
计算机基础---04
ppt
篇(
world
转化
为
ppt
,字体设计,形状,
ppt
背景,音频,视频动画效果,模板推荐,插件推荐)
1. 办公软件介绍 说明:办公软件是指可以进行文字处理、表格制作、幻灯片制作、图形图像处理、简单数据库的处理等方面工作的软件。办公软件朝着操作简单化,功能细化等方向发展。 办公软件的应用范围很广,大到社会统计,小到会议记录,数字化的办公,离不开办公软件的鼎力协助。另外,政府用的电子政务,税务用的税务系统,企业用的协同办公软件,这些都属于办公软件。 主流办公软件: 1). Microsoft Office : 是由Microsoft(微软)公司开发的一套基于 Windows 操作系统的办公软件套装。常用组
文档在线预览(二)word、pdf、
excel
文件转html以实现文档在线预览
实现文档在线预览的方式除了上篇文章说的将文档转成图片的实现方式外,还有转成pdf,前端通过pdf.js、pdfobject.js等插件来实现在线预览,以及本文将要说到的将文档转成html的方式来实现在线预览。代码基于 aspose-words(用于word转html),pdfbox(用于pdf转html),所以事先需要在项目里下面两个依赖:
JAVA读取WORD,
EXCEL
,POWERPOINT,PDF文件的方法
OFFICE文档使用POI控件,PDF可以使用PDFBOX0.7.3控件,完全支持
中
文,用XPDF也行. java2word 是一个在java程序
中
调用 MS Office Word 文档的组件(类库)。该组件提供了一组简单的接口,以便java程序调用他的服务操作Word 文档。 这些服务包括: 打开文档、新建文档、 查找文字、替换文字, 插入文字、插入图片、插入表格, 在书签处...
LangChain-20 Document Loader 文件加载 加载MD DOCX
EXCEL
PPT
PDF HTML JSON 等多种文件格式 后续可通过FAISS向量化 增强检索
LangChain 提供了多种文档加载器,包括但不限于以下几种: - TextLoader:用于从各种来源加载
文本
数据。 - CSVLoader:用于加载 CSV 文件并将其转换为 LangChain 可以处理的文档格式。 - UnstructuredFileLoader:能够自动检测并处理不同格式的文件。 - DirectoryLoader:用于加载指定文件夹
中
的文件。 - UnstructuredHTMLLoader:用于从 HTML 文件
中
提取有意义的内容。 - JSONLoader:用于加载和处理
ASP
28,390
社区成员
357,068
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章