ONLYOFFICE / onlyoffice.github.io

ONLYOFFICE plugins. Code, resources, and styling for the Plugin Marketplace and Plugins Manager.
Apache License 2.0
129 stars 376 forks source link

SetSort always sorts in descending order #256

Open pr0t4zy opened 1 year ago

pr0t4zy commented 1 year ago

I have a spreadsheet and a following macro code:

var oWorksheet = Api.GetActiveSheet();
var oRange = oWorksheet.GetRange("A1:A6");
oRange.SetSort("A1:A6", "xlAscending", "B1:B6", "xlAscending", "C1:C6", "xlAscending", "xlYes", "xlSortColumns");

The data in the sheet: "title" in row A1, numbers from 1 to 5 in A2:A6. When I run this marco, the numbers are sorted in a descending order (5 to 1).

Note: same happens if I use "xlDescending" for the order. Am I doing something wrong?

Document server version: 7.4.0.

askonev commented 1 year ago

Greetings @pr0t4zy. This behavior is a bug and has a number #60311 in our internal bug tracker