
Hi buddy, I am sorry to give a negative answer, I would like to say that you can.
I would like to tell you that even their Office Scripts API is not fully complete. Office Scripts isn't able to connect to all objects yet, for example, it can't connect to the slicer object of pivot tables.
Unlike VBA, which is complete and connects to any Microsoft Excel object (and Word, PowerPoint, Outlook), Office Script is not yet fully complete and we will have to wait a while longer to work completely and move from VBA to Office Scripts.
If the answer is helpful, please click "Accept Answer" and kindly upvote it.
This way, everyone who has the same question will know that they can find the answer here.