C# 获取 excel单元格名称
网上找了很久,没有找到现成的。就自己想了想。
Excel.Range currentCell = Globals.ThisAddIn.Application.ActiveCell;
int iRow = currentCell.Row;
int iColumn = currentCell.Column;
int iI = iRow;
Excel.Pictures img;
Char chaA = 'A';
MessageBox.Show(Convert.ToChar(chaA + iColumn - 1).ToString() + iI.ToString());
本文介绍了一种使用C#程序来获取Excel中当前活动单元格的行号和列号的方法,并展示了如何将这些坐标转换为常用的行和列标识形式。
2287

被折叠的 条评论
为什么被折叠?



