POI ( Execel column reading is different)

Asked

Viewed 17 times

0

Boys, good afternoon, boys !

I have a column in Execel that contains the value : inserir a descrição da imagem aqui

Import used : import org.apache.poi.ss.usermodel.Cell;

When I read it like this : spreadsheet.getRow(i). getCell(1). toString(). Trim() He gives me back a strange value = 1.56044728E8.

I read the documentation but I still have problems.

I ended up reading that it would be necessary to check Cell’s type.

Cell cell = planilha.getRow(1).getCell(0);
    //TIPO DA CELULA EXCELL
    int type = cell.getCellType();
    
    if(type == 0){
        
        idCliente = cell.getNumericCellValue();
        System.out.println(idCliente);
        
        
    }

And yet the cell reading is wrong, someone can help me ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.