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

Free Support Forum - aspose.com

Strange Bug in Aspose Cells Java

Hi

if i execute the following code i get a strange result, please help to solve this.
After i call insertRangeShiftDown, the returned cell is not the expected.

import com.aspose.cells.Cell;
import com.aspose.cells.Cells;
import com.aspose.cells.Row;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;
import com.aspose.cells.Worksheets;

public class CellsBugTest
{
public static void main(String[] args)
{
Workbook workbook = new Workbook();
Worksheets worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.getSheet(0);
Cells cells = worksheet.getCells();
for(int i=0; i<12; i++)
{
Row row = cells.getRow(i);
for(int j=0;j<7;j++)
{
row.getCell(j).setValue(“aa”);
}
}
Cell a13 = cells.getCell(“A13”);
System.out.println(“Before CellName: " + a13.getName() + " Row:” + a13.getRowIndex() + " Column:" + a13.getColumnIndex());
Cell a13I = cells.getCell(a13.getRowIndex(), a13.getColumnIndex());
System.out.println(“Before CellName: " + a13I.getName() + " Row:” + a13I.getRowIndex() + " Column:" + a13I.getColumnIndex());
cells.insertRangeShiftDown(9,0,10,7);
a13 = cells.getCell(“A13”);
System.out.println(“After CellName: " + a13.getName() + " Row:” + a13.getRowIndex() + " Column:" + a13.getColumnIndex());
a13I = cells.getCell(a13.getRowIndex(), a13.getColumnIndex());
System.out.println(“After CellName: " + a13I.getName() + " Row:” + a13I.getRowIndex() + " Column:" + a13I.getColumnIndex());
}
}

OUTPUT
===========================================
Before CellName: A13 Row:12 Column:0
Before CellName: A13 Row:12 Column:0
After CellName: A11 Row:10 Column:0
After CellName: A11 Row:10 Column:0

Hi,

Well, it might be an issue in the older versions, we have already fixed this bug. We will provide you the latest fix very soon.

Thank you.

this is from the latest released version of aspose.total we downloaded, i saw that there is a new
release from 12-12-2008, i’ll test it with this one and give you feedback if it always exist inside this
release.

exists also in latest version of 12-12-2008 release

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells for Java. We have fixed the issue you have mentioned.

Thank You & Best Regards,

bug don’t exist in new version, thanks for quick response.