xssf How to get anything as String
问题 I try to parse an excel file into XML using apache poi xssf. Now having a cell and not knowing what is in it I just want to get a String out of it. But when I use cell.getStringCellValue() it throws an exception, what is not very suprising since it is documented this way. So I build my way around that by checking weather it is a numeric or a text cell. But what to do with formula cells. They may contain numbers like = A2 + B2 What gives me the sum (e.g. 4) or a reference to another text = C2