Anvi, check out Workbook.createWorkbook. These methods allow you to specify the file or output stream to write the workbook to. WritableWorkbook has methods write() and close() you can use for the actual writing and cleaning up.
Without any qualifications, neither of these statements is very convincing. Why do you think one is better than the other?
POI does have the advantage of handling XLSX in addition to XLS, and of having APIs very similar to HSSF/XSSF for other document formats (thus providing a head start if one knows HSSF/XSSF already). Of course, it's possible that neither of these matter in this particular case.
When I last tried both, I found retrieving the cell formatting much easier in JExcelAPI. But that said, in most cases neither one is the best option; it is all a matter of opinion. And Anvi has already chosen for JExcelAPI, then who are we to say that he/she should switch to POI?
anvi kon
Ranch Hand
Joined: Jan 08, 2010
Posts: 133
posted
0
How would I save the excel file using JEXCEL . I have used write but it writes only to the WritableSheet but it didn't save it?
Also does it supports charts and graphs?
Which source is best for graphs and charts?
thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Did you check out the link Maneesh posted? It has a section on "Writing Spreadsheets" which seems to be spot on.
anvi kon
Ranch Hand
Joined: Jan 08, 2010
Posts: 133
posted
0
Yes, It doesn't have a example which saves the excel file into another file.
anvi kon wrote:Yes, It doesn't have a example which saves the excel file into another file.
That's true. It doesn't have an example which reads a spreadsheet from a file, modifies it, then saves it in another file. But as the tutorial itself observes, you can't write a tutorial which shows exact examples of everything somebody might want to do. It says:
The tutorial is by no means exhaustive, and if something is not described here, it does not mean that it cannot be done. The reader is encouraged to examine the API documentation and the sample code (particularly Write.java and ReadWrite.java) in order to gain a more complete understanding of the capabilities and limitations of the software.
So if it was me with this question, I would now be looking at the ReadWrite.java example to see what it did. And then I would be reading the API documentation of the Workbook class to look for possible solutions.