cells.copyCellRange fails to copy array formula correctly

Hi,

We have found another case where copying of cells containing array formulas does not work as expected.

See attached image to see detailed description of the problem.

Template file together with the sample code will reproduce the issue.

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

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

public class ExpandingArrayFormula3 {

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

cells.insertRangeShiftDown(row, column, row+len-1, column);

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

*/
for (int destRowIndex = row; destRowIndex<(row+len); destRowIndex++){
cells.copyCellRange(cells, row-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”));

System.out.println("Aspose version : " + CellsHelper.getReleaseVersion());

Workbook workbook = new Workbook();

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


Cells cells = workbook.getWorksheets().getSheet(“AverageIF”).getCells();

// Expand range

int numberOfCellsToInsert = 3;
int splitRow = 16;

int column = 3; // D column
expandColumn(cells, splitRow, column, numberOfCellsToInsert);

column = 4; // E column
expandColumn(cells, splitRow, column, numberOfCellsToInsert);

column = 5; // F column
expandColumn(cells, splitRow, column, numberOfCellsToInsert);

column = 6; // G column
expandColumn(cells, splitRow, column, numberOfCellsToInsert);

column = 7; // H column
expandColumn(cells, splitRow, column, numberOfCellsToInsert);

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

}





Hi,

We have found the issue with copying array formulas operation, we will figure it out. Your issue has been logged into our issue tracking system with an issue id: CELLSJAVA-12184.


Thank you.

Hi,

Please try the attached version, we have fixed your mentioned issue.

Thank you.

Then it is fine. Thank you

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


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

This issue came back for Aspose version : 2.2.0.0

Hi,

I have re-opened the issue, we will soon look into it and get back to you soon.

Thank you.


Hi,

We have evaluated your issue, but we could not find it using our recent version e.g 2.2.1: http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry238005.aspx

If you still find the issue, kindly post your sample code and template files here, we will further look into your issue soon.

Thank you.


It is working ok for 2.2.1