Sasanka
(Sasanka *)
December 15, 2010, 10:55am
1
Hi,
I have received a csv file content as string. Now I want to split the string so that I can get the individual record and start processing.
To split the recod I have used String.split(“\n”)
I have tried with StringTokenizer st=new StringTokenizer(“\n”)
Both are not giving the desired result?
Any help in this?
Cheers,
Sasanka
D.C
(D.C.)
December 15, 2010, 3:52pm
2
why not use built in service pub.string:tokenize - this itself is a java service.
-regards
DC
reamon
(reamon)
December 15, 2010, 8:58pm
3
Review the Flat File Schema Developer’s Guide. IS has facilities to parse the file for you and return records to your service for processing. No need to split/tokenize yourself.
natvishnu
(natvishnu)
December 21, 2010, 11:28am
4
Hi,
You can use flatfile schema to convert CSV file to a Document.
Use pub.flatFile:convertToValues and specify the flatfile schema.
Regards,
Nat
Hi,
I have received a csv file content as string. Now I want to split the string so that I can get the individual record and start processing.
To split the recod I have used String.split(“\n”)
I have tried with StringTokenizer st=new StringTokenizer(“\n”)
Both are not giving the desired result?
Any help in this?
Cheers,
Sasanka
Here’s a link which explains the flat file conversion if you haven’t done it before.
[url]http://webmethodssag.blogspot.com/2010/12/handling-csv-files.html[/url]