Posted 15 April 2024, 3:55 pm EST - Updated 15 April 2024, 4:00 pm EST
Sorting does not work in protected sheet
Posted by: trankhanhngan00 on 15 April 2024, 3:55 pm EST
-
-
Posted 16 April 2024, 6:00 pm EST
Hi Ngan,
The mentioned behavior is expected and aligns with the Microsoft Excel’s behavior. Try performing the same operation in Microsoft Excel and you will get the same result.
Please consider the following two points:
- When the sheet is protected, the filter dialog won’t open if you set the “allowSort” to true (i.e, check the “Sort” option). The filter dialog won’t open both for Locked Cells and also for Unlocked cells.
2.You could perform the sorting only on the Unlocked Cells, both from the Context Menu and also from the Ribbon Tab.
These two behaviors aligns with Microsoft Excel.
I have created a sample for you so that you could understand better. Refer to the following sample: https://jscodemine.mescius.io/share/fDWPdbCZWUOZg03N8XxFww/?IsEmbed=false&Theme=Unset&PreviewDirection=0&IsEditorShow=true&IsExplorerShow=true&IsPreviewShow=true&IsConsoleShow=true&IsRunBTNShow=false&IsResetBTNShow=false&IsOpenInCodemineBTNShow=false&PanelWidth=20&PanelWidth=50&PanelWidth=30&defaultOpen={"OpenedFileName"%3A["%2Fsrc%2Fapp.js"]%2C"ActiveFile"%3A"%2Fsrc%2Fapp.js"}
I hope that clarifies your query. Let me know if you still have any doubts. You could also refer to the following docs on understanding Locked and Unlocked Cells: https://developer.mescius.com/spreadjs/docs/features/worksheet/celllock#enablenbspprotection-optionsnbspin-a-locked-worksheet
Regards,
Ankit
-
Posted 16 April 2024, 6:37 pm EST
Hi Ankit,
Thanks for your explaination!