tags:

views:

105

answers:

3

I have some code that puts new text on first line of a text document. I need some code to read that first line from the text document, and then should write this text to the first cell, first column of an Excel document. Then my code would put new text on the first line of the text document. Need some code to read new text from the text document and this time put this text in second row, first column and the cycle repeats.

Can anyone give me some sample code to do this?

+1  A: 

http://www.rgagnon.com/javadetails/java-0516.html http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html

Please go through the above URL's

Azlam
If the use case is really that simple also look at http://www.rgagnon.com/javadetails/java-0586.html
Kennet
+6  A: 

Check out the Apache POI-HSSF library for reading and writing Excel files with Java. There are some quick guides to get you started.

teabot
I've used HSSF before; it's pretty slick.
rob
Yep, it's quite nice to use. I particularly like the origins of the acronyms :-)
teabot
A: 

You can try Jexcelapi,it is more efficient than poi.

liya