javascriptoffice-jsexcel-addins

How to Retrieve Logs from %temp%\OfficeAddins.log.txt and Display Them in an Excale Add-in Side Panel


I have developed an Office JavaScript Excel add-in that provides live product pricing using custom streaming functions. The office add-in javascript-only function is designed to log errors in a file located at %temp%\OfficeAddins.log.txt on the user's machine.

To enhance troubleshooting for customer issues, I want to:

  1. Programmatically access the %temp%\OfficeAddins.log.txt file
  2. Read the file contents
  3. Display the logs dynamically in the side panel of the add-in, allowing users to view error details

Questions:

Additional Information


Solution

  • Office add-ins are web applications and face the same security limitations that web applications do. Except for certain highly constrained situations (e.g. cookies), web applications cannot access the local drive of the client computer. You could ask your question again, but tag it as just a web application. Don't mention office.js, Excel, or add-ins.

    As alternatives, you could try storing the info in the workbook itself with custom properties. You might also consider creating a user table database on your backend and uploading the info to that database.