开发者

How to get cell reference from range object in Excel using VB.net?

开发者 https://www.devze.com 2023-03-24 01:45 出处:网络
I have : Dim cell As Excel.Range = sheet.Range(\"A2\") Console.WriteLine(\"Cell references to = \" + ????? )

I have :

Dim cell As Excel.Range = sheet.Range("A2")

Console.WriteLine("Cell references to = " + ????? )

What should I replace ????开发者_开发问答? with to get A2 printed in its place ?

Please help !!


With cell.Address(false, false).


You can use the Address property of the Range object, but you'll have to strip the '$' from it, as it returns the address in format "$A$2".

Hope this helps.

0

精彩评论

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