Code Monkey home page Code Monkey logo

office-js-docs's Introduction

[ARCHIVED]

Note: This repo is archived and no longer actively maintained. Security vulnerabilities may exist in the project, or its dependencies. Instead, visit the current Microsoft Office JavaScript API Reference repo to view the latest content.

office-js-docs's People

Contributors

chbighammsft avatar cwlock avatar danielmgalan avatar davidchesnut avatar ecoteam avatar elizabethsamuel-msft avatar hanjung avatar hongbo-miao avatar hshapley avatar jasonjoh avatar kbrandl avatar keyur32 avatar lauragra avatar lezamax avatar linda-editor avatar lindalu-msft avatar lnyswonger avatar michaelmainer avatar mimisasouvanh avatar mlafleur avatar nokafor avatar rahul-mi avatar reezaali avatar rick-kirkham avatar saunders77 avatar skyms avatar sumurthy avatar timmcmsft avatar umasubra avatar wrathofzombies 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  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  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  avatar

Watchers

 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  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  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  avatar

office-js-docs's Issues

Incorrect information in comment of sample code

In the sample code for InsertOoxml (https://github.com/OfficeDev/office-js-docs/blob/master/word/word-add-ins-javascript-reference/range.md) the comment "https://github.com/OfficeDev/office-js-docs/blob/master/word/word-add-ins-javascript-reference/range.md" is incorrect. The content to be inserted is NOT Office Open XML; it's the old WordProcessingML from Word 2003. It's wrong to lead people to believe that inserting Word Open XML is so simple - it's not. The code is much more verbose and complex. This comment needs to be corrected!

CustomXMLParts listed as shared API but only available for Word

The CustomXMLParts is listed as a shared API resource, but it is only currently available for Word.

The documentation currently says it is not available for Word Online, but our experience is that it is working for us in our developer (edge) tenant.

When will it work for Excel and PowerPoint as this is functionality we have had in the COM API for years now.

Thanks,
Angus

Missing word/numbering.xml in OOXML when retrieving bodyOOXML.value using JavaScript

When using JavaScript to get the OOXML body (bodyOOXML.value) as a string using the following code, the word/numbering.xml package is not included:

Word.run(function (context) {

// Create a proxy object for the document body.
var body = context.document.body;

// Queue a commmand to get the OOXML contents of the body.
var bodyOOXML = body.getOoxml();

// Synchronize the document state by executing the queued commands, 
// and return a promise to indicate task completion.
return context.sync().then(function () {
    console.log("Body OOXML contents: " + bodyOOXML.value);
});  

})
.catch(function (error) {
console.log("Error: " + JSON.stringify(error));
if (error instanceof OfficeExtension.Error) {
console.log("Debug info: " + JSON.stringify(error.debugInfo));
}
});

The word/styles.xml, word/fontTable.xml, etc. are included but without the numbering package we cannot recreate the number formats. Any help appreciated!

Update command docs

We need to remove the preview label and make sure command docs are up to date. Self Assigning.

Can i use WebSocket or Socket.io in add-ins?

first, please understand a pool command of my English.
(I would like my question to be conveyed .)

I am just curios.

Can i use WebSocket or Socket.io in add-ins?
Also, How about React.js?

Outlook JS API?

Any plans for Outlook JS API like Word and Excel?

I would love to enable my adding for Outlook messages as well in addition to Word.

Office.css unclear

The html file references a file "Office.css", but later there is only code for Common.css. Is Office.css something predefined, or was it just forgotten in the description?

File: build-your-first-excel-add-in.md

Typescript and RxJS

These two Microsoft technologies are already used heavily in Angular2, which we are currently designing around, and we would love to have support for them in this API as well.

Angular 2 and Office apps

Hi,

I am using Visual Studio 2015 Update 2 and am having some issues getting Angular 2 to work with Typescript. I was just trying to get a basic sample going based on the Angular 2 quickstart https://angular.io/docs/ts/latest/quickstart.html.

Is what I am doing supported by Office apps(Angular 2 + Typescript + SystemJS + RxJS)?

Thanks in advance!

Update TOC file

The following files aren't linked in the TOC.

develop/office javascript api/support for content and task pane add-ins
excel/format tables in add-ins for Excel

Also, is the office mix content supposed to be under PowerPoint?

Excel API - Cell protection and worksheet protection

Hi,

I am creating an add-in for excel using office js api (typescript + angular). I can see that there is a property called "protection" for worksheet and range types in the office-js.ts file. But the values are never available. I am not able to find any documentation regarding this property. I am wondering whether the properties are added only in the typescript file and not yet added in the actual office js api. Can you please give me a sample on how to retrieve and set the protection values.

Protection property in Worksheet class:
/**
*
* Returns sheet protection object for a worksheet.
*
* [Api set: ExcelApi 1.2]
*/
protection: Excel.WorksheetProtection;

Protection property in RangeFormat class:
/**
*
* Returns the format protection object for a range.
*
* [Api set: ExcelApi 1.2]
*/
protection: Excel.FormatProtection;

This is how I tried loading the values and did not succeed. The property always returns undefined.
Cell protection:
for (var i = 0; i < sourceRange.rowCount; i++) {
cellFormats[i] = [];
//http://stackoverflow.com/questions/35647790/get-individual-cell-formats-in-excel-using-office-js/35658073#35658073
for (var j = 0; j < sourceRange.columnCount; j++) {
if (sourceRange.getCell(i, j) != undefined && sourceRange.getCell(i, j) != null) {
cellFormats[i][j] = sourceRange.getCell(i, j).load(["format/", "format/protection/", "format/protection/locked"]);
}

Worksheet protection:
var protection = ctx.workbook.worksheets.getItem(worksheetName).load("protection");

Thanks,
Anoop.

HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier). (XHR): GET - http://ajax.aspnetcdn.com/ajax/jQuery/jquery.min.map

When trying to run home.html from the BoilerPlate demo, I am getting this js error in the console, and this error probably prevents the buttons from working. Any tips?

HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR): GET - http://ajax.aspnetcdn.com/ajax/jQuery/jquery.min.map

Feedback

  1. The first few paragraphs are redundant. Anytime we modify definitions, we'll have to remember to change in all places. Rather have that in a separate place. You can start with "Your first add-in" section.
  2. should be "The below steps show..."
  3. "loads some data into a worksheet and creates a simple chart." Could we clarify what this "some data" and 'simple chart are? e.g., "sends products data and creates quarterly trend chart"

In general, it'll be good to lead with some background on what add-in does. e.g., Though the product data is hard-coded, it could have been read from a database/external source. The chart creation helps with analysis of the products data, etc.

  1. Do we need "Set it up"
  2. Use passive voice and avoid second person pronouns? I prefer that style.. you don't have to follow it.

Instead of
"To create the add-in, you essentially need to create a web app and an XML manifest file that tells where your web app is located and how you want it to appear within Excel"
-try-
"1. Create web app and XML manifest file that describes the web application's location and its appearance within Excel "
Same applies to other cases such as "Let's now create the...", "Believe it or not, we’ve only just begun exp..."

  1. It'll be helpful to show a diagram at the beginning of the final directory structure that shows all the files/sub-folders.
  2. I'm guessing you'll use the CDN locations in manifest snippet at the end.
  3. "Generate a GUID using an online generator" is one of few options I think. Folks may use in-house generators. Maybe we can say, for this sample an online generator could be used to obtain a GUID.
  4. "Try it out" can use screen shots. Also, you can mention the creation of network share on a standalone desktop. Most people trying this out at home may not have a corp network drive...

Word: Replacing text turns bulleted paragraph into numbered paragraph

I have used both context.document.body.insertOoxml) and paragraph.insertOoxml() to replace text in a paragraph successfully.

