How do I find which cells are selected on an Excel worksheet?
I need to be able to use C# and Excel interop to determine which cells are 开发者_JS百科selected in a workbook/worksheet. It would be nice if there were something like this defined in Excel:
Excel.Range Worksheet.GetSelectedCells();
Use Application.Selection
which will return a Range.
I guess you can use the ActiveCell property of the Excel Application object. It would return you a Range object.
精彩评论