CreateObject("Excel.Application", <servername>)
- From: korn@xxxxxx
- Date: 20 Jul 2006 01:52:45 -0700
Hello,
I trying to run a vbscript from WinPE which should write data to excel
table located on the remote server. The script hangs up after starting
it.
What could be the problem?
I start the script as a user with admin right on the remote server.
The excel is installed on the server.
The script:
strExcelPath = "x:\ghost\tootmine\testimisvarustus.xls" ' mapped drive
'strExcelPath = "c:\test.xls"
On Error Resume Next
Set objExcel = CreateObject("Excel.Application", "testpx")
'===== last row in excel table
Set objSheet = objExcel.ActiveWorkbook.WorkSheets(2)
intRow = 1
Do While obj***.Cells(intRow, 1).Value <> ""
intRow = intRow + 1
Loop
'=======Loe num.txt'st masteri number ja kirjuda exceli tabelisse koik
andmed
Set objFSO = CreateObject("Scripting.FileSystemObject")
dateNow = Now
Set objFile = objFSO.OpenTextFile("l:\ghost\work\num.txt")
strCharacters = objFile.Read(3)
Set objFile = objFSO.OpenTextFile("l:\ghost\work\num1.txt")
strCharacters1 = objFile.Read(5)
strCurrentDate = Right(100 + Day(dateNow), 2) _
& Right(100 + Month(dateNow), 2)
' Add a row with new values.
obj***.Cells(intRow, 1).Value = strCharacters
obj***.Cells(intRow, 2).Value = "\\testpx\reminst3\ghost\winxp"
obj***.Cells(intRow, 3).Value = strCharacters1&strCurrentDate&".gho"
obj***.Cells(intRow, 4).Value = "" & nInput & " "
' Save the spread*** and close the workbook.
objExcel.ActiveWorkBook.Save
objExcel.ActiveWorkBook.Close
' Quit Excel.
objExcel.Application.Quit
' Clean Up
Set obj*** = Nothing
Set objExcel = Nothing
.
- Follow-Ups:
- Re: CreateObject("Excel.Application", <servername>)
- From: Dr John Stockton
- Re: CreateObject("Excel.Application", <servername>)
- From: Jim
- Re: CreateObject("Excel.Application", <servername>)
- Prev by Date: Re: Find NIC Driver and version
- Next by Date: Re: Checking for future date
- Previous by thread: Re: Find local users accounts in the domain
- Next by thread: Re: CreateObject("Excel.Application", <servername>)
- Index(es):