4 ms·
Is it really not possible to write unit tests for a spreadsheet with Office Script? > and have a formula accidentally replaced by a static number on line 87456
by tomjakubowski 3y ago
Is it really not possible to write unit tests for a spreadsheet with Office Script?
> and have a formula accidentally replaced by a static number on line 87456
Surely this specific case could be validated externally with a script too.
- theshrike79 3y agoYes, it's possible to do a VBA macro or an external program to validate a sheet. But there is no built-in tool you can use to say to excel "this column must always be a number, don't ever allow it to be autodetected as a date" or "this column must always have a formula, if the formula doesn't exist or is a static number, alert the user". You can lock cells, but who bothers doing that in the real world.
- elmolino89 3y agoIf one has to write a program to check if a user did not screw up cut and paste from one sheet/column/whatever it would be IMHO easier to just skip Excel, user and just write a script automating error prone C&P in Excel. If some user wants to view it, then the script can create a valid Excel file.