Can't run a macro twice

Problem: I can’t run a macro twice.

Document Server version: Spredsheet 7.0.1
Installation method: docker
OS: Windows
Browser version: Chrome 108

So, I want to make a simple button to change the column width. Works fine for the first time, but when I change the width manually and run the macro again it should resize it again but nothing happens.

Same happens when I use the isHidden(true) command.

Basically, what I need is to hide some columns with a click of a button and show them again with another button. The best option would be only a toggle button but two buttons are fine too.

Macro:

(function()
{
    Api.GetActiveSheet().SetColumnWidth(5, 25);
})();

Thanks.

Hello @Marc

Please not that you are using an outdated version 7.0.1 of our editors, the actual version is 7.2.1. On the actual version I wasn’t able to reproduce described issue.

I recommend you to update the Document Server and check the situation again.

1 Like