开发者

How do I find which cells are selected on an Excel worksheet?

开发者 https://www.devze.com 2023-01-20 19:35 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号