File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ccomma delimited file

 
brisk rook
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i generate a comma delimted file in a loop for a jsp file & post it to the screen to allow the user to save this file in Excel..
 
Sam Dalton
Author
Ranch Hand
Posts: 170
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set the content type to one appropriate type for excel
eg: response.setContentType("text/csv")

S
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17622
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, do one better and actually feed the data straight into Excel, where the user can save it in the usual way. Instead of "text/csv", make your MIME type "application/x-msexcel". DON'T generate HTML, BTW, all you need to write are lines of comma-separated text, just like you would from a regular application.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic