I wants to create a chart and give its source value as "A1:B1,D1:F1,G1:H1", so I need to get the string of range address.
Thanks
Visual Studio Tools for Office
Hi,
From a given range, you can get the address from the get_Address method:
string strAddress = range.get_Address(System.Reflection.Missing.Value);
This may return strings in different format depending upon the way the range is selected i.e.
1. If it is a series of consecutive cells, then the string value would be like $A$1C$1
2. If the selected cells are scattered, then the string value would be like $A$4,$B$6 or $A$1C$1,$M$1
N$1
3. If only one cell is selected, then the string would be like $A$1
Hope this is of help
Btw, currently I am using Excel 2000.
Regards,
Asim.
Please replace the smiley with : and $ signs.
Regards,
Asim.