ExcelUtil.getMoveFormula(
sheet,
fromCell.getCellFormula().replace(
- (cpCount == 0 ? object : list + "[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), list + "[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"),
+ (cpCount == 0 ? object : "(" + list + ")[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), "(" + list + ")[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"),
toCell.getRowIndex() - fromCell.getRowIndex(),
toCell.getColumnIndex() - fromCell.getColumnIndex()
)
break;
case Cell.CELL_TYPE_STRING:
toCell.setCellType(Cell.CELL_TYPE_STRING);
- toCell.setCellValue(fromCell.getStringCellValue().replace((cpCount == 0 ? object : list + "[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), list + "[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"));
+ toCell.setCellValue(fromCell.getStringCellValue().replace((cpCount == 0 ? object : "(" + list + ")[" + (mapKeys == null ? (startIdx - 1) : "'" + mapKeys[startIdx - 1] + "'") + "]"), "(" + list + ")[" + (mapKeys == null ? (i - 1) : "'" + mapKeys[i - 1] + "'") + "]"));
log.debug("to cell string: {}", toCell.getStringCellValue());
break;
}