Hi, i'm using flowcentyric which executes the scripts on the server but unsuccessfull - i'm not to sure what i'm doing wrong! It just hangs & writes nothing
Dim objXL
Dim File_name
'Option WScript
File_name="C:\Inetpub\wwwroot\fcParmalatTest\trans form\custom\test.xls"
Set objXL = CreateObject("Excel.Application")
Set wb = objXL.Workbooks.Add
Set ws = objXL.Worksheets(1)
r = 2
objXL.Visible = False
Set objConn = CreateObject( "ADODB.Connection")
Set resultSet = CreateObject ("ADODB.RecordSet")
objConn.Open fcCustom.Value(Process.Company, "Connections")
strSQL = "select id,ProcessID from dbo.fcEventArchive where EventHistID = 2523"
resultSet.Open strSQL, objConn, 1, 2
resultSet.MoveFirst
Do While Not resultSet.eof
ws.Cells(r, 1).Value = (resultset.fields(0).value)
ws.Cells(r, 2).Value = (resultset.fields(1).value)
resultSet.MoveNext
r = r + 1
Loop
'wb.Save
'ws.Save
WS.SaveAs(File_Name)
resultSet.Close
objConn.Close
Set resultSet = Nothing
Set objConn = Nothing
|