Results 1 to 4 of 4
Thread: Delimite the file using comma
- 12-29-2008, 12:47 PM #1
Member
- Join Date
- Dec 2008
- Posts
- 3
- Rep Power
- 0
Delimite the file using comma
Hi All,
This is my first question in this forum...
I have file with numeros datas(both numeric and characters)
I want to delimit the file with set of delimiter length like 2,5,1,9,6 etc..
For example
if my file like this
9483trdcvge245621jde
then i need to insert commas at 2,5,1,9,6 etc..
then the output will be
94,83trd,c,vge245621,jde,
Like this i need..Pls help me to solve this issue..
Thanks in advance
- 12-29-2008, 05:22 PM #2
You could use DecimalFormat (I believe it accepts strings) if you know the look of your expected string do something like
Java Code:DecimalFormat df = new DecimalFormat("00,00000,0,000000000,000,")Liberty has never come from the government.
Liberty has always come from the subjects of government.
The history of liberty is the history of resistance.
The history of liberty is a history of the limitation of governmental power, not the increase of it.
- 12-30-2008, 03:26 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
That mean the separated length must be fixed. Is that valid in your application gokulcool?
- 12-30-2008, 05:40 PM #4
Similar Threads
-
File fp = new File(filePath);fp.exists() does not yeild proper result
By ganeshp in forum Advanced JavaReplies: 2Last Post: 04-07-2009, 06:25 AM -
Search a word(taken from one file) in another file and give the line as the output
By SwapnaNaidu in forum New To JavaReplies: 7Last Post: 11-19-2008, 02:09 PM -
How to parse the CSV(Comma separation values)file and validate the file using java
By padmajap13 in forum Advanced JavaReplies: 7Last Post: 05-23-2008, 03:46 AM -
replacing last comma in a string with the word "or"
By wprjr in forum New To JavaReplies: 1Last Post: 05-07-2008, 01:19 AM -
A utility class that parses a Comma Separated Values (CSV) file
By Java Tip in forum java.ioReplies: 0Last Post: 04-16-2008, 10:58 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks