A .csv file is merely a text file that contains Comma Seperated Values. So you could easily create this file just as simply as you would create any other text file.
I'm not entirely sure how POI would help, as I have never used it before, but you could use a standard file stream to write to the file in question or read from it. As long as you know what each position stands for and place the correct number of commas seperated values per line than any program that can read csv files should understand it.
Another option here is to use XML, as it is a more understandable way to store flat text data. Having used both with Java I would tend to go the XML direction, as the parsers are already built if you need to get the information back out of the file and they are optimized enough to be extremely quick.
-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
Hey there sorry to bump in like that. Tarwn, would you have a simple working example of an XML file being written and read through Java? Thanks in advance even a link to a tutorial would do. Gary
which is an introduction to xml processing using java with sample code. There is a zip file of code a few pages into the DOM chapter3. You do have to register though. The IBM sites are well worth checking out.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.