i have a c# code which gets the (excel-2007) worksheets used range as follows
Excel.Worksheet ws = (Excel.Worksheet)Globals.ThisAddIn.GetActiveWorksheet();
Excel.Range range = (Excel.Range)ws.UsedRange;
for the current worksheet i know exactly that range is A1:HM232,…but in the future that range may change… how is it possible to get the range info such as A1:HM232 from the used range info?
i can get the rows.count and columns.count… but how to get info such as “HM”?
the reason behind this is that i’m trying to put it later on a formula like
=Sheet1!A1:HM232...
thanks in advance!
I this this method should do it: