how to process a simple notepad file and extract something from it not all.

I am sending the text file from html page to servlet and i want to do something with that text file and the result would be in excel.

for example if my file contains:

Notepad file Contains:

CP STATE

MAUSB SBSTATE

NRMBWO

and i want only SB,SBSTATE in my excel file not MAU option in excel.

I want output in excel as:

SB SBSTATE

BWO

so please tell how to do this.

Please write some program to explain this,i will be very thankful to you.

BR//

Anubhav Gulati

[544 byte] By [Anubhav_in_ERICSSONa] at [2007-11-27 1:09:19]
# 1
Open the file with BufferedReader, read and check each line, change the lines accordingly and finally stream it to the client.
BalusCa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Please if u can send the coding of all that(as in my case how to extract the column and it's value),i will be very thankful to you.BR//Anubhav Gulati
Anubhav_in_ERICSSONa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Please read the API and the tuts: http://www.google.com/search?q=bufferedreader+api+site:sun.com http://www.google.com/search?q=bufferedreader+tutorial+site:sun.comOr hire a real developer. Or tell your boss you can't and you need some courses.
BalusCa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

ok

why you became so angry,it looks like that.

Thats why people join your network,because they r facing problems,and they need help.

I dont knw what u are,what r ur qualifications,but be polite in life.

Always remember one thing in life:

Everyone in this world is better than you in one field or the another.

ok my dear friend.

thanks for yr reply.

Anubhav_in_ERICSSONa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

I am not angry, I am just seriously helping you to become a developer :)

I've suggested you to use BufferedReader. It's API is descriptive enough (as all other API's of Sun tho). And the official I/O tutorial of Sun is also very helpful. Further on you only need to play with String#substring(), String#indexOf() and/or String#matches(), which are all already basic knowledge of the Java String API.

Or ask us the specific question/problem where you're stucking with, while you're trying to develop it.

BalusCa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
ok,so i think finally,we will remember each other,hope so we will meet in future,because the world is so small.I cant forget u now BalusC,hope so u will remember me.I am from INDIA working with Ericsson,not in software development but in telecom field.Br//Anubhav Gulati
Anubhav_in_ERICSSONa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
> not in software developmentSo you just need a developer?
BalusCa at 2007-7-11 23:44:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...