Hi friends i am facing one issue while writing the content in an excel sheet incrementally.When i try to add the next content in an existing excel sheet. I loose the previous one.Can any one help me to resolve this.Here is the code for this. I have created two java classes 1.ReadXLSheet -->to read the file 2.Create--> to write the content incrementally.
You'll probably get better responses if you post less, more targeted code samples, and more information about what you're doing and what's going wrong.
In this case, I haven't worked with the jxl.Workbook class, but I see you create a new one each time you call the write() method, and pass it (I assume) the same file as a parameter. When you later call workbook.write(), I'm guessing it overwrites whatever was in the file with the new contents of the workbook. If that's not what you want to happen, you're going to have to go back to Workbook and see if it has another interface you can use.
The javadocs of Workbook.createWorkbook(File,WorkbookSettings) talk of "creating" a file - which doesn't sound as if it would preserve an existing one. One of the other createWorkbook methods may be more suitable.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Writing a content in excel in incremental way