File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating a file with user details in reccord format

 
John David
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
respected Folks

i have to create file with n number of records.
each record contains some last name,firstname, city and state.
what may be the file type i.e extension of the file like doc or txt ?
how to insert those recors in to the file ?

please suggest me with code snippets/examples...

thank you
[ October 10, 2007: Message edited by: John David ]
 
Joanne Neal
Rancher
Pie
Posts: 3742
16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To learn how to write to a file you need to read the Java I/O tutorial.
Once you know how to write to a file, you need to decide what format you want the data to be in. Common ones are comma separated variables (CSV) and XML, although there are others depending on what exactly you intend to do with the data.
The file extension can be anything you like. It is only a hint to the OS as to what program to use to open/edit it. Your final choice will depend a lot on what format the data in the file has. XML files are usually given an .xml extension for example, but this is not an absolute requirement.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic