• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Launch Excel problems

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to run excel from java using

This is not working. However, if I specify the absolute path it does work. But if I click start -> run and type excel and press enter, somehow windows knows where to find it without the absolute path.
I need to be able to launch Excel without knowing where it is on a PC. Does Excel make some sort of environment variable similar to %systemroot% or something like that?
Any help??
Thanks
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I think you'll have to locate a registry key in Windows where Excel has a string value asigned with his root path, and then get it from your Java code..
Hope this helps.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is an "InstallRoot" associated with Excel in the Windows Registry.
If you go to
Run>regedit.exe
In the window that comes up Select
HKey Local Machine
Software
Microsoft
Office
I have an 8.0 and a 9.0 - select one
Excell
InstallRoot
It names the path to find Excel.
I have not a clue how to do this using java .
 
reply
    Bookmark Topic Watch Topic
  • New Topic