• Post Reply Bookmark Topic Watch Topic
  • New Topic

Parsing and Saving of the file to the DB  RSS feed

 
Armin Lus
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a csv/excel/doc file that user is submitting from the jsp form.
Here is the format of a file:
"hi" "how" "do" "I" "do" "this" "12345"
I then need to take each token and save it to the appropriate column in the DB. What are the API's I need to use for that? Does anyone have similar code available?
Thanks.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is an available API for that... Because I ever did that kind of accessing Excel file in an client-server Swing-based application... I use the old traditional technique that read the file by using java.io package and java.util.Tokenizer class to divide each token... Later save them to the database again...
It's easy to do that way... But if we can find an API for processing such kind of documents, it'll be easier to apply...
 
sunitha reghu
Ranch Hand
Posts: 937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use http://jakarta.apache.org/commons/fileupload/index.html
its very easy.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mazha thulli:
use http://jakarta.apache.org/commons/fileupload/index.html
its very easy.

That's great... I have just read that... It's very supporting for file uploading... Thank you for the link mazha...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!