Forums Register Login

Excel Writing Using Java

+Pie Number of slices to send: Send
Dear Friends,
When I try to write data to excel i got the following exception

org.apache.poi.hssf.usermodel.HSSFCell cannot be cast to java.lang.String


code is like

If there is any solution, please help me
+Pie Number of slices to send: Send
 

headerCell.setCellValue(new HSSFRichTextString(titleArray.get(cnt))); // Exception is happening here



What is the type of titleArray?
+Pie Number of slices to send: Send
String is the type
+Pie Number of slices to send: Send
Another step to take is to split the line into:



Is it now clear exactly where the error is and what it is?

+Pie Number of slices to send: Send
Thank you...now it's working
+Pie Number of slices to send: Send
You're welcome!
I will suppress my every urge. But not this shameless plug:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2199 times.
Similar Threads
Issue with Download using ZipOutputStream
opening the excel sheet from servlet
Excel steps -
creating enlarged image in excel using java
Exporting some data to excel
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 03:18:36.