Sheet name to display in a cell : formatting

I know how to display the sheet name in a cell, but how do I get rid of the gray background.
I tried to change the background for that cell but that doesn’t help.
Anything else I enter in the cell (instead of the sheet name) is shown without the gray background.
Meaning it happens only with the sheet name reference

… and sharing that knowledge could be useful, not only because others could learn, but to help people help you: you could use a formula with CELL function (which wouldn’t give you the background that you describe, but requires to extract the sheet name from the file name); of you could use the field, which gives the visual hint that this is a field (which doesn’t get printed by the way).

Information is available at : https://ask.libreoffice.org/t/how-do-you-get-a-sheet-name-to-display-in-a-cell/19183

Instead of the filed in the cell, that shows the background to indicate that that’s a field, you may use a formula like this:

=REGEX(CELL("FILENAME");"(?<=#\$).*?$")
1 Like