excelweb-servicesurivstocells

Calling a webservice URI from excel sheet cell


I need to call a webservice URI from an Excel cell. I know this can be done using the in-built WEBSERVICE function. However, passing the parameters on the fly to the URI can be a bit tedious. For.eg. my webservice URI is :

http://localhost/getEmployeeSalary?emloyeeName=MisterFoo&employeeId=101

The values MisterFoo and 101 are pulled from other cells in the sheet.

So what I am looking for is to call the service like an Excel function (SUM, AVG, etc.), which would look like

=getEmployeeSalary(A2,B4)

where A2 cell contains MisterFoo and B4 cell contains 101.

For now, I have tried looking for a solution but the only thing that comes up is using ribbons (Excel Add-in project in Visual Studio) that take parameters and store the value in a pre-defined cell. This is not what I am looking for though.

Any help or suggestion would be appreciated. Thanks in advance!


Solution

  • Hey guys I really appreciate your help. This is what I was looking for: http://blogs.msdn.com/b/eric_carter/archive/2004/12/01/writing-user-defined-functions-for-excel-in-net.aspx