However if the paragraph is originally bulleted then I find that Word changes it to a numbered list paragraph when some text in the paragraph is replaced. In other word the list/numbering information is not preserved correctly.

This happens on Windows, Mac and iOS.

Has anyone experienced this? Is it a known issue? Is there a workaround? Is there any preprocessing I can perform on the Ooxml to prevent this from happening?

report a possible bug: Word Online does not fully support office.js v1.1

I am testing my add-in on different platforms

my add-in contains the following code to do runtime checks in my JavaScript code

if (Office.context.requirements.isSetSupported("WordApi", 1.1) { // Code }

my test shows that the above if statement receives a TRUE in Word Online, meaning Word Online fully supports office.js version 1.1 , which i don't believe is true.

my add-in also contains the following code

var searchResults = context.document.body.search('to*n', {matchWildCards: true});

this code works perfectly in Office 2016, but does not in Word Online, this code can only get me an error like this :{"name":"OfficeExtension.Error","code":"GeneralException","me ssage":"This browser does not support the requested API.","traceMessages":[],"debugInfo":{},"stack":"GeneralExcepti on: This browser does not support the requested API.\n at Anonymous function

I went to check Word online, and i found Word Online does not support WildCards search as Office 2016, so I guess maybe this is the reason why I got the above error message.

Is there a way to detemine wherther this code is running in Word 2016 or Word Online, so that I could let my code fail in Word Online

source code of my add-in can be found in my repository "text-effect-autocorrection"

Excel object is not documented

The Excel object exposes a run method but it is not clear what (if any) value such as a promise is returned. Are other methods exposed on Excel? It would be good to document it.

Incorrect / incomplete info topic BreakType (Enum)

This page: https://github.com/OfficeDev/office-js-docs/blob/master/word/word-add-ins-javascript-reference/breaktype.md

  1. The last three entries (section break types) "String" is in the second column instead of a description about what it does
  2. The second and third entries for the "Line" type (ClearLeft and ClearRight) the explanation is incomplete - it doesn't really say how they differ from one another or the first. And since these are not options in the Word Object model we can't look it up there, either.

Opening a link in the docs in "new tab" or "new window" gives Page Not Found error

It seems that every link in the "new" docs on dev.office.com when attempting to "open in new tab" or "new browser window" results in Page Not Found.

Please don't take away this functionality of the browser for the docs. Opening every link in the same tab makes reading the docs very difficult. Please go back to the old way.

Examples
https://dev.office.com/docs/reference/shared/bindings.releasebyidasync.htm
https://dev.office.com/docs/docs/design/add-in-design.htm
...pretty much every link

Thanks.

Several Issues with the "new" Office Add-in docs on dev.office.com; please keep MSDN version for now

The new docs in their current state on dev.office.com need some improvements to match the same level of help as the previous docs on MSDN. Here's just a few the issues encountered so far with the new docs that should be addressed: 1) you can't open links in new tab or window as you get "page not found" (this is the most frustrating problem) and many links are just broken, 2) the docs don't take up my entire window width on my large screen monitor (I have the space, use it), 3) the altering color of table rows (white/blue) makes it less readable and is distracting and text should be top-aligned, 4) the browser back/forward buttons break most of the time, 5) I have no idea where I am in the "big picture" when navigating around, 6) the left menu and the "Docs" vs. "API Reference" at the top are a lot less helpful than the MSDN version, 7) the trailing color of hovering on the left menu is clever but really distracting and the selected nav item is too dark, 8) the syntax coloring of examples is less "bright" than the MSDN version and harder to read and also when you copy/paste the example into OneNote for example it pastes as just red and black, 9) the "Send to OneNote" formatting is not good and just as important, because of #1 issue above, all the links are broken when clicked on in OneNote, 10) overall it took me at least 4 times as long to find the information I was looking for because of "new tab" issue and it seems that I have to scroll a lot more because the left nav is not dynamic to the current context (ex. if I am viewing Table Object the props and methods of the table object should be available on the left nav)

Sorry if this is harsh but it was a very frustrating day trying to find and organize information that I should have been able to do in a couple of hours. I'm sure the docs are a work-in-progress but generally they just don't seem ready for prime time yet.

Please re-activate the MSDN docs until these issues can be resolved.

Thanks.

Instructions do not pertain to Word 2016 for Mac

The word-add-ins.md document states that the document applies to "Word 2016, Word for iPad, Word for Mac." Does "Word for Mac" refer to Word 2016 for Mac or to an older version? The instructions, starting with step 7, do not appear to pertain to the new Word 2016 for Mac. Is there an example of how to use an add-in with that version?

Missing code examples manipulating multiple Word elements

All code examples showing how to read/write data from content controls manipulate only the first element of the list. Please provide examples manipulating multiple elements. For example: get all content controls HTML, insert HTML into a group of content controls, etc.

Tutorial

In the tutorial, Taskpane app manifest version is 1.1 but it is still using old Capabilities element in the manifest. Can you please update as Hosts

Thanks

User data and authentication with js api?

Can we get user data such as Live.com email via the JS api? Would love a snippet :) I would like to associate in app purchases to the logged in user, or prompt the user to login if they are anonymous. Would be convenient if I could use the Live.com user account.

(Overview )Tutorial examples, copy/paste error

The last example before the error code table is copied exactly from the example before it. It should show the application of a formula across a range. Instead, it shows the application of a value across the range - the same as the previous example.

Range.getOoxml() & Range.insertOoxml()

Hello! Please tell me when the methods of Range.getOoxml() and Range.insertOoxml() will be implemented for Word Online? I checked these by Word API 1.1 and get an exception "Not implemented".

ExcelJs-1.2-OpenSpec-sort

Table.apply method param - please provide potential values for the 'method' parameter; describe how to get this from the fields property.

Merge Cells in Excel??

Is this possible maybe with the RangeFormat? Been trying to figure out, need to convert an old VBA application and can't tell if merging cells is supported or not.

Excel API table resize

We have a use case involving many tables in the same sheet (that can be refreshed periodically with data of variable size). Currently, the Table object only supports deleting/adding rows or columns which will attempt to shift everything to the right or below. If the tables are staggered in the sheet, this can cause the refresh/paste operations to fail.

We would therefore like to modify the size of existing tables without shifting neighboring cells. Is it possible to expose the ListObject.resize method in the Excel API to resize Tables?

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.