asp生成带有样式的word文件方法
(编辑:jimmy 日期: 2024/11/17 浏览:3 次 )
复制代码 代码如下:
< %
Set fso=Server.CreateObject("Scripting.FileSystemObject")
str="<html><title>asp生成word文件举例</title><body><span style='color:#ff0000;font-size:36px; font-weight:bold;'>欢迎光临www.jb51.net()</span></body></html>"
filename= "2008.doc"
Set act = fso.CreateTextFile(server.mappath(filename), true)
act.WriteLine(str)
act.close
Set fso=Nothing
response.write "生成Word文件成功"
% >
< %
Set fso=Server.CreateObject("Scripting.FileSystemObject")
str="<html><title>asp生成word文件举例</title><body><span style='color:#ff0000;font-size:36px; font-weight:bold;'>欢迎光临www.jb51.net()</span></body></html>"
filename= "2008.doc"
Set act = fso.CreateTextFile(server.mappath(filename), true)
act.WriteLine(str)
act.close
Set fso=Nothing
response.write "生成Word文件成功"
% >
下一篇:简单的asp采集代码教程