Python macro: How to freeze first row of another sheet?

I use this code to freeze first row of the current sheet

doc = XSCRIPTCONTEXT.getDocument()
#sheets = doc.Sheets
#sh_actions = sheets['Actions']
#sh_base = sheets['Base']

doc.getCurrentController().freezeAtPosition(0,1)

But at the moment I have two sheets. One named ‘Base’ and one named ‘Actions’

In the ‘Actions’ sheet there is a button that will call the macro to insert the data in the ‘Base’ sheet and I want to freeze first row of the ‘Base’ sheet but without changing the focus of the ‘Actions’ sheet

How would i freeze first row of the ‘Base’ sheet through macro in python?

Hello,
Think you can only do this on active sheet. See > BASIC+Calc: How to Freeze Rows and Columns

There must be something wrong, I did not post this question :roll_eyes:.

@lonk
There is nothing wrong. It is how this software works. I created a link in my comment to a question of yours and so you were notified. You are correct in that you did not post this question.

1 Like