How to find out the current group level of a range in excel for web using office-script

403 Views Asked by At

I am trying to find out how to identify the current group level of a range in office-script. Based on the documentation I was only able to find the group or ungroup methods.

https://learn.microsoft.com/en-us/javascript/api/excel/excel.range?view=excel-js-preview#excel-excel-range-group-member(1) However, if my row is already grouped I will create a sub-group with these methods. The only workaround I can think of is to ungroup multiple times and the to group to my desired level.

In vba you were able to read/write to the OutlineLevel property

https://learn.microsoft.com/de-de/office/vba/api/excel.range.outlinelevel

Any help is appreciated.

1

There are 1 best solutions below

0
On

These APIs are not supported in Excel JS add-ins at this moment. You can suggest this at Microsoft 365 Developer Platform Ideas