cells.insertRangeShiftDown and cells.copyCellRange clears cells not part of the range

Hi

The attached template spreadsheet is populated with text in some of the cells.

After doing cells.insertRangeShiftDown and cells.copyCellRange

then some of the text outside the cells part of the operation has been cleared (L4:N25).

Version of AsposeCells used is 2.1.0.37

Attached files:
------------------
Test1.xls - Template
Test1Result.xls - Result of executing test code


Test code:
--------------------------------------------------------------------------
import java.io.FileInputStream;
import java.io.IOException;

import com.aspose.cells.AsposeLicenseException;
import com.aspose.cells.Cells;
import com.aspose.cells.License;
import com.aspose.cells.Workbook;
import com.aspose.cells.Worksheet;

public class Expanding {

private static void expandColumn(Cells cells, int column){

cells.insertRangeShiftDown(2, column, 23, column);

/*
public void copyCellRange(
Cells sourceCells,
int srcRowIndex, int srcColIndex,
int destRowIndex, int destColIndex,
int rowCount, int colCount)

*/
for (int destRowIndex = 2; destRowIndex<24; destRowIndex++){
cells.copyCellRange(cells, 1, column, destRowIndex, column, 1, 1);
}

}
public static void main(String[] args) throws IOException, AsposeLicenseException {

License lic = new License();
lic.setLicense(new FileInputStream(“lib/Aspose.Cells.lic”));

Workbook workbook = new Workbook();

workbook.open(“Excel/Test1.xls”);

Cells cells = workbook.getWorksheets().getSheet(“Test 1”).getCells();
for (int column=0;column<10;column++){
expandColumn(cells, column);
}

workbook.save(“Excel/Test1Result.xls”);
}

}



Hi,

Thanks for providing us template file with sample code.

After conducting test, we found the issue as you have mentioned. We will figure it out soon.

Your issue has been logged into our issue tracking system with an issue id: CELLSJAVA-11793.

Thank you.

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. We have fixed your mentioned issue.

Thank You & Best Regards,

It works - Thank you

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


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