I need to be able to create an Excel file inside of a custom action in our custom.rrx vbscript file. Excel is installed on the rulerunner server that needs to create the file. I have a code blurb below that works perfectly if I put it in a vbs file and run it manually on the server. If I do it inside my custom action nothing happens and there is no error written to the log. How can I create an excel file inside my action?
Dim objExcel, ExcelFilePath
ExcelFilePath = "D:\DataCap\ExcelTest\EXCEL_FILE.xlsx"
ExcelFilePath2 = "D:\DataCap\ExcelTest\ExcelFileNew.xlsx"
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objExcel = CreateObject("Excel.Application")
If objFso.FileExists(ExcelFilePath) Then
objExcel.Workbooks.Open(ExcelFilePath)
objExcel.Worksheets(1).Cells(1,1) = "Hello UFT"
objExcel.ActiveWorkbook.Save
Else
objExcel.Workbooks.Add
objExcel.Worksheets(1).Cells(1,1) = "Hello UFT"
objExcel.ActiveWorkbook.SaveAs(ExcelFilePath2)
End If
objExcel.Quit
Set objExcel = Nothing
------------------------------
Danny Mann
------------------------------