0

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)

Vasanth
  • 35
  • 5

1 Answers1

0

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
  • Yes I have imported all the relevant jars. The variables declared as private in XSSFCell class and it is taking from poi-ooxml-4.1.2.jar. hence it could not able to access. " private static final java.lang.String FALSE_AS_STRING = "0"; private static final java.lang.String TRUE_AS_STRING = "1"; " . Previousl;y it was working fine in guidewire version 8 and it was public variable. Now in V10, we are facing this issue. – Vasanth Jul 22 '21 at 13:33