Hello Aspose team,
I implement function insertCutRow by function shiftRow as below:
public void insertCutRows(String sheetName, short startRow, short endRow,
short destStartRow) {
String fcn = "insertCutRows( " + sheetName + "," + startRow + ","
+ endRow + "," + destStartRow + ")";
logger .debug(fcn);
Worksheet sheet = workbook.getWorksheets().getSheet(sheetName);
short delta = 0;
if (destStartRow > startRow) {
//Truong hop insert cut row down, tru bot n row da cut vi se dich nguoc len n
delta = ( short )(destStartRow - startRow - (endRow - startRow + 1));
sheet.getCells().shiftRows(startRow - 1, endRow - 1, delta);
} else {
delta = ( short )(destStartRow - startRow);
sheet.getCells().shiftRows(startRow - 1, endRow - 1, delta);
}
}
I tested and saw data, format, image work find. But have problem with shift formula. The formula is shifted wrong. I test function shiftRows and saw it shifted wrong formula. Please see prensentation attachment to view my test case.
I have a question: Is the function shiftRows has bug or I misunderstand and use it for wrong purpose?
Thanks a lots!