This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I am using setContentType("application/msexcel") to direct output to an excel spreadsheet for display. This works fine for text fields, but all fields that it thinks are numbers are truncated, ie: 000200 becumes 200 I need to display this as a text field ( as 000200). I have tried prefixing the string with a single ' but this just displays in excel as a character. How do I format the fells as text ? Thanks.
There is an ugly solution ... well I should say a "close-enough" solution: Try to wrap any fields (text) with either '' or "", then automatically Excel will treat them as normal text and display them as they are. But unfortunately they would appear as "000200" in the cells showing also the quotes. But if you can bear with this, then you don't spend extra time in learning to use a new package.