If I have a reference to a cell on another sheet and cut/paste the referenced cell, the reference will update to point to the new location.
If I use Range.MoveTo, this doesn’t happen. If the reference is on the same sheet, it will update, but references on other sheets won’t.
using Aspose.Cells;
namespace MoveTo
{
class Program
{
static void Main(string[] args)
{
Workbook workbook = new Workbook(“input.xlsx”);
Range range = workbook.Worksheets[“Sheet1”].Cells.CreateRange(“B2”);
range.MoveTo(1, 1);
workbook.Save(“output.xlsx”);
}
}
}