Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Retrieve Logs from %temp%\OfficeAddins.log.txt and Display Them in the Side Panel of an Excel Add-In #433

Open
KishanVaishnani opened this issue Jan 4, 2025 · 5 comments
Assignees
Labels
Area: Excel Feedback related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback

Comments

@KishanVaishnani
Copy link

I have developed an Excel add-in that provides product live 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. To help troubleshoot customer issues more effectively, I want to retrieve the logs from this file and display them in the side panel of the add-in.

Key Requirements:

Access the %temp%\OfficeAddins.log.txt file programmatically
Read the log file contents
Display the logs in the side panel UI of the add-in, allowing users to view error details for troubleshooting purposes

Questions:

  1. Is there a way to programmatically access the %temp% directory and read the OfficeAddins.log.txt file from within the add-in side panel?
  2. 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?
  3. Can the Office.js API facilitate secure access to that file?
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 4, 2025
@AlexJerabek
Copy link
Contributor

Hi @KishanVaishnani,

Would you be able to use local or session storage for the logs? That should work across platforms.

@KishanVaishnani
Copy link
Author

Hi @AlexJerabek

No, we can't do that because this is a JavaScript-only runtime. I can't use window or OfficeRuntime storage as my add-in does not use the shared runtime

@AlexJerabek
Copy link
Contributor

I'll tag @grangeryy to take a look. You should also consider posting this on Stack Overflow (with the office-js tag) where other members of the community can weigh in.

@AlexJerabek AlexJerabek added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: Excel Feedback related to Excel add-ins and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 7, 2025
@grangeryy
Copy link
Collaborator

Hey @KishanVaishnani , could you move the issue to the repo under "https://github.com/officedev/office-js/issues" as we are actively tracking issues there?

@KishanVaishnani
Copy link
Author

KishanVaishnani commented Jan 8, 2025

Hey @grangeryy

I’ve created it, but it is closed #5238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Excel Feedback related to Excel add-ins Needs: attention 👋 Waiting on Microsoft to provide feedback
Projects
None yet
Development

No branches or pull requests

3 participants