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.
Applies to: Excel 2016
This task pane add-in shows how to consolidate data from multiple worksheets using the JavaScript APIs in Excel 2016. It comes in two flavors: code editor and Visual Studio.
The simplest way to deploy and test your add-in is to copy the files to a network share.
-
Host the files in the Code Editor Proj by using a server of your choice.
-
Edit the <SourceLocation> and <Url> elements of the manifest file (ConsolidatedSaleReportManifest.xml) so that it points to the hosted location from step 1.(for example, https://localhost/consolidatedsalesreport/home.html)
-
Copy the manifest (ConsolidatedSalesReportManifest.xml) to a network share (for example, \\MyShare\MyManifests).
-
Add the share location that contains the manifest as a trusted app catalog in Excel.
a. Launch Excel and open a blank spreadsheet.
b. Choose the File tab, and then choose Options.
c. Choose Trust Center, and then choose the Trust Center Settings button.
d. Choose Trusted Add-in Catalogs.
e. In the Catalog Url box, enter the path to the network share you created in step 3, and then choose Add Catalog.
f. Select the Show in Menu check box, and then choose OK. A message appears to inform you that your settings will be applied the next time you start Office.
-
Test and run the add-in.
a. In the Insert tab in Excel 2016, choose My Add-ins.
b. In the Office Add-ins dialog box, choose Shared Folder.
c. Choose Consolidated Sales Report Sample>Insert. The add-in opens in a task pane to the right of the current worksheet, as shown in the following figure.
d. Select the Americas, Asia, and Europe checkboxes and click the **Consolidate!** button. This will create new Dashboard sheet that shows a sumary view of all the selected sheets.
- Copy the project to a local folder and open the Excel-Add-in-JS-ConsolidatedSalesReport.sln in Visual Studio.
- Press F5 to build and deploy the sample add-in. Excel launches and the add-in opens in a task pane to the right of a blank worksheet, as shown in the following figure.
d. Select the Americas, Asia, and Europe checkboxes and click the **Consolidate!** button. This will create new Dashboard sheet that shows a sumary view of all the selected sheets.