open sheet other than ActiveSheet

Help
Mahela
2012-05-27
2013-05-20
  • Mahela
    Mahela
    2012-05-27

    How do I open a worksheet other than the ActiveSheet.  I have tried many combinations without access.

    The example below is for the active sheet

          Dispatch workBooks = xl.getProperty("Workbooks") .toDispatch();
          Dispatch workBook = Dispatch.call(workBooks, "Open", file.getAbsolutePath()).toDispatch();
          Dispatch sheet = Dispatch.get(workBook,"ActiveSheet").toDispatch();