title: Using environment variables to find Excel directory and run script
body: <p>In Java I need convert a .xlsb file to a .xlsx and I do it by run console command:</p>
  
  <pre><code>String command = "C:\\Program Files (x86)\\Microsoft Office\\Office12\\excelcnv.exe -oice "+fileName+" "+convertedFileName;
  Runtime commandPrompt = Runtime.getRuntime();
  try {           
      Process powershell = commandPrompt.exec(command);
      powershell.waitFor();
  } catch (Exception e) { 
      System.out.println("Error converting file to XLSX");
      e.printStackTrace();
  }
  </code></pre>
  
  <p>But I want to replace path to Excel file, because it can be different for each machine. I'm trying to use <code>%ProgramFiles(x86)%</code> instead of <code>C:\\Program Files (x86)</code> but it doesn't work, any ideas how to replace path to <code>excelcnv.exe</code> and make it more universal?</p>