Opening an Excel directly in Sikuli

Asked by simran

I want to open an Excel workbook saved in my system directly instead of using App.open and then clicking File->Open and so on or by clicking the icon of that workbook. Is there any command/function that can be used where i can directly give path to my workbook and open it?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

you might issue a Windows start command using run:
cmd = r'start ... appropriate parameters ...'
run(cmd)

parameters like paths must be enclosed in " if they contain blanks or other characters (rules of commandline apply)

It helps, to first evaluate on a commandline window, how the start command has to be written in your specific case.

Be aware of the special rules in Python about quoting in strings or use raw strings r'...' as used above.

Revision history for this message
simran (simran.handa) said :
#2

But i want to implement through Sikuli IDE

Revision history for this message
RaiMan (raimund-hocke) said :
#3

this is done in the IDE:

cmd = r'start ... appropriate parameters ...'
run(cmd)

please follow my advice and at least try it out.

Revision history for this message
simran (simran.handa) said :
#4

appropriate parameters include?

cmd=r'start <absolute path of workbook>'

is that correct?

Revision history for this message
RaiMan (raimund-hocke) said :
#5

please do some try and error.

Can you help with this problem?

Provide an answer of your own, or ask simran for more information if necessary.

To post a message you must log in.