How to remove excel warnings generated by POI?

I am using Apache POI to write content on excel sheet. after generating excel in all the cells that ever had cells, it contains one blue label (each cell of the upper left corner). it is like a warning. how can i delete them while writing content to succeed? PFA screenshot. enter image description here

Thanks!

+4
java excel apache-poi
source share
2 answers

You can try to set the cell type:

HSSFCell cell = row1.createCell(i); cell.setCellType(Cell.CELL_TYPE_STRING); // =0, or Cell.CELL_TYPE_NUMERIC = 1 cell.setCellValue(value); 

See the API docs for more information.

0
source share

Below works for me.

**

 HSSFCell cell = row1.createCell(i); cell.setCellType(new Double(value)); 

**

Note: "value" must be on numbers, it will not work with alphanumeric values. replace it everywhere (cell values) that is required.

0
source share

All Articles