Sign in to follow this  
Followers 0
Zak Blayde

Run an xls file ?

13 posts in this topic

Hello,

Is it possible to open an xls file with an auto-it program ?

I would like to make automatic the launching of macros on excel at an accurate hour so I would be very happy if I could do that with autoit.

If not, have you some idea to make it ?

Share this post


Link to post
Share on other sites



Good idea, but i dont see the function about it.


-jaenster

Share this post


Link to post
Share on other sites

You mean open an .xls file without excel installed on the machine?


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

No, with excel on the machine.

Here is the meaning : Everydays, I have to open the file, and click on different buttons. And I would like to make an autoit executable (that could be automaticaly launched with the windows scheduler) which open the xls file, and clik on the different buttons.

Share this post


Link to post
Share on other sites

Check out

http://www.autoitscript.com/forum/index.ph...02&hl=excel

What you want to do should definitely be achievable...

I haven't used the excel UDFs or I'd give you some more pointers.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

Check out

http://www.autoitscript.com/forum/index.ph...02&hl=excel

What you want to do should definitely be achievable...

I haven't used the excel UDFs or I'd give you some more pointers.

This UDF should get you to the point of having excel open and running then you need Run Method from MSDN if these "buttons" are set to run a macro or function.

Kohr

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Quite difficult to understand ^^.

My main question is : Is it possible to make something like run("start.xls")

This line code one don't works, i have an error saying : unable to execute the external program.

Is it a way to open the xls file and do winwaitactive et send like with a .exe file ?

Edited by Zak Blayde

Share this post


Link to post
Share on other sites

You could use

#include <Process.au3>
$rc = _RunDos("start start.xls")

but I would still recommend looking into one of the Excel udfs



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Yes there is... theres more then one way to do it, below is a simple way taken from the help file..

RunWait(@COMSPEC & " /c Start excel.xls")

Here excel.xls exists in the same place as the script.

Edited by someone

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

Thank you, it works great. The next step is to find how make conditional execution (If..Then...else) according to the days.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

ShellExecute ?

(requires one of the latest betas)

Edited by Helge

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

I create a new topic. It can help other people.

edit : Arf, I have just to use the scheduler with different autoit executive for the 5 days of the week.

Edited by Zak Blayde

Share this post


Link to post
Share on other sites

Check out for COM objects. It works fine.

You can even with a little change use the VB Macros you've written.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0