JavaScript API for Office: How to get currently selected cell identifier? -


i've come conclusion functionality not available in javascript api office v1.1, thought i'd make sure here first.

i identifier (ie. "a1") of selected cell, cannot find in api supports this. find odd seems arbitrary requirement , can set current selection using identifier document.gotobyidasync method.

does know if there method access information?

one hacky way might able follows:

  1. add binding region of sheet care about
  2. add change handler binding
  3. call getselecteddataasync , store value
  4. call setselecteddataasync arbitrary string. trigger change handler.
  5. in change handler's callback, data binding
  6. search string , calculate identifier index
  7. restore data

hope helps, might little fragile though.

edit: looks bindingselectionchanged callback gets event position information (startrow, startcolumn, rowcount, columncount) no need hack above :)


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -