How to consume web API with authentication in Excel 2010

我只是一个虾纸丫 提交于 2019-12-19 11:25:54

问题


I have an exmaple of mvc 4 web API , and I want to consume it in Excel 2010. whats the easiest way to do it? I am thinking to pass in the username and password as string parameter if solution need to be complicated.

        [Authorize]
        public class AccountBalanceApiController : ApiController
        {
            //http://localhost/FTAccounting/api/AccountBalanceApi?companyId=16&fiscalYear=2012
            public Dictionary<int, TrialBalanceAccountSummaryModel> Get(int companyId, int fiscalYear)
            {
                return AccountBalance.GetTrialBalance(companyId, fiscalYear);
            }
        }

Update: Web service Authentication is not possible in Excel. Reference from http://cwebbbi.wordpress.com/2012/07/31/using-the-webservice-function-in-excel-2013/


回答1:


web service Authentication is not possible in Excel. reference from http://cwebbbi.wordpress.com/2012/07/31/using-the-webservice-function-in-excel-2013/



来源:https://stackoverflow.com/questions/18119393/how-to-consume-web-api-with-authentication-in-excel-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!