您能否建议我如何使用Excel Excel列中的POI 3.6创建下拉列表?
先谢谢。
答案 0 :(得分:2)
试试这个,
{
CellRangeAddressList addressList =
new CellRangeAddressList(1,10,columnIndexFromHeaderList,columnIndexFromHeaderList);
DVConstraint dvConstraint =
DVConstraint.createExplicitListConstraint(stringArray);
dataValidation = new HSSFDataValidation(addressList,dvConstraint);
dataValidation.setSuppressDropDownArrow(false);
sheet.addValidationData(dataValidation );
}