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:
- Programmatically access the
%temp%OfficeAddins.log.txt
file - Read the file contents
- 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 theOfficeAddins.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