Creating new files using Office OnlineΒΆ

Hosts can create new Office files using blank document templates from Office Online. In order to support this, hosts use the editnew WOPI action as follows:

  1. Create a zero-byte file with the appropriate file extension (docx for Word documents, pptx for PowerPoint presentations, and xlsx for Excel workbooks).
  2. Invoke the editnew action on the newly created file. Office Online will detect that the file is zero bytes based on the Size property in the CheckFileInfo response.
  3. Once the editnew action has been invoked, Office Online will perform a PutFile operation on the file, overwriting it with template content appropriate to the file type. Note that this PutFile operation will be performed on an unlocked file, so hosts must ensure that PutFile operations on unlocked files that are zero bytes succeed. See the PutFile documentation for more information.