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
what might refer to a text like "Hans".
How can I know what is really in my cell and how do I get a String out of it?