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

@tux why to bother with nasty csv when you can have proper Excel doc?
Apache POI magic rediscovered :P

commented: Nice suggestion ;-) +13
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.