OfficeDev / OfficeDev/Excel-Custom-Functions

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

Open
#433 5 comments 0 reactions 1 assignee View on GitHub

@grangeryy is already working on this.

Since Jan 7, 2025.

Area: Excel Needs: attention :wave:
Dominant language
TypeScript
Stars
333
Forks
69
Avg merge
3d 15h
Merged PRs (30d)
3

Description

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?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.