An Office service that supports add-ins to interact with objects in Office client applications.
Please find the answers below for the queries:
- Base64 comparison
- Is the exact same Base64 string returned by your API used for both the first and subsequent insertFileFromBase64() calls?
- Yes, exact same base65 string is returned by API.
- Could you please log the Base64 string length (rather than the full content) immediately before each call and confirm whether the length/content is identical?
- I have confirmed it and it is valid length. I cross checked the string by pasting it to base64 to word converter online and it is getting converted to word file perfectly.
- How the file is obtained
- Please confirm whether the file retrieved from the server is the original output from getFileAsync(), or whether it is decoded, converted, compressed, or otherwise processed before being returned by the API.
- Yes, the file is same as saved from getFileAsync(). There is no processing on it. The file is sent in slices the to the server and when last slice is sent, it then merges all those slices and makes a word document file.
- If possible, please provide the relevant API response format or a sanitized sample.
- I have attached the returned base64 content from API. base64 content.txt
- Insertion code - please refer these methods: insertUsingBase64() - for inserting the base64 into the word file and sendFile() - for how file slices are sent to server.
- Please share the smallest code sample containing:
- getFileAsync()
- the API call used to retrieve the saved file
- the Base64 conversion
- both insertFileFromBase64() calls
- Please also include the coercionType and insertLocation values used.
- Document state
- Are the two insertions performed in the same Word document/session?
- Yes.
- Are they performed sequentially, with context.sync() completed after the first insertion?
- Yes.
- Does the second insertion fail only when inserting the same file twice, or does it also fail when inserting a different valid .docx file?
- Second inserting is behaving very randomly. After 15 to 60 seconds, it will get inserted out of nowhere when I am working on the document.
- Error details - please check the attached image file for errors. Errors screenshot.png
- For the "OOXML malformed" error, please provide the complete error message and error code, if available.
- If the operation fails silently, please confirm whether the returned Word.run()/Promise is resolving successfully or whether an exception is being caught elsewhere.