How to determine which cells are selected in an excel sheet?

I need to be able to use C # and Excel to determine which cells are selected in a workbook / worksheet. It would be nice if Excel had something like this:

Excel.Range Worksheet.GetSelectedCells(); 

But I do not find it in any documentation. How can i do this?

TIA.

+4
source share
2 answers

Use Application.Selection , which will return the range.

+10
source

I think you can use the ActiveCell property of an Excel application object. It will return a Range object to you.

NTN Routes

0
source

All Articles