Re: Open Excel doc from a Command Line process
Eureka OK that is clear and that works THANK YOU VERY MUCH and to the other folks who provided suggestions. OMG I am going to have fun with the OLE Automation actions. Thanks Henry Douglas x2065 IT Support Center Remedy Software Administrator First Command Financial Group From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of David Sanders Sent: Thursday, July 26, 2007 11:23 AM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process Henry Here's a small def file to show how it should work - you should be able to copy the active link to your form and change the fields it's using. Remove the .txt from the end of the file name. Regards David Sanders Remedy Solution Architect Enterprise Service Suite @ Work == ARS List Award Winner 2005 Best 3rd party Remedy Application See the ESS Concepts Guide http://www.westoverconsulting.co.uk/downloads/ESS_Concepts_Guide.pdf tel +44 1494 468980 mobile +44 7710 377761 email [EMAIL PROTECTED] web http://www.westoverconsulting.co.uk http://www.westoverconsulting.co.uk/ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 4:48 PM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process Thanks David but I'm not having success with constructing that syntax still trying thou. i.e. no space between the reg location and path statement and I tried surrounding with double ticks HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe \\path\name.xls file:///\\path\name.xls . Thanks Henry Douglas x2065 IT Support Center Remedy Software Administrator First Command Financial Group __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are
Re: Open Excel doc from a Command Line process
Try this start /b cmd /c \\servername\drive\folder\filename.xls file://\\servername\drive\folder\filename.xls You can use cmd /c by itself but it leaves a Command prompt window open until the Excel document closes. Using the Start /b tells Windows to not open the command prompt window. Fred From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 10:48 AM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process ** Thanks David but I'm not having success with constructing that syntax still trying thou. i.e. no space between the reg location and path statement and I tried surrounding with double ticks HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe \\path\name.xls file:///\\path\name.xls . Thanks Henry Douglas x2065 IT Support Center Remedy Software Administrator First Command Financial Group From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of David Sanders Sent: Thursday, July 26, 2007 10:18 AM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process Hi Henry You could use an OLE action to do a RegRead of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe\Path HTH David Sanders Remedy Solution Architect Enterprise Service Suite @ Work == ARS List Award Winner 2005 Best 3rd party Remedy Application See the ESS Concepts Guide http://www.westoverconsulting.co.uk/downloads/ESS_Concepts_Guide.pdf tel +44 1494 468980 mobile +44 7710 377761 email [EMAIL PROTECTED] web http://www.westoverconsulting.co.uk http://www.westoverconsulting.co.uk/ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 4:12 PM To: arslist@ARSLIST.ORG Subject: Open Excel doc from a Command Line process Hello ARSList I am rewriting several hard coded functions on the system I have inherited. The latest is a Run Process command to open Excel a user maintained spreadsheet. The current working Command Line in the Run Process action is: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE \\servername\drive\folder\filename.xls I need to rewrite this to function for multiple versions of excel not just from the OFFICE11 install directory. I have tried many interactions with no success even some that work from Start Run in windows but not from the User tool. TIA Thanks Henry STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are
Re: Open Excel doc from a Command Line process
I've not tested this, but couldn't you just use \\servername\drive\folder\filename.xls file:///\\servername\drive\folder\filename.xls without the preceding c:\program files... Wouldn't this cause the system to open with whatever version the user has? I may be way off base though. Andy L. Mayfield Sr. System Operation Specialist Alabama Power Company Office: 8-226-1805 From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 10:12 AM To: arslist@ARSLIST.ORG Subject: Open Excel doc from a Command Line process Hello ARSList I am rewriting several hard coded functions on the system I have inherited. The latest is a Run Process command to open Excel a user maintained spreadsheet. The current working Command Line in the Run Process action is: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE \\servername\drive\folder\filename.xls I need to rewrite this to function for multiple versions of excel not just from the OFFICE11 install directory. I have tried many interactions with no success even some that work from Start Run in windows but not from the User tool. TIA Thanks Henry STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are
Re: Open Excel doc from a Command Line process
Hi Henry You could use an OLE action to do a RegRead of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe\Path HTH David Sanders Remedy Solution Architect Enterprise Service Suite @ Work == ARS List Award Winner 2005 Best 3rd party Remedy Application See the http://www.westoverconsulting.co.uk/downloads/ESS_Concepts_Guide.pdf ESS Concepts Guide tel +44 1494 468980 mobile +44 7710 377761 email [EMAIL PROTECTED] web http://www.westoverconsulting.co.uk http://www.westoverconsulting.co.uk/ _ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 4:12 PM To: arslist@ARSLIST.ORG Subject: Open Excel doc from a Command Line process Hello ARSList I am rewriting several hard coded functions on the system I have inherited. The latest is a Run Process command to open Excel a user maintained spreadsheet. The current working Command Line in the Run Process action is: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE \\servername\drive\folder\filename.xls I need to rewrite this to function for multiple versions of excel not just from the OFFICE11 install directory. I have tried many interactions with no success even some that work from Start Run in windows but not from the User tool. TIA Thanks Henry STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are
Re: Open Excel doc from a Command Line process
Henry Here's a small def file to show how it should work - you should be able to copy the active link to your form and change the fields it's using. Remove the .txt from the end of the file name. Regards David Sanders Remedy Solution Architect Enterprise Service Suite @ Work == ARS List Award Winner 2005 Best 3rd party Remedy Application See the http://www.westoverconsulting.co.uk/downloads/ESS_Concepts_Guide.pdf ESS Concepts Guide tel +44 1494 468980 mobile +44 7710 377761 email [EMAIL PROTECTED] web http://www.westoverconsulting.co.uk http://www.westoverconsulting.co.uk/ _ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 4:48 PM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process Thanks David but I'm not having success with constructing that syntax still trying thou. i.e. no space between the reg location and path statement and I tried surrounding with double ticks HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe \\path\name.xls file:///\\path\name.xls . Thanks Henry Douglas x2065 IT Support Center Remedy Software Administrator First Command Financial Group __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are char-set: windows-1252 # # File exported Thu Jul 26 17:20:19 2007 # begin schema name : testGetExcel core-version : 2 upgrade-version: 0 num-fields : 3 timestamp : 1185466736 owner : Demo last-changed : Demo default-vui: Default Admin View num-vuis : 1 export-version : 9 schema-type: 4 next-field-id : 536870912 permission : 73402\2 permission : 73401\2 permission : 0\2 vui { id : 536870912 name : Default Admin View label : Default Admin View timestamp : 1185466361 vui-locale : vui-type : 1 owner : Demo last-changed : Demo display-prop : 9\20\4\18\Default Admin View\264\6\0\60019\4\21\ViewWebAlias536870912\165\2\0\164\2\0\203\40\0\214\6\1\201\2\93150\202\2\45600\ } field { id : 700500064 name : zzTemp2 datatype : 4 fieldtype : 1 create-mode: 1 option : 4 timestamp : 1185466361 owner : Demo last-changed : Demo maxlength : 255 menu-style : 1 qbe-match-op : 2 fulltext-optns : 0 permission : 0\1 permission : 3\2 permission : 4\2 permission : 73201\2 permission : 73402\2 display-instance : 536870912\18\20\4\7\zzTemp2\3\41\2\9675\7200\62550\9300\4\6\0\5\6\2\60\40\1\61\40\72\27\8\16\28\6\4\29\6\1\7\40\2147483648\143\40\47\170\40\0\21\41\2\0\400\8 display-instance : 100\2100\151\41\2\8212\0\49949\2100\65\41\2\8550\0\8550\0\66\41\2\50512\0\52874\2100\228\40\1\231\6\0\ } field { id : 700032010 name : PathExcel datatype : 4 fieldtype : 1 create-mode: 1 option : 4 timestamp : 1185466736 owner : Demo last-changed : Demo maxlength : 128 menu-style : 1 qbe-match-op : 2 fulltext-optns : 0 permission : 0\1 permission : 3\2 permission : 4\2 permission : 73201\2 permission : 73402\2 display-instance : 536870912\18\3\41\2\9675\4200\62550\6300\4\6\1\5\6\2\7\40\2147483649\20\4\10\Path Excel\27\8\16\28\6\4\29\6\1\60\40\1\61\40\72\143\40\26\21\41\2\0\400\8100\2 display-instance : 100\151\41\2\8212\0\49949\2100\65\41\2\0\0\0\0\66\41\2\50512\0\52874\2100\228\40\0\170\40\0\231\6\0\ } field { id : 536870910 name : btnGet Path datatype : 32 fieldtype : 0 create-mode: 2 option : 4 timestamp : 1185466724 owner : Demo last-changed : Demo permission : 0\1 permission : 3\2 permission : 4\2 permission : 73401\2 permission : 73402\2 display-instance : 536870912\12\7\40\2147483650\2\8\1\3\41\2\64575\4400\72900\6300\4\6\1\5\6\2\110\4\8\Get Path\143\40\4294967295\170\40\0\21\41\2\0\0\0\0\151\41\2\0\0\8325\0\6 display-instance : 5\41\2\0\0\0\0\66\41\2\0\0\0\0\ } end char-set: windows-1252 # # File exported Thu Jul 26 17:20:27 2007 # begin active link name : testGetXL-GetPath timestamp : 1185466748 export-version : 9 owner : David Sanders last-changed : Demo actlink-order : 5 wk-conn-type : 1
Re: Open Excel doc from a Command Line process
Henry, It must be ARS Wiki day :) I created a utility that obtains the Excel path (and other values) for the installed version and store it in a Global Field. Then, when I need to run Excel I use the value inside this field. The name of the utility is WksInfo. http://arswiki.org/projects/dotnetutil Another approach would be to use a series of Set Fields $PROCESS $ commands to test the existence of the application file. For example: $PROCESS$ cmd.exe /c if exist $zTmpField1$ (echo Yes) else (echo No) Set zTmpField1 to C:\Program Files\Microsoft Office\OFFICE11\Excel.exe. If it doesn't exist then try it with C:\Program Files\Microsoft Office\OFFICE10\Excel.exe, and so on until you find. Stephen From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 11:12 AM To: arslist@ARSLIST.ORG Subject: Open Excel doc from a Command Line process ** Hello ARSList I am rewriting several hard coded functions on the system I have inherited. The latest is a Run Process command to open Excel a user maintained spreadsheet. The current working Command Line in the Run Process action is: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE \\servername\drive\folder\filename.xls I need to rewrite this to function for multiple versions of excel not just from the OFFICE11 install directory. I have tried many interactions with no success even some that work from Start Run in windows but not from the User tool. TIA Thanks Henry STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are
Re: Open Excel doc from a Command Line process
That's what I thought and I've tried that and excel.exe and file and path the same as you could use in a windows start run and that did not work. Thanks Henry Douglas x2065 IT Support Center Remedy Software Administrator First Command Financial Group From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Mayfield, Andy L. Sent: Thursday, July 26, 2007 10:22 AM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process I've not tested this, but couldn't you just use \\servername\drive\folder\filename.xls file:///\\servername\drive\folder\filename.xls without the preceding c:\program files... Wouldn't this cause the system to open with whatever version the user has? I may be way off base though. Andy L. Mayfield Sr. System Operation Specialist Alabama Power Company Office: 8-226-1805 From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 10:12 AM To: arslist@ARSLIST.ORG Subject: Open Excel doc from a Command Line process Hello ARSList I am rewriting several hard coded functions on the system I have inherited. The latest is a Run Process command to open Excel a user maintained spreadsheet. The current working Command Line in the Run Process action is: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE \\servername\drive\folder\filename.xls I need to rewrite this to function for multiple versions of excel not just from the OFFICE11 install directory. I have tried many interactions with no success even some that work from Start Run in windows but not from the User tool. TIA Thanks Henry STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are
Re: Open Excel doc from a Command Line process
Thanks David but I'm not having success with constructing that syntax still trying thou. i.e. no space between the reg location and path statement and I tried surrounding with double ticks HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe \\path\name.xls file:///\\path\name.xls . Thanks Henry Douglas x2065 IT Support Center Remedy Software Administrator First Command Financial Group From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of David Sanders Sent: Thursday, July 26, 2007 10:18 AM To: arslist@ARSLIST.ORG Subject: Re: Open Excel doc from a Command Line process Hi Henry You could use an OLE action to do a RegRead of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Excel.exe\Path HTH David Sanders Remedy Solution Architect Enterprise Service Suite @ Work == ARS List Award Winner 2005 Best 3rd party Remedy Application See the ESS Concepts Guide http://www.westoverconsulting.co.uk/downloads/ESS_Concepts_Guide.pdf tel +44 1494 468980 mobile +44 7710 377761 email [EMAIL PROTECTED] web http://www.westoverconsulting.co.uk http://www.westoverconsulting.co.uk/ From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Douglas, Henry Sent: Thursday, July 26, 2007 4:12 PM To: arslist@ARSLIST.ORG Subject: Open Excel doc from a Command Line process Hello ARSList I am rewriting several hard coded functions on the system I have inherited. The latest is a Run Process command to open Excel a user maintained spreadsheet. The current working Command Line in the Run Process action is: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE \\servername\drive\folder\filename.xls I need to rewrite this to function for multiple versions of excel not just from the OFFICE11 install directory. I have tried many interactions with no success even some that work from Start Run in windows but not from the User tool. TIA Thanks Henry STATEMENT OF CONFIDENTIALITY: The information contained in this message or any attachments to this message are intended only for the person(s) or entity to which it is addressed and may contain confidential and/or privileged material as well as being protected from disclosure. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is strictly prohibited. If you received this in error, please contact the sender immediately and delete the material from any computer. __20060125___This posting was submitted with HTML in it___ __20060125___This posting was submitted with HTML in it___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:Where the Answers Are