formatting output to text file
Hi,
I need some help with formatting the output to a file. Is there a way we can change the size or font of the text written to a text file?
Also can we set the line length (for eg. 80 characters).
I want to ouput description and amount king of stuff how do i achieve uniformity in the output.
I am using FileWriter or BufferedWriter to write the contents of the file.
The output i am looking for is in the following format
Desciprtion Amount
1.XXXXXXXXXXXXX$nn,nnn.nn
2.XXXXX $nn,nnn.nn
Thanks
vir
[581 byte] By [
virenn] at [2007-9-26 1:34:10]

> Is there a way we can change the size or font of the
> text written to a text file?
Not before you define "text file"... For me a text file means a file that consists of mostly text (=letters and numbers). If the text should contain formatting like font size it doesn't really fit in this category anymore.
You can write as many characters per line as you want.
The format
1.XXXXXXXXXXXXX $nn,nnn.nn
2.XXXXX $nn,nnn.nn
is easily achieved - line number, period, text, space, and a formatted number. Something like
1. XXXXXXXXXXXXX $nn,nnn.nn
2. XXXXX$nn,nnn.nn
is a lot more trickier unless you know how long the description can be in maximum.