[calc] How do I get the current sheet number?

How do I get the current sheet number (possibly without macros)in calc?

I’ve already tried sheet().

thank you

Please, what was wrong with SHEET()?

I used

=SHEET()

and it worked for me.

I used

=SHEET(Sheet2.A1)  (Or whatever sheet name you've used)

and it returned the sheet number of Sheet2 cell A1.

Make sure you have an equals sign before the function. Double check that the formula is calculating correctly. Try

=1+1

for a result of 2 of course. If it stays as =1+1 then the cell may be a text format.

Under Tools, Options, +LibreOffice Calc, View, make sure Display Formulas is unchecked. You can check Value Highlighting to show different colours for different formats. Formulas: green; Numbers: blue; Text: black.