Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-05-2012, 11:46 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
Cannot edit an Excel worksheet from scheduled task

I am trying to edit an Excel worksheet using the sample provided here:
http://kinook.com/Forum/showthread.p...el.Application
with small changes (attached is the bld and excel file).
When trying to run this bld file -both tom VBP and from a scheduled task -all works ok from my machine (WinXP X86,VBP 8.0 X86,MS Office 2007).
When I try it from another build machine -W2k8 R2 X64,VBP 8.0 X64,MS Office 2010 -it works ok from VBP environment,the log says:

7/5/2012 6:44:36 PM: Building project step 'mod worksheet'...
xlApp object is NOT empty!
xlBook object is NOT empty!
xlSheet object is NOT empty!
Cell 1,1 has value:1000
7/5/2012 6:44:36 PM: Build successfully completed (elapsed = 00:00:00).

But when running this build from a scheduled task -never works.
Log says:
7/5/2012 6:44:06 PM: Building project step 'mod worksheet'...
xlApp object is NOT empty!
xlBook object is empty!!!
xlSheet object is empty!!!
7/5/2012 6:44:06 PM: Build successfully completed (elapsed = 00:00:00).

So I would like to ask you what could be the problem causing this bld project not to work from a scheduled task (basically for some reason xlBook and xlSheet are empty objects )...
Attached Files
File Type: zip BOOK1.ZIP (5.8 KB, 2099 views)
File Type: zip excel.zip (1.2 KB, 2210 views)
Reply With Quote
  #2  
Old 07-05-2012, 12:24 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Not sure, but you can reproduce the problem outside of Visual Build by putting the script code in a .vbs file and calling via cscript.exe in a scheduled task.
Reply With Quote
  #3  
Old 07-06-2012, 07:29 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
i tried that ,made a VBScript (attached) -it runs ok when launched normally (objects are not empty) ,does not work from scheduled task (objects are empty)
So it is the same behaviour like in VBP.Question is why ...
Reply With Quote
  #4  
Old 07-06-2012, 07:32 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Ask Microsoft.
Reply With Quote
  #5  
Old 07-06-2012, 07:47 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
ok,I will.Tks.
Reply With Quote
  #6  
Old 07-06-2012, 09:33 AM
teognost teognost is online now
Registered User
 
Join Date: 05-25-2004
Location: Prague,Czech Republic
Posts: 200
After a lot of search I founded a resolution for this problem.
After I created manually the Desktop folder -sch task finished ok.

http://blogs.msdn.com/b/sqlserverfaq...rver-jobs.aspx

Resolution
************
· A “Desktop” folder seems to be necessary in the “systemprofile” folder in the location C:\Windows\SysWOW64\config\ to open an Excel file
· Create the “Desktop” folder for Windows 2008 Server (x64) under the location C:\Windows\SysWOW64\config\systemprofile
· And for a 32 bit Windows 2008 Server create the “Desktop” folder under the location C:\Windows\System32\config\systemprofile
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:52 AM.


Copyright © 1999-2023 Kinook Software, Inc.