当前位置: 代码迷 >> 综合 >> poi导出excel时提示功能
  详细解决方案

poi导出excel时提示功能

热度:91   发布时间:2024-02-07 22:53:42.0
DVConstraint constraint = DVConstraint.createCustomFormulaConstraint("BB1");
/* 四个参数分别是:起始行、终止行、起始列、终止列 */
CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol);
/* 数据有效性对象 */
HSSFDataValidation data_validation_view = new HSSFDataValidation(regions, constraint);
data_validation_view.createPromptBox("日期格式", "日期格式为2020/01/01");
sheet.addValidationData(data_validation_view);

 

  相关解决方案