是否有任何方法/属性可用于获取范围所选项目的字符串数组?获取Microsoft.Office.Interop.Excel.Range的所有单元格坐标
在例如:
范围$B$2:$C$3
会给一个字符串数组具有以下值:$B$2 $B$3 $C$2 $C$3
编辑::
我找到了答案,我的问题上this post.
其实,我需要使用以下程序:
foreach (Range c in myRange)
{
string changedCell = c.get_Address(
Type.Missing, Type.Missing,
XlReferenceStyle.xlA1,
Type.Missing, Type.Missing
);
MessageBox.Show("Address:" + changedCell + " Value: " + c.Value2);
}