The following is my java code for reading a excel sheet content.
String urlcnt="";
for (Row row : sheet) {
{
Cell firstCell = row.getCell(0);
urlcnt=firstCell.getRichStringCellValue();}
While compiling the above code am getting the following error.
ReadExcel.java:18: incompatible types
found : org.apache.poi.ss.usermodel.RichTextString required: java.lang.String
urlcnt=firstCell.getRichStringCellValue();//This line is the cause for the error
Instead of storing the getRichStringCellValue() in a string, if I just print the value of the cell, it works fine. But I go ahead and store it in a string for further processing the problem occurs.
Kindly let me know what has to be done to proceeed.