Excel workbook crashes when using the getSort().apply() method

Sarah Jones 0 Reputation points
2024-07-31T08:11:41.0533333+00:00

I have an Excel script that handles rows of dated information. The script runs fine until I try to use getSort().apply(). When the following line is included, the Excel workbook crashes:

db2.getUsedRange().getSort().apply([{ key: 0, ascending: false }], false, true, ExcelScript.SortOrientation.rows);
Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.