How can i get the Cell address from excel

后端 未结 6 1131
遇见更好的自我
遇见更好的自我 2020-12-03 18:20

How can i get the Cell address from excel given a row and column number for example

row 2 and col 3 should return C2... Please help

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 18:56

    public string GetCellAddress(int row, int col) {
            return (char)((int)'A' + (row - 1)) + col.ToString();
    }
    

提交回复
热议问题