Git Product home page Git Product logo

office-toolbox's Introduction

topic products languages extensions
sample
office-365
typescript
contentType createdDate
tools
7/13/2017 1:13:10 PM

office-toolbox

Office-Toolbox is a set of tools for validating, and sideloading an Office Add-in. It is not (yet) a part of the official Office Add-in toolchain, but allows you to bypass the manual steps for sideloading add-ins. If you prefer to use the official Office toolchain, see our documentation on getting started with Office Add-ins and how to sideload an add-in.

Installation

Important: If this is the first time you're using this tool, first install Node.js. For developers on Mac, we recommend using Node Version Manager to install Node.js with the right permissions. When the installation completes, restart your console (or if you are using Windows, restart your machine) to ensure you use the updated system environment variables.

Install office-toolbox globally using NPM:

npm install -g office-toolbox

Usage

You can supply arguments on the command-line:

$ office-toolbox sideload -m my-office-addin-manifest.xml -a word

Alternatively, you can run the tool without arguments and it will prompt you for information.

$ office-toolbox

Validating an Office Add-in

$ office-toolbox validate

This tool validates the XML manifest for submission to the Office Store, using an online system, and displays the result in the terminal.

If you created the manifest using the generator, it does not contain a support URL; you will be able to sideload the manifest locally, but you will need to provide a support URL before submitting it to the Office Store.

Sideloading an Office Add-in

Before you submit your Office Add-in to the store, you should test it locally by sideloading its manifest. Be sure that the website is running, and then run the tool.

$ office-toolbox sideload

The tool validates the manifest against the online system. On Windows, the tool writes a registry key to HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\WEF\Developer. On Mac, the tool creates a hard link in ~/Library/Containers/com.microsoft.Word/Data/Documents/wef to your manifest. The tool then generates a document, spreadsheet, or presentation containing your Office Add-in, which you can open every time you want to load your Add-in.

Copyright (c) 2018 Microsoft Corporation. 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 [email protected] with any additional questions or comments.

office-toolbox's People

Contributors

akrantz avatar ceespino avatar davidchesnut avatar dependabot[bot] avatar gesiu avatar hongbo-miao avatar kbrandl avatar keyur32 avatar nokafor avatar o365devx avatar tambdc avatar tcourtneyowen avatar tong-1324 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

office-toolbox's Issues

Validate fails if EquivalentAddins node appears before Hosts node in VersionOverrides

Sample files
manifest-sample-fail.xml.txt
manifest-sample-pass.xml.txt

Using version 0.3.0, this node structure results in a failure:

<VersionOverrides ...>
  <EquivalentAddins>
  </EquivalentAddins>
  <Hosts>
  </Hosts>
  <Resources>
  </Resources>
</VersionOverrides>

Validate output:

Validation: Failed

Error #1:
XML Schema Violation: Your manifest does not adhere to the current set of XML schema definitions for Office Add-in manifests. (link: https://aka.ms/add-in-manifest-schema-violation)

Yet this succeeds:

<VersionOverrides ...>
  <Hosts>
  </Hosts>
  <Resources>
  </Resources>
  <EquivalentAddins>
  </EquivalentAddins>
</VersionOverrides>

If a certain ordering is required for VersionOverrides child elements, it would be helpful to specify that in the VersionOverrides documentation.

Feature request: choose which file to be opened

It would be nice to open a specific file.
We would pass the file path after the flag "--file" or "-f".

Usage suggestions:
office-toolbox sideload -m my/add-in/manifest.xml -a word --file /path/to/file.docx
OR
office-toolbox sideload -m my/add-in/manifest.xml -a word -f /path/to/file.docx
-f /path/to/file.docx

And it would sideload the add-in in the specified file.

Manifest is not refreshed when sideloading

I cannot get my sideloaded TaskPane Excel add-in to reflect changes in the manifest.xml. I've changed all https locations to dummy strings that should fail, but when I sideload the add-in, Excel is pulling from the old manifest.xml somehow.

Short of uninstalling and reinstalling Excel, I've tried everything I can think of.

  • Running sideload from a different location
  • Doing a search of all files in my filesystem with the name "manifest.xml" and deleting those.
  • Deleting every cached item from /User/AppData/Local/Microsoft/Office/16.0/Wef/
  • Deleting everything from /User/AppData/Roaming/Microsoft/Windows/Recent Items

How can I update my manifest?

Manifest validation tool should detect duplicate Resource Ids for Outlook manifests

Whenever an Outlook add-in manifest contains duplicate resource IDs, the add-in installs successfully, however, it doesn't show up in the native Windows Outlook and Mac Outlook clients. It, however, shows up in the online Outlook client (Outlook Web Access / OWA).

It will be very helpful if the Office add-in manifest validator could detect duplicate resource IDs.

This request is a result of an actual issue reported by a customer where an add-in which had been successfully validated by the validation tool failed to show up in the native Outlook client.

Should we ask user where to output the book to? And/or output to temp directory?

Not sure I'm in love with dumping the file at the root; see the effect it had on source control, for example, for a file that I have no intention to check in. And it's not necessarily a name I would have chosen.

image

I would recommend dumping to a temp directory instead. If someone wants to keep the file, they can always "save as" it.

Error in sideloadManifest() not displayed to user

Summary: I am trying to sideload an manifest file named manifest.xml on macOS when my /wef/ directory already has a manifest.xml from another addin. office-toolbox notices that they are two different files (because they have different dev/inodes) and refuses to sideload my manifest file.

Expected behaviour: office-toolbox should alert the user that the manifest file was not sideloaded.

Actual behaviour: office-toolbox acts as if the manifest file was sideloaded.

Relevant source code:

office-toolbox/src/util.ts

Lines 140 to 147 in f3fbfad

if (fs.existsSync(sideloadingManifestPath)) {
const stat = fs.statSync(manifestPath);
const sideloadingStat = fs.statSync(sideloadingManifestPath);
if (stat.ino !== sideloadingStat.ino && stat.dev !== sideloadingStat.dev) {
return reject(['Remove the manifest with matching name before adding this one. ', fs.realpathSync(sideloadingManifestPath)]);
}
}

Suggested change: I believe that the two manifest files are different if stat.dev and stat.ino are different. This lines checks BOTH are different. This should be changed.

office-toolbox validate shows wrong output for manifest file including requirement set of Excel API version 1.9

I added a requirement set of ExcelAPI 1.9 to my manifest file. Based on https://docs.microsoft.com/en-us/office/dev/add-ins/overview/office-add-in-availability, this version is only supported on 'Office on the web', 'Office on Windows (connected to Office 365 subscription)' and 'Office on Mac (connected to Office 365 subscription)'.

But when I validate my manifest file. The output I received is this:

Validation: Passed
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
  - Excel 2016 for Mac
  - Excel 2016 or later
  - Excel Online
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://dev.office.com/add-in-availability).

With Excel API 1.9, do you think it will still work in Excel 2016 and 2019 standalone purchases?

remove command broken on mac

I tried out office-toobox0.2.0 and "npx office-toolbox remove -a excel" will show the manifests, but if you pick one, it won't remove it.

UNABLE_TO_VERIFY_LEAF_SIGNATURE - Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:

Starting around March 18, 2019 we get:

C:\Sandbox\EY\FPP-OfficeAddins2\FPP-Excel-AddIn>npm run sideload

> [email protected] sideload C:\Sandbox\EY\FPP-OfficeAddins2\FPP-Excel-AddIn
> office-toolbox sideload -m manifest.xml -a Excel

ApplicationInsights:CorrelationIdManager [ { Error: unable to verify the first certificate
      at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
      at TLSSocket.emit (events.js:189:13)
      at TLSSocket._finishInit (_tls_wrap.js:633:8) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } ]
ApplicationInsights:Sender [ 'Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:',
  { Error: unable to verify the first certificate
      at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
      at TLSSocket.emit (events.js:189:13)
      at TLSSocket._finishInit (_tls_wrap.js:633:8) code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' } ]
Deleted file: C:\Users\lewis\AppData\Local\Temp\excel add-in 841a65bf-dc23-4a21-8b2b-027515cc18e3.xlsx
Generating file C:\Users\lewis\AppData\Local\Temp\excel add-in 841a65bf-dc23-4a21-8b2b-027515cc18e3.xlsx
Opening file C:\Users\lewis\AppData\Local\Temp\excel add-in 841a65bf-dc23-4a21-8b2b-027515cc18e3.xlsx
For more information about how to sideload Office Add-ins, visit the following link: https://docs.microsoft.com/en-us/office/dev/add-ins/testing/create-a-network-shared-folder-catalog-for-task-pane-and-content-add-ins

The run-sideload function still owrks, but this message says there was an erorr

Can not sideload when Word is installed as app

When Word is installed via the app store the sideload command throws the following exception:

image

The path where Word gets installed as app is:

C:\Program Files\WindowsApps\Microsoft.Office.Desktop.Word_16051.11901.20120.0_x86__8wekyb3d8bbwe\Office16

Support for WSL sideloading

I prefer to do most of my dev work / terminal interactions through WSL. This has worked out fairly well by mounting the c drive so that I can run visual applications like VS Code, but use an ubuntu terminal for things like actual yarn build. I would strongly prefer to not maintain a two dev environments (in and out of WSL).

I've tried using the sideload command in a plugin dev workflow, but the root path for the sideload directory is determined through os.home() which isn't quite the desired folder when operating through WSL, and can't be symlinked from my working directory:
Error: EXDEV: cross-device link not permitted, link '/mnt/c/Users/rniem/<dev path>/excel-plugin/my-office-add-in-manifest.xml' -> '/home/ricky/Library/Containers/com.microsoft.Excel/Data/Documents/wef/my-office-add-in-manifest.xml'

Ideally this would be configurable so that WSL support can work with the mounted directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.