I’d like to ask whether it’s possible to create a clickable image (such as an icon or picture) in an OnlyOffice Spreadsheet file that triggers navigation to a specific sheet when clicked.
If this functionality is supported, could you please share a sample macro code that demonstrates how to implement it?
My goal is to build a user-friendly menu system where users can switch between sheets by clicking visual elements. I’d appreciate any guidance on whether OnlyOffice macros support this kind of interaction.
Here is a simple macro that allows switching the sheet:
(function()
{
let sheet = Api.GetSheet("Sheet2"); // Name of the sheet
sheet.SetActive();
})();
You can change Sheet2 to a necessary name to specify to which sheet you would like to switch.
After adding the macro and an image to current sheet, you can right-click the image and use Assign Macro item to select the macro, which will be fired when clicking on the image.
Thank you so much for your support and clear guidance!
Your explanation about assigning macros to images and switching sheets was exactly what I needed. I had been stuck on this for a while, and your response solved it perfectly. I truly appreciate the time and effort you put into helping me.
Thanks again for being such a helpful part of this community!