Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. <cfexecute name = "C:WindowsSystem32CScript.exe"
  2. arguments = "//NoLogo D:Excel.vbs D:test.xls"
  3. variable = "data"
  4. timeout = "100">
  5. </cfexecute>
  6. <cfdump var="#data#">
  7.  
  8. Error: 424 Source: Microsoft VBScript runtime error Description: Object required
  9.  
  10. C:WindowsSystem32 > cscript //nologo D:Excel.vbs D:test.xls
  11.  
  12. Set fso = CreateObject("Scripting.FileSystemObject")
  13. Set xl = CreateObject("Excel.Application")
  14. xl.Visible = True
  15.  
  16. For Each f In fso.GetFolder("C:inetpubWebSitesUpload").Files
  17. If LCase(fso.GetExtensionName(f.Name)) = "xlsx" Then
  18. Set wb = xl.Workbooks.Open(f.Path)
  19. wb.RefreshAll
  20. wb.Save
  21. wb.Close
  22. End If
  23. Next
  24.  
  25. xl.Quit
  26.  
  27. <cfexecute name = "C:WindowsSystem32cscript.exe" arguments = "C:inetpubWebSitesCSATtest.vbs">
  28. </cfexecute>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement