[Solved] XSSF Read Excel Error: java.lang.IllegalStateException: Cannot get a STRING value from a NUMERIC cell

1. Error information

2. Solutions

Declare the cell type as string before calling the getstringcellvalue() method

xssfRowOne.getCell(7).setCellType(CellType.STRING);

Similar Posts: