Dinesh Haraveer
Dinesh Haraveer

Reputation: 1804

How To Bind Data to excel in Office 365 web app

I'm completely new to Office 365 Web App.I want to bind the data from database to excel in office 365.How to bind that data,please anybody provide me any sample code or links for binding data to the excel.

Thanks,

D Haraveer.

Upvotes: 0

Views: 453

Answers (1)

shankar.parshimoni
shankar.parshimoni

Reputation: 1299

function test(name) {
var result = "->";
try{
    $.ajax({
        type: 'POST',
        url: 'Service1.svc/GetData',
        contentType: 'xml',
        data: '{"value":' + name + '}',
        success: function (msg) {
            Office.context.document.setSelectedDataAsync(msg);
        },
        error: function () {
            result = "fail";
        }
    });
} catch (err) {
    result = err.description;
}
return result;

}

By using wcf service you can achieve the task.Here you need to write jquery code for getting values from the database.Above sample code for binding values from database.

Upvotes: 2

Related Questions