0

I'm creating a word add-in using the word javascript api that pulls data from database, allowing users to create tables/text with the data. I would now like to add the functionality to change charts based on the data

I can see information about editing charts in the documentation for excel, however I can't see anything for word.

Is it possible to edit chart data within word? If so, would someone be able to provide me an example or link to the appropriate location to look?

I've tried doing it in excel and have made progress but can't see anything on the word side

1 Answer 1

1

I'm afraid that there are no chart editing APIs in the Word JavaScript yet. It's a good idea, and you can suggest it at Office Developer Suggestion Box.

In the meantime, a chart in Word is a element in the file's OOXML. You could try the following workaround: Your add-in could get the XML using the Office.Document.getFileAsync, edit the OOXML, then use the Word createDocument API to create a new document that is just like the original, but with your chart edits.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Rick. I'll add the suggestion, and look into the OOXML. I wondered if it was due to restrictions with charts on the word online version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.