OfficeDev/Excel-Add-in-JavaScript-PersistCustomSettings

Name: Excel-Add-in-JavaScript-PersistCustomSettings

Owner: Office Developer

Description: This sample demonstrates how to save custom settings in an Excel Add-in. The add-in stores data as key/value pairs, using the JavaScript API for Office property bag, browser cookies, web storage (localStorage and sessionStorage), or by storing the data in a hidden div in the document.

Created: 2015-08-12 23:25:41.0

Updated: 2017-06-10 20:09:21.0

Pushed: 2018-01-31 20:32:20.0

Homepage:

Size: 1241

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Excel-Add-in-JavaScript-PersistCustomSettings

Table of contents

Summary

This sample demonstrates how to save custom settings inside an Excel Add-in. The add-in stores data as key/value pairs, using the JavaScript API for Office property bag, browser cookies, web storage (localStorage and sessionStorage), or by storing the data in a hidden div in the document. The add-in also demonstrates best practices for implementing multiple-page navigation in an add-in for Office.

Prerequisites

This sample requires the following:

Key components of the sample

The Persist custom settings sample add-in contains the following notable files:

The CodeSample_PersistCustomSettings project, including:

Build and debug
  1. Choose the F5 key in Visual Studio to build and deploy the add-in.
  2. Use the add-in?s interface to save data as key/value pairs and to retrieve a stored value using its key.

Troubleshooting

If the add-in fails to install, ensure that the SourceLocation element in the CodeSample_PersistCustomSettings.xml has the correct URL value for the DefaultValue attribute.

Questions and comments

Additional resources
Copyright

Copyright (c) 2015 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.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.