如何找到这些细胞在Excel工作表中选择? [英] How do I find which cells are selected on an Excel worksheet?
本文介绍了如何找到这些细胞在Excel工作表中选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要能够使用C#和Excel互操作,以确定哪些小区在工作簿/工作表被选择。如果有这样的事情在Excel中定义这将是很好的:
I need to be able to use C# and Excel interop to determine which cells are selected in a workbook/worksheet. It would be nice if there were something like this defined in Excel:
Excel.Range Worksheet.GetSelectedCells();
但我没有找到任何文档中获得。我怎样才能做到这一点?
But I don't find that in any documentation. How can I do this?
TIA。
推荐答案
使用 Application.Selection
将返回一个范围。
这篇关于如何找到这些细胞在Excel工作表中选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文