Hi,
i want to read the data from text file and write to excel file.
if some one has ready code written then please share with me.

i want to read the data from text file and write to excel file.

You'll need to be more specific on how the data is formatted in these files, perhaps include an example of how your text file looks, and how your "excel file" should look.

Thanks for your prompt reply!!
text file looks as below:
ABCD#sh run | abc
ip pim sparse-dense-mode
ip pim sparse-dense-mode
ip pim sparse-mode
ABCD#sh run | hostname
ABCD
ABCD#sh run | xyz
dhakjkdjlskd
sldjkl;sjkdsfdfs
skdjl;kfj;sdfsd

and so on.......

Excel file should look like 
ABCD#sh run | abc               ABCD#sh run | hostname       ABCD#sh run | xyz
ip pim sparse-dense-mode        ABCD                         dhakjkdjlskd
ip pim sparse-dense-mode                                     sldjkl;sjkdsfdfs
                                                              skdjl;kfj;sdfsd



Please help!!

and, do you have something already?
neither reading from a .txt file, or writing to excell is brain surgery.
what have you got so far?

By "excel file" you mean perhaps a CSV file, that - when opened/imported in Excel - produces output like in the example you provided us with?

I am new to java.
I have managed to get a code to read a text file and other to write to excel file. But how do i interconnect that is the problem.

@tux: yeah csv file will do. But problem is while opening this csv file in excel, the delimiter works for that particular line only

This article has been dead for over six months. Start a new discussion instead.