We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Range.MoveTo method behaves incorrect in one scenario. - Works well every other scenario I tested

See my attached code and file to reproduce the issue. I am using V 5.0

Thank you, Tomy

static void Main(string[] args)


Workbook book = new Workbook();

book.Open(@"C:\CodeBase\Prefix\Test\Prefix\ReportsOutput\500251350 AULDataPageCostDisclosure June 30, 2010.xls", FileFormatType.Excel97To2003);

Worksheet sheet = book.Worksheets["datapages"];

Range source = sheet.Cells.CreateRange("C340", "Y384");

source.MoveTo(339, 7);

book.Save(@"C:\CodeBase\Prefix\Test\Prefix\ReportsOutput\output.xls", FileFormatType.Excel97To2003);



Well, I have checked your output file, I think it works fine.

You have moved a range “move2” (i.e. C340:Y384 in the “datapages” sheet) to H340:AD384. I think that’s what your code is doing. Just to share (perhaps you already know) when you use the line i.e.
source.MoveTo(339, 7); it means you are shifting the range starting at H340 cell because the coordinates 339,7 point out / mention H340 cell as the MoveTo method accepts the parameters which are zero based i.e. row-> 339 means the 340th row in the sheet and col -> 7 means the H column.

Could you point or correct us if you have different issue, if so, kindly give us more details about the issue and where is the issue, we will surely check your issue soon.

Thank you.

The cells moved far right and showing only one column . See the attached file, which is the expected output.

Thank you



Thanks for sharing the sample file.

Now I can understand your issue, the range is moved right but its data is lost.

I have logged your issue into our issue tracking system with an issue id: CELLSNET-17810. We will figure it out soon.

Thank you.


We have fixed your issue.

Kindly try the attached version.

Thank you.

That worked. Thanks for the help.


The issues you have found earlier (filed as 17810) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.