Convert Cell to String type in Apache POI

Asked

Viewed 116 times

-2

How can I convert a guy Cell for String ?

String datateste = row.getCell(5);

1 answer

2


You accurate of a org.apache.poi.ss.usermodel.DataFormatter for this. Example:

Cell cell = row.getCell(5);
DataFormatter formatter = new DataFormatter();
String datateste = formatter.formatCellValue(cell);

Browser other questions tagged

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