Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

[ARCHIVED] A Microsoft Office Excel Add-in that integrates with QuickBooks.

License

Notifications You must be signed in to change notification settings

OfficeDev/Excel-Add-in-ASPNET-QuickBooks

Repository files navigation

[ARCHIVED] Excel Add-in with ASP.NET and QuickBooks

Note: This repo is archived and no longer actively maintained. Security vulnerabilities may exist in the project, or its dependencies. If you plan to reuse or run any code from this repo, be sure to perform appropriate security checks on the code or dependencies first. Do not use this project as the starting point of a production Office Add-in. Always start your production code by using the Office/SharePoint development workload in Visual Studio, or the Yeoman generator for Office Add-ins, and follow security best practices as you develop the add-in.

Your Excel Add-in can connect to a service like QuickBooks and import data into your Excel spreadsheet. This Excel Add-in demonstrates how to connect to QuickBooks, gets sample expense data from a sandbox account provided by QuickBooks, Sandbox Company_US_1, and imports the sample data into a spreadsheet. The add-in also provides a button to create a chart from the sample data.

Table of Contents

Prerequisites

Configure the project

Configure your app at developer.intuit.com to get started.

  1. Go to https://developer.intuit.com/ and sign up for a developer account, and then sign in.
  2. In the upper right hand corner, choose My Apps and select an app or click Create new app.
  3. Once the app is selected, choose Development | Keys, and copy OAuth Consumer Key and OAuth Consumer Secret to a place where you can access them later.
  4. Download or clone the sample to your local machine.
  5. Open the solution file QbAdd-inDotNet.sln in Visual Studio.
  6. In Visual Studio, open Web.config and insert the values for ConsumerKey and ConsumerSecret, like this.
<appSettings>
    <!-- QuickBooks Settings -->
    <add key="ConsumerKey" value="insert your OAuth Consumer Key here" />
    <add key="ConsumerSecret" value="insert your OAuth Consumer Secret here" />
    <add key="OauthLink" value="https://oauth.intuit.com/oauth/v1" />
    <add key="AuthorizeUrl" value="https://workplace.intuit.com/Connect/Begin" />
    <add key="RequestTokenUrl" value="https://oauth.intuit.com/oauth/v1/get_request_token" />
    <add key="AccessTokenUrl" value="https://oauth.intuit.com/oauth/v1/get_access_token" />
    <add key="ServiceContext.BaseUrl.Qbo" value="https://sandbox-quickbooks.api.intuit.com/" />
    <add key="DeepLink" value="sandbox.qbo.intuit.com" />
  </appSettings>

Run the project

  1. Press F5 to run the project.

  2. Launch the add-in by selecting the command button from the ribbon in Excel.
    QuickBooks Excel Add-in command button

  3. Click Connect to QuickBooks to launch the QuickBooks sign-in window.
    Task pane sign in

  4. If an error window opens in Visual Studio, click Continue and navigate back to Excel. This error is unrelated to the sample.
    Visual Studio error window

  5. Sign in to QuickBooks with your QuickBooks developer account.
    QuickBooks sign in dialog window

  6. Click Authorize to allow QuickBooks to send data to the add-in.
    QuickBooks authorize dialog window
    The task pane will display two actions to choose from.
    Select action task pane

  7. Choose Get Expenses to import expenses from QuickBooks into a spreadsheet.
    Expenses spreadsheet

  8. Choose Create Chart to insert a chart.
    Insert chart

Understand the code

  • Home.html - Defines the task pane page on start up, and after the user has logged in.
  • Home.js - Handles user interaction for sign in, sign out, get expenses, and insert chart. Here, the dialogDisplayAsync API is called to open a dialog window for the user to sign in to QuickBooks.
  • QbAdd-inDotNet.xml - The manifest file for the add-in.
  • QuickBooksController.cs - Gets expense data from QuickBooks.
  • FunctionFile.js - Adds a chart to Excel.
  • OAuthManager.aspx.cs - Handles sign in to QuickBooks from the dialog API.

Questions and comments

We'd love to get your feedback on the Excel Add-in with ASPNET and QuickBooks sample. You can send your feedback to us in the Issues section of this repository. Questions about Office 365 development in general should be posted to Stack Overflow. Make sure that your questions are tagged with [Office365] and [API].

Additional resources

Copyright

Copyright (c) 2016 Microsoft. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

[ARCHIVED] A Microsoft Office Excel Add-in that integrates with QuickBooks.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published