如何使用Web API身份验证在Excel 2010中 [英] How to consume web API with authentication in Excel 2010

查看:209
本文介绍了如何使用Web API身份验证在Excel 2010中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4 MVC的Web API的〔实施例,并且我想使用它在Excel 2010中什么最简单的方式做到这一点?我想作为字符串参数的用户名和密码来传递,如果解决方案需要很复杂。

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);
            }
        }

更新:Web服务的身份验证是不可能在Excel中。从的http://cwebbbi.word$p$pss.com/2012/07/31/using-the-webservice-function-in-excel-2013/

推荐答案

Web服务的身份验证是不可能在Excel中。从的http://cwebbbi.word$p$pss.com/2012/07/31/using-the-webservice-function-in-excel-2013/

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

这篇关于如何使用Web API身份验证在Excel 2010中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