Forums Register Login

writing excel through java

+Pie Number of slices to send: Send
hello... I am trying to read an excel file hello and add new cells in the end an then add data to it and save it.. but my following programme is not producing any output.please help
+Pie Number of slices to send: Send
My first observation is that you are using the wrong set of classes to handle the workbook. Excel workbooks come in two different formats; the older binary file format (.xls) and the newer OOXML format (.xlsx). From the code you posted, you would appear to be working with one of the newer format files - from the file extension .xlsx - and to do this with POI, you need to use the XSSF classes not the HSSF ones. Better still would be to use the classes in the unifying ss usermodel stream.

There are numerous examples on the POI website, http://poi.apache.org/spreadsheet/quick-guide.html
+Pie Number of slices to send: Send
This is a bad idea:


catch(Exception e){}


How will you what problems there are?
+Pie Number of slices to send: Send
Thankyou Mark it worked
+Pie Number of slices to send: Send
yes I never use catch(Exception e)... It was for the example..thankyou
I was her plaything! And so was this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1106 times.
Similar Threads
opening the excel sheet from servlet
facing diffculty to highlight background color of an excel cell which is not reflected in file
setShrinkToFit using POI
Save File on Client Machine
How to make POI HSSF support Chinese Encoding?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:14:35.