Excel Path (OpenInsight 32-bit Specific)
At 30 JUN 2009 02:02:52PM Ana Melisa Heras wrote:
Is there a way that I can programmatically get the complete path where Excel is installed?
Thanks in advanced for your help…..
At 30 JUN 2009 02:34PM Jared Bratu wrote:
Not to side track your question but what is the end result once you have the complete path. Are you trying to open Excel documents automatically?
At 30 JUN 2009 02:37PM Bob Carten wrote:
* Using a DOS command
ftype | find "excel.csv" /i
* Using OLE in OpenInsight
oXl=OleCreateInstance('EXCEL.APPLICATION')
app=oxl-]Application
path=app-]Path
At 01 JUL 2009 05:29AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
… or if you want to ask the registry directly…
0001 0002 declare function registry_Method 0003 0004 xlCLSID = registry_Method( "READ", "HKEY_CLASSES_ROOT\Excel.Application\CLSID\" ) 0005 if len( xlCLSID ) then 0006 xlRegKey = "HKEY_CLASSES_ROOT\CLSID\" : xlCLSID : "\LocalServer\" ) 0007 xlPath = registry_Method( "READ", xlRegKey ) 0008 0009 … xlPath contains file name and path etc … 0010 0011 end else 0012 Excel not installed? 0013 end 0014
World leaders in all things RevSoft
At 01 JUL 2009 05:31AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Maybe I should have remembered those pesky brackets …
0001 0002 declare function registry_Method 0003 0004 xlCLSID = registry_Method( "READ", "HKEY_CLASSES_ROOT\Excel.Application\CLSID\" ) 0005 if len( xlCLSID ) then 0006 xlRegKey = "HKEY_CLASSES_ROOT\CLSID\" : xlCLSID : "\LocalServer\" ) 0007 xlPath = registry_Method( "READ", xlRegKey ) 0008 0009 … xlPath contains file name and path etc … 0010 0011 end else 0012 Excel not installed? 0013 end 0014
World leaders in all things RevSoft