Solved

Open Excel 2007 Workbook by Scheduled Task on Server 2008R2

Posted on 2013-12-30
6
967 Views
Last Modified: 2013-12-30
I want to be able to open an xls file automatically on a scheduled basis without being logged in.  Is this possible using scheduled tasks? If so, what parameters would I need to use to in order to achieve this?
0
Comment
Question by:fireguy1125
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:Don Thomson
ID: 39746372
You should be able to - The actual command would have to be something like
excel  filename.xls   - The excel.exe must be in the path or you will need to show the path   (i.e. C:\Program Files (x86)\Microsoft Office\OFFICE11\Excel.exe

I'm assuming that you need to open it so it can update from other data sources on an automated basis, then save and close again.
0
 
LVL 16

Expert Comment

by:R. Andrew Koffron
ID: 39746492
wouldn't it be better to pipe text into a txt file than import it when you are logged in?

there's a lot of automation tools. but all i've tried are prone to errors or not grabbing the info I'd like to collect properly.

echo <text you want to send> >> <c:\folder\fileyouwantappended.txt>

>> adds to last line in a txt file
> re-writes the file.

Maybe I'm missing something, but I can't see the point of opening an excel file while not logged in. unless there's some other process that's going to use/add data etc...

just my knee jerk reaction, but I'd look for a more programatic method of capturing the end goal, without relying on excel when you're not logged in.
0
 
LVL 1

Author Comment

by:fireguy1125
ID: 39746507
Thanks, I put this in a batch file, and it runs successfully, however when I make it a scheduled task, it shows the operation completed successfully, but it did not.
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 16

Expert Comment

by:R. Andrew Koffron
ID: 39746562
if your not logged in how would you know?
is the excel collecting data, or writing data. or do you just want it open someplace?
I don't understand the goal. if there are no users logged on I don't think excel is going to do anything or even actually open, as it's an application that interacts with the user environment. so might work if the user space is logged in and locked, but if "no one" is able to interact what could it do?

I've not tried this so I'm not saying it's impossible, but it doesn't make sense to me.
sorta like asking why a car won't fly.
0
 
LVL 1

Author Comment

by:fireguy1125
ID: 39746568
When i test the scheduled task, it is doing it while logged in.

The file is a simple batch file that just has the path to an xls file.

The xls file has a Macro in it that runs and modifies the file, then saves it as a different file name in the same directory.
0
 
LVL 16

Accepted Solution

by:
R. Andrew Koffron earned 500 total points
ID: 39746586
try it with the user account locked, instead of logged out.

I just don't think excel can run as a service.

you might try macking a vbs macro based on the what's in excel that should be able to run on it's own.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now