Search code examples
javascriptexcelonedrive

How do I Get and Set a field in a Onedrive embedded Excel sheet?


In JS, how do I Get or Set a field in a Onedrive embedded Excel sheet?

I'm really just looking for the any simple solution for it.

History: At present, I'm using the Javascript setup for adding the project, as found here.

I'm also using this script to get the sheet, once it is loaded.

var a = Ewa.EwaControl.getInstances().getItem(0);
var b = a.getActiveWorkbook();
var c = b.getActiveSheet();

But with the active sheet, I don't know how to get the cells or set them.

If you know how to finish the code I have, great. If you know another solution, that would also be fine.

  • Thanks.

Solution

  • To Get/Set the cell data, use the Async call from c (the selected range)

    GET: https://msdn.microsoft.com/en-us/library/office/ee588949.aspx

    SET: https://msdn.microsoft.com/en-us/library/office/ee588957.aspx