我想将公式 frmo B5 设置为 B10004,公式取决于上一列的值。但是公式应该适当地动态更新单元格引用
dvCarConstraint =
DVConstraint.createFormulaListConstraint(
"INDIRECT(SUBSTITUTE($B$5, \" \", \"_\"))"
);
addressList = new CellRangeAddressList(4, 10004, 2, 2);
dataValidation = new HSSFDataValidation(addressCarList, dvCarConstraint);
dataValidation.setSuppressDropDownArrow(false);
sheet.addValidationData(dataCarValidation);
当我打开excel时,列中的所有单元格都显示INDIRECT(SUBSTITUTE($B$5, " ", "_"))
,而我期望的是INDIRECT(SUBSTITUTE($B$6, " ", "_")), $B$7
等等....
如何在 POI 中做到这一点?