0

What needs to be done? I need to make a connection to the remote machine through UNIX, go to the shared drive, open an excel file, save it and close it. This needs to written in an script.

The file contains macros so they needs to be opened manually on daily basis, save it and close it. We plan to write a script that would run on daily basis and refresh this file automatically.

Where am i facing the issue? Making a connection to the remote machine is done, after that i run certains commands: 1. Open the command prompt 2. cd the file path 3. Open the File

Now this is where the issue starts How to save the file automatically? How to close that file?

I tried using the taskill option and it almost worked but it gives out the popup of Do you want to save the file and i dont know how to provide output to that popup through command prompt.

Let me know if you have any idea on how to move ahead on this.

Hardy
  • 109
  • 1
  • 9

2 Answers2

0

A bit hackish, but xdotool, a program which simulates mouse clicks and keyboard presses could be used. If Windows is being used, then see this question for tools which simulate mouse clicks and keyboard presses.

Community
  • 1
  • 1
Ramchandra Apte
  • 4,033
  • 2
  • 24
  • 44
0

Have you tried SendKeys?

That may help.

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432
  • Did you get this working? If so, please accept my answer. If not, please let me know what didn't work and we can try and get you up and running. – Mark Setchell Nov 29 '13 at 11:47