microsoft / advanced-formula-environment

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

Add automatic formula format setting as the current "automatically format grid formulas" setting does not do the job #71

Open uahnbu opened 12 months ago

uahnbu commented 12 months ago

Currently, the "automatically format grid formulas" setting only format the formula based on the size of the editor. The format is not reflected in the cell value when applied.

There are some workarounds, but they are quite cumbersome:

I believe there should be a separate setting for this feature:

jack-williams commented 12 months ago

If you disable "automatically format grid formulas" you can use Ctrl-Shift-F (or right-click "Format document") to format formulas, and these will be preserved in the Excel cell. This wont be automatic formatting, but at least saves copying and pasting.

Roughly, there seem to be a couple of dimensions of settings:

Does this capture your requirements?

uahnbu commented 12 months ago

Oh thank you. Good to know about the Right Click menu, and about the Ctrl+Shift+F shortcut 🤩.

The "Automatically format grid formulas" option is kinda weird. I don't think that is what the users think to be the default option (or maybe because I'm used to VSCode?). I expect whatever I see in AFE (auto-formatted or not) is saved permanently as is in the cell. Currently:

Also I guess its name is not reflecting its functionality. It should be "Automatically format editor formulas" or inspired from Chrome Devtools: "Pretty print".