Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Excel VBA script aware of being opened interatively or from the command line Post 302877308 by DGPickett on Friday 29th of November 2013 04:16:13 PM
Old 11-29-2013
It may be possible to detect it by tracing parent processes. If cmd.exe is in your ancestry, you are running from a terminal. In UNIX, one might find in batch there is usually no /dev/tty (but ssh and expect can create a pseudo tty).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command to find last time file was opened

New to unix .. Is there a simple command or utility that will tell me when the last time a file was opened/used? (3 Replies)
Discussion started by: sbr262
3 Replies

2. UNIX for Dummies Questions & Answers

Script run everytime a new terminal window is opened

I created a script called title #!/bin/sh echo "^0;$*^G" It will change the terminal window titlebar to what ever I type after the script (title BIG would change titlebar to BIG instead of terminal) Is there a way to make it run so it will work on every terminal window that gets opened.... (1 Reply)
Discussion started by: amason0508
1 Replies

3. Shell Programming and Scripting

Help with cp command when destination file is opened

I am writing a shell script (runs on HP Unix) which copies files from a source directory to another destination daily. The destination directory always have the files with same name as in the source directory. And daily a new file will be created in the source. cp command works fine if the file... (1 Reply)
Discussion started by: arunkumar_ms
1 Replies

4. Shell Programming and Scripting

Create a .sh file for an equivalent Excel VBA code

Hi guys, I am new to Unix, Need your help here. I have installed cygwin software (Unix) in my computer (Windows vista). Now i want to create a shell script (.sh file)/other script which is equivalent of VBA code (at the bottom) and then put this .sh file into bin directory of c:/cygwin. so... (7 Replies)
Discussion started by: bansalpankaj88
7 Replies

5. Shell Programming and Scripting

Script to force close sheet opened by someone else

Was wondering what script to run as root that will take as input a filename (full path) that is opened by someone else and force whoever has it opened to close it? Or maybe there is an existing command to do this? Thanks Edit: Meant to say file not sheet, too much Excel... (2 Replies)
Discussion started by: stevensw
2 Replies

6. Shell Programming and Scripting

File exists, but cannot be opened.How to check- whether it could be opened to read when it exists

Hi #Testing for file existence if ; then echo 'SCHOOL data is available for processing' else echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING' : i wrote a script, where it begins by checking if file exists or not. If it exists, it truncates the database... (2 Replies)
Discussion started by: rxg
2 Replies

7. Shell Programming and Scripting

Perl script to Merge contents of 2 different excel files in a single excel file

All, I have an excel sheet Excel1.xls that has some entries. I have one more excel sheet Excel2.xls that has entries only in those cells which are blank in Excel1.xls These may be in different workbooks. They are totally independent made by 2 different users. I have placed them in a... (1 Reply)
Discussion started by: Anamika08
1 Replies

8. Shell Programming and Scripting

Script or alias to backup all files opened by vi

we want to backup all opened files by vi before editing also with version information. i wrote below alias to backup crontab file content with version info. What i want know is to make this opened files by vi. We want to prevent user mistakes by adding this alias. alias crontab='DATE=$(date... (4 Replies)
Discussion started by: sebu
4 Replies

9. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

10. Windows & DOS: Issues & Discussions

Update sh file using VBA before perl script is run

I have a VBA that creates a new directory folder and creates a new text file in that directory. I am trying to run a perl script from the VBA and have created a batch file that gets called from the VBA. That bat file uses a shell file to run a script. When the batch file is called I get the error... (0 Replies)
Discussion started by: cmccabe
0 Replies
Excel::Template::Container::Conditional(3pm)		User Contributed Perl Documentation	      Excel::Template::Container::Conditional(3pm)

NAME
Excel::Template::Container::Conditional - Excel::Template::Container::Conditional PURPOSE
To provide conditional execution of children nodes NODE NAME
IF INHERITANCE
CONTAINER ATTRIBUTES
o NAME This is the name of the parameter to test. It is resolved like any other parameter name. (q.v. VAR for more info.) o VALUE If VALUE is set, then a comparison operation is done. The value of NAME is compared to VALUE using the value of OP. o OP If VALUE is set, then this is checked. If it isn't present, then '==' (numeric equality) is assumed. OP must be one of Perl the numeric comparison operators or the string comparison operators. All 6 of each kind is supported. Note: If you want to use < or <=, you must instead use &lt; or &lt;=. This is to make sure it will parse with XML::Parser. You should not need to use &gt; or &gt;= instead of > and >=, respectively. o IS If VALUE is not set, then IS is checked. IS is allowed to be either "TRUE" or "FALSE". The boolean value of NAME is checked against IS. CHILDREN
None EFFECTS
None DEPENDENCIES
None USAGE
<if name="__ODD__" is="false"> ... Children here </if> In the above example, the children will be executed if the value of __ODD__ (which is set by the LOOP node) is false. So, for all even iterations. AUTHOR
Rob Kinyon (rob.kinyon@gmail.com) SEE ALSO
LOOP, VAR perl v5.14.2 2010-06-17 Excel::Template::Container::Conditional(3pm)
All times are GMT -4. The time now is 08:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy