microsoft / advanced-formula-environment

Create, edit, and reuse formulas in Excel
https://aka.ms/get-afe
MIT License
109 stars 11 forks source link

Removal of hidden sheets #41

Closed MounirBenzi closed 1 year ago

MounirBenzi commented 1 year ago

Following up on #30,

Have there been any developments to having the hidden sheets generated by AFE being removed automatically after use?

Also, in its current form, will hidden sheets maintain the same name across different workbooks? - This would help us build a macro that finds and deletes any hidden sheets.

Thanks!

jack-williams commented 1 year ago

Have there been any developments to having the hidden sheets generated by AFE being removed automatically after use?

There are currently two uses of hidden sheets.

  1. The deprecated "code" sheet that kept the formatted lambda code.
  2. The hidden sheet we use to determine locale settings on start-up.

For 1. while we have deprecated that code sheet, we are not deleting it. As part of AFE 1.1 we released new functionality that would silently upgrade the code hidden sheet to use custom XML parts, but kept the hidden sheet around incase there were any problems. We've been running AFE 1.1 for a while now, so we could in theory extend the upgrade code to also clear up the hidden sheet.

For 2. we have updated AFE to delete that hidden-sheet after running the initialisation. I need to see if that change has been deployed.

Also, in its current form, will hidden sheets maintain the same name across different workbooks?

Hidden sheets will keep the same name across all uses. That is, the "code" sheet will always use the same name, as will the locale name. We fix these using GUIDs. You could write code to detect the specific names and remove them.