0
votes

The documentation of getFileAsyc says it will always be in (.pptx or .docx) in Office Open XML (OOXML)

Since Office 2016 this holds no longer true, if one saves the file in OpenDocument format (*.odt).

How will I get the information about the filetype? The name ends with *.odt, but in Word 2013 the name also ended with *.odt, but was transferred as *.docx

Example:

In following case, the binary filecontent cannot be determined:

  1. Create an empty file in Word
  2. Insert your TaskpaneApp
  3. Safe the file as *.odt to you PC in Word
  4. call getFileAsync(Compressed), and
  5. get no docx but odt-content in Word 2016 with the name .odt
  6. get docx-content in Word 2013 with the name .odt

For Word 2013 I fixed the problem by adding .docx to the provided name. Exactly this fix causes the Problems with Word 2016, where the file is realy a *.odt

1

1 Answers

0
votes

The input parameter of the getFileAsync method is precisely the file type you need. And this is independently on which format you saved the file.

Office.js supports 3 file types: compressed (which is docx,pptx, etc), text (plain text) and PDF. ODT is not a file format supported in the getFileAsync Method. Check the article you referred to see what formats are supported in which Office Applications.

hope this clarification helps.