How to consume web API with authentication in Excel 2010


Staff member
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.

        public class AccountBalanceApiController : ApiController
            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 <a href="" rel="nofollow"></a>