请教一下高手,Scripting.FileSystemObject是在服务器端操作文件还是在客户端操作文件

heikeying163 2006-09-25 06:16:58
请教一下高手,Scripting.FileSystemObject是在服务器端操作文件还是在客户端操作文件
...全文
111 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
calmjx 2006-09-25
  • 打赏
  • 举报
回复
是操作服务器端的。是server端的.看你在哪里运行咯。
heikeying163 2006-09-25
  • 打赏
  • 举报
回复

<script language="vbscript">
Function spreadsheetPrintout(data)
fileName= "c:\temporaryFile.htm"
s = createTemporaryFile(fileName,data)
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.open(fileName)
xlBook.Sheets(1).PrintOut
xlBook.Close
end function

Function createTemporaryFile(fileName,data)
set objFS=CreateObject("Scripting.FileSystemObject")
set f = objFS.CreateTextFile(fileName, True, True)
f.write(data)
f.close
end Function

function spreadsheetprintPreview(data)
fileName= "c:\temporaryFile.htm"
s = createTemporaryFile(fileName,data)

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.open(fileName)

xlApp.Application.Visible = True
xlApp.windows(1).visible = True
xlBook.Sheets(1).PrintPreview
xlBook.Close
end function
</script>

<script>

各位大侠看下吧,就是这段代码,总是提示出错
heikeying163 2006-09-25
  • 打赏
  • 举报
回复
可是它也可以写在 JavaScript 里啊?
deravo 2006-09-25
  • 打赏
  • 举报
回复
服务器端

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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