Run Command Instructions to open and save excel file - alteryx

I am using the run command. It starts with
Start Excel.exe "Filepath\FileName.xls"
This opens the file. A popup appears, and asks if you would like to update the links.
I need to know what commands in the run commands to use that would:
Tab and select "Don't Update", then save and close the file.
(this will be refreshing data that was just input into the file from Alteryx)
Thanks for any help you can provide.

It may be possible to do this altering the Excel settings, this is outside of the command line.

Related

NEdit_How to use the Shell on NEdit to save the file - LINUX base

I am working on the script on NEdit with LINUX environment.
But I can't reach one of the funciton of the script.
*I would like to add "save" file function at the script, but it seems not possible.
I checked the NEdit Help document, it mentions the "Make Backup Copy" function is UNIX only.
Not sure anyone has experience on it? -> To automatically save/backup the file after you call the script with LINUX environment.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Make Backup Copy
On Save, write a backup copy of the file as it existed before the Save command with the extension .bck (Unix only).
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
https://www.doc.ic.ac.uk/lab/labman/nedit/n6.html
Are you using the macros or the functions?
save() just saves the current file (same as Ctrl-S)
save_as_dialog() will bring up a dialogue to save the file
You can put them in buttons from the macro menus or you can define a functions and then add that function to a macro button.

Automate "Right-click + Print" on .xlsx files

I need to automate the act of printing .xlsx file.
I have already seen some answers to this task saying that it is possible by creating a VBA script, as well as some examples. That is not about what my question revolves around.
Thought, I know that it is also possible to right-click on a .xlsx file and click "Print", which does the exact task that I want. It opens Excel, prints the file to the default printer, then closes Excel. (Windows 7, by the way)
So I'm thinking that the work has already been done here.
What process is launched when clicking this "Print" option? Can it be launched via command line, or "clicked" by a python script or something? And if not, why? How can something so easy to click be impossible to automate? I assume a process of some sort must be launched in some way.
Found it!
This task can be easily launched using python.
import os
os.startfile('C:/path/to/the/file.xlsx','print')
This code will launch the same print task. From there, it is pretty trivial for a python developer to automate the task in his scripts.
However, if you do not know much about Python and do not want to learn it now, an easy (or lazy?) way to add it in any automation script would be to save the two lines of code above in a whatever.py file, and launch it via command line (with Python installed, of course).
The context menu print command for Office documents utilizes Dynamic Data Exchange (DDE) and does not directly run a command that can be replicated from the command line.
You can view the content of the commands in the registry. Browse to HKEY_CLASSES_ROOT\.xlsx and look at the (Default) data column. On my machine, "Excel.Sheet.12" is the type of a .xslx file. Then browse to HKEY_CLASSES_ROOT\Excel.Sheet.12\shell\ to see the commands registered for that file type. On my machine, the Print (Default) is "C:\Program Files\Microsoft Office\Office16\EXCEL.EXE" /dde and the "command" is zn=BV5!!!!4!!!!MKKSkEXCELFiles>]-z5hw$l[8QeZZR4_X=$ /dde, none of which is directly useful or accessible for running from a command line.
It will require another program to allow you to access the interface, but there are programs that allow you to make use of DDE from the command line. I recommend Freddy Vulto's Class Exec. More information and a few other similar utilities can be found here.

Trying to append the Excel file through unix via command prompt

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.
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.
Have you tried SendKeys?
That may help.

Clearing Python shell

How to clear Python shell ?
I am writing a module in python, I want to save it in a file. what is the best way to do it?
File -> New Window. Put your module in this new window, than save it. To run, just press F5.
Python shell does not get cleared or saved. Perhaps you are using IDLE. It's a confusing piece of software. I'd recommend you to get a real IDE, or at least a proper text editor.
Something that I do in IDLE is print "\n"*100
You can also extend Idle and map that to a key. Read Pythoninstall\lib\Idlelib\extend.txt for details
http://bytes.com/topic/python/answers/737111-extension-idle-clear-screen-but-how-write-screen
If you are just in console, you can do ( which won't work in IDLE):
import os
os.system("cls")
Just copy and paste the code into a new file (In file), and save it. To run, you can go to the run section and select "Run Module", or you can simply press F5.

Alternative to TextPad's Prompt to Reload File

I have been using TextPad for years and I am happy with it except for one issue. I use it to monitor log files that are updated in near real time. Every time the log file is updated TextPad prompts me to reload it. Essentially I want to force the yes button at all times and never see the prompt. I submitted a change request at their site, but I was wondering if there were any alternatives to TextPad that would allow me to see the file loading in real time with out a prompt to reload it.
You can configure Textpad to reload the file without prompting.
Go to Configure->Preferences...->File, then select the Auto-Reload option under When files are modified by another process.
One point to note, if the cursor is at the end of the file, TextPad will keep it at the end as updates are made so the file will scroll nicely. If the cursor is elsewhere in the file, it won't scroll.

Resources