Recently, I had a need to download the preview of the OfficeJS API for testing in an offline environment. The primary (and preferred) way to access the preview beta library is to point to it on the CDN via your HTML, like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|<meta charset="UTF-8" />|
|<meta http-equiv="X-UA-Compatible" content="IE=Edge" />|
|<title>My OfficeJS Add-in</title>|
|<!– PREVIEW API CDN –>|
However, if you need to download this for use offline in testing, you can actually download it using Node Package Manager. All you need is this command:
npm install @microsoft/office-js@beta
I was able to do my testing as if I were online with the CDN, so all was good. Happy coding!