Free Support Forum -

How to obtain cell or range reference from address with sheet name

How do I get a reference to a Cell and a Range from an address that has the sheet name? Like Sheet1!$H$5


Thanks for your query.

Aspose.Cells does not have any such option to parse this string however you may develop your own logic to accomplish the task. Please give a try to the following sample code:

List<string> segments = "Sheet1!$H$5".Split('!').ToList<string>();
Console.WriteLine("Sheet Name = " + segments[0]);
Console.WriteLine("Cell Reference = " + segments[1].Replace("$", ""));