vbscript中文件回写到服务器上
用vbscript创建一个文本文件,test.txt,如何将文件回写到服务器上的某个文件夹下?我听说用文件流可以回写到服务器上,不过我没有找到相应的函数,希望大家的帮助,非常感谢
目前只能做到,test.txt存到本地上。谢谢!
目前语句如下:
sub Writes
Const ForAppending=8,TristateFalse=0
Set fso= CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile("c:/test" & ".txt") '默认是桌面
set sfile=fso.OpenTextFile("c:/test.txt",ForAppending,TristateFalse)
set val=ActiveDocument.Fields("[QlikView User]").GetPossibleValues
for i=0 to val.Count-1
user=user&val.Item(i).Text
next
sfile.WriteLine "用户为:"&user
set table = ActiveDocument.GetSheetObject( "CH01" )
sfile.WriteLine "明细表的行数为:"&table.GetRowCount-1 '把表头去掉
sfile.WriteLine "明细表"
CellRect = ActiveDocument.GetApplication().GetEmptyRect()
CellRect.Top = 0
CellRect.Left = 0
CellRect.Width = table.GetColumnCount
CellRect.Height = table.GetRowCount
set CellMatrix = table.GetCells( CellRect )
set CellMatrix = table.GetCells( CellRect )
for RowIter=CellRect.Top to CellRect.Height-1
for ColIter=CellRect.Left to CellRect.Width-1
sfile.Write CellMatrix(RowIter)(ColIter).Text&" "
next
sfile.WriteLine "" '换行
next
sfile.Close
set fso=Nothing
set sfile=Nothing
end sub 文件回写到服务器 vbscript
补充:VB , 网络编程