I am trying to trigger a 3rd party Addin for Excel 365 online using a simple Typescript code written in the Scripts Automate window.
function main(workbook: ExcelScript.Workbook)
{
// Your code here
let element : HTMLElement = document.getElementsByClassName('button.root-415')[0] as HTMLElement;
element.click();
}
But i am getting the following errors:
[4, 17] Cannot find name 'HTMLElement'.
[4, 31] Cannot find name 'document'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
[4, 88] Cannot find name 'HTMLElement'.
Can someone help on how to trigger a click event on Excel Ribbon menu to Activate Addin menu and open its Task Pane?