FWIW Google Sheets does have the ability to write macros in JavaScript. They even have an npm tool [0] that will let you edit offline via your preferred IDE and then push to your sheet.
[0] https://developers.google.com/apps-script/guides/clasp
[1]https://developers.google.com/apps-script