XSSF下拉列表不支持MSExcell和Kingsoft电子表格

时间:2016-10-05 15:06:32

标签: java apache-poi xlsx xssf poi-hssf

XSSFDataValidationHelper validationHelper = new XSSFDataValidationHelper(firstSheet);
CellRangeAddressList addressList = new CellRangeAddressList(1, 1, 4, 4);
XSSFDataValidationConstraint dvConstraint = (XSSFDataValidationConstraint) validationHelper.createExplicitListConstraint(getAllNames()); 
DataValidation dataValidation = validationHelper.createValidation(dvConstraint, addressList);
dataValidation.setSuppressDropDownArrow(true);
dataValidation.setShowErrorBox(true);

以上代码仅适用于Libre Office Spread Sheet中的下拉列表。它不适用于MS Ex-cell和King soft Spread Sheet。我研究过许多博客和Apache POI我没有找到任何解决方案。如果你们之前解决了这个问题,请帮助我

0 个答案:

没有答案