Search code examples
exceloffice-js

How to group rows or columns in Excel using Office JS API


I am converting a VSTO Excel add-in to a Web Excel add-in (using JavaScript API for Office). In my VSTO C# code I have the following line:

worksheet.Rows[rowStart + ":" + rowEnd].Group()

and a similar line for columns:

worksheet.Columns[colStart + ":" + colEnd].Group();

What is the equivalent API call for Office-JS? Could not find a relevant entry in the API Docs


Solution

  • I'm afraid that that kind of grouping is not yet supported in office.js. Please vote up the suggestion in the Office Developer Suggestion box: Grouping and ungrouping rows and columns.