On Tuesday 26 June 2007 05:29:57 Fallows, Andrew wrote:
> I don't know if it is possible using (a) POI class(es), but I did it
> with no trouble using regular Java constructs and the FileWriter class:
>
> FileWriter fileOut = new FileWriter("F:/(path)/(filename).csv",true);
> fileOut.write((data) + "," + (data) + "," + (data));
> fileOut.flush();
>
> Shouldn't be any more to it.
Almost. In practice there are a couple of other things to consider.
1. Dates might need to be in a specific format for Excel to pick them up.
2. If there is a double quote or a comma in the cell, the value needs
to be double quoted and properly escaped.
Still if all you ever put into the file is numbers, you can be pretty naive
about the way it's created.
Daniel
--
Daniel Noll
Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699
Web: http://nuix.com/ Fax: +61 2 9212 6902
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]