question

TJCrowder-4528 avatar image
0 Votes"
TJCrowder-4528 asked TJCrowder-4528 commented

Reliably Clear Desktop Excel Addin Cache During Dev

I'm struggling to work on a custom functions Office JS addin because Desktop Excel keeps using old copies of the files. (I am, of course, stuck working on a Desktop-specific bug.)

  • I've cleared %LOCALAPPDATA%\Microsoft\Office\16.0\Wef.

  • I've cleared browser cache (though Excel is using slightly different version of Edge than my browser version, v100 instead of v99).

How do I get Desktop Excel to reliably load up-to-date files?

To give you an idea, I've done this sequence repeatedly:

  1. Change main.html to have an observable side effect (requesting a server resource with name "A" for instance).

  2. Eventually got to the point where Excel was using that version of the file.

  3. Changed the file to show a different side effect (requesting "A2" instead).

  4. Closed Excel

  5. Cleared Wef

  6. Cleared browser cache (though again, not clear it's the same one)

  7. Ran the addin

  8. Saw it run the old file

  9. Opened devtools (this addin has a taskpane, so right-click and choose Inspect)

  10. Do fetch("/main.html").then(r => r.text()).then(console.log) and see the updated version of main.html (so, if it's browser cache, it's been updated)

  11. Close Excel

  12. Stop and restart the web server (to clear its cache; it's really basic, only has memory cache)

  13. Open Excel, run the addin, and still see the old side-effect (even though the web server shows a get for main.html)

  14. Repeating the fetch thing gets the latest version; not a browser or server caching issue. It's Excel itself.

This seems really basic and fundamental: Load the latest version of the resource. What am I missing?

Thanks,

-- T.J.

office-scripts-excel-devoffice-js-dev
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You might reasonably wonder why I'm not using the debugging features of the custom functions addin project created by yo office. The answer is: I can't seem to get them working reliably, either: https://github.com/OfficeDev/office-js-docs-pr/issues/3355. (Not my finest hour!) I can on an older project scaffolded with a much older version of the tool, but not with the latest.

0 Votes 0 ·

0 Answers