title: How to get cell coordinates of active cell from other spreadsheet
body: <p>I have this script for getting coordinates of active cell to UI.</p>
  
  <pre><code>function createUI(id, url, title) {  
  
  
    var UI = UiApp.createApplication().setHeight(300).setWidth(300).setTitle("Výběr dat pro převod provizí.");
  
    var HandlerGetCellCoordinatesCisloNavrhu = UI.createServerHandler("getCellCoordinatesCisloNavrhu").addCallbackElement(hiddenID);
    var firstCellCisloNavrhu = UI.createTextBox().setId("first_cell_cislo_navrhu").addFocusHandler(HandlerGetCellCoordinatesCisloNavrhu);
    var panel1 = UI.createAbsolutePanel().add(firstCellCisloNavrhu);
    var captionPanel1 = UI.createCaptionPanel().setText("první buňka s číslem návrhu smluv").add(panel1);
  
  
    var button = UI.createButton().setText("submit");
    var vertical = UI.createVerticalPanel()
    .add(captionPanel1)
    .add(button);
    var pole = UI.add(vertical);
    SpreadsheetApp.getActiveSpreadsheet().show(UI);
  }
  
  function getCellCoordinatesCisloNavrhu(e){
    var id = "1uVb_ndCQQNu3DCyQQQOwMAAHUcApRnhQn3patIYBZS8";
    var UI = UiApp.getActiveApplication();
    var cell = SpreadsheetApp.getActiveSpreadsheet().getActiveRange();
    var row = cell.getRow();
    var column = cell.getColumn();
    var cellCoordinates = row + "," + column;
    UI.getElementById("first_cell_cislo_navrhu").setText(cellCoordinates);
    return UI;
  }
  </code></pre>
  
  <p>It works well but I need get coordinates from other spreadsheet then the script contains. There is the issue. If I open the other spreadsheet by "openById" I get only the "1, 1" coordinates, though I have physically opened the other spreadsheet and set active cell to other position. I know it is clear that there is set A1 cell as active by opening sheet, but I don't konw how to evade it.</p>
  
  <p>Has someone any idea?</p>