We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Process selected cells

I'm wanting to be able to select multiple cells on a row but not next to each other using the ctrl key. This works fine but I'm not sure how to then access the selected cells in code.

When using the GetLastSelection() in the MouseUp event, it only has access to the last cell selected.


Well, I am afraid, obtaining the non continuous ranges of selected cells feature is not available. I have logged your feature request into our issue tracking system with an issue id: CELLSNET-16008. We will inform your if there is any update about it.

Thank you.

Thanks for the quick reply. Is there a way to turn off the non-continous selection?

If not, could that be added fairly quickly until the way to access them is available?


We have implemented a method named “GetAllSelectedRanges” to get all selected CellRange objects returned by an ArrayList object in Aspose.Cells.GridDesktop v2.1.0.2004(attached). Please try these lines of code for your need accordingly:

ArrayList ar = gridDesktop1.Worksheets[0].GetAllSelectedRanges();

foreach (CellRange range in ar)



<span style=“font-size: 10pt; font-family: “Courier New”;” lang=“EN-US”>

Thank you.