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:

  • Is there a way to programmatically access the %temp% directory and read the OfficeAddins.log.txt file from within the add-in side panel?
  • If direct file access is not possible, what alternative solutions could be used to fetch and display the logs from that file in the side panel?
  • Can the Office.js API facilitate secure access to that file?

Additional Information

  • The add-in is built using HTML, CSS and JavaScript, and it operates within the Office.js framework