I am new to Office.js API
. I am trying to develop Web Add-In for Excel
and I need to get data from WebAPI
for this I am trying to use ajax
but its not working
Here is very simple Ajax code
$.ajax({
url: "http://localhost:61721/api/values",
type: "GET",
dataType:"JSONP",
success: function (data) {
$("#div1").html(JSON.stringify(data));
},
error:function(error){}
});
Update
Is there any alternative way other than Ajax
in Office.js
through which we can get data from Web API
?