简体   繁体   中英

Could not able to access CELL_TYPE_STRING variable from XSSFCell

I am trying to set cell type value by passing XSSFCell.CELL_TYPE_STRING. But it is throwing error "No static property descriptor found for property, CELL_TYPE_STRING"

cell.setCellType(XSSFCell.CELL_TYPE_STRING)

first check your imports, XSSFCell class supposed to belong to

package org.apache.poi.xssf.usermodel;

maybe there is smth wrong with imports

also you can try

Cell.CELL_TYPE_STRING

  • its more generic, since .setCellType expekts int as an argument should be no difference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM