how we can create csv file in java and write resultset data inside in tabular form as well as image?
please any one reply as soon as possible.
Best Regards,<br />Vipin<br />MCA, SCJP5, SCWCD in progress
Omar Al Kababji
Ranch Hand
Joined: Jan 13, 2009
Posts: 357
posted
0
CSV is simple Coma Seperated Value file you could simple use a PrintWriter to create a file and give it an extension of .csv
Omar Al Kababji - Electrical & Computer Engineer
[SCJP - 90% - Story] [SCWCD - 94% - Story] [SCBCD - 80% - Story] | My Blog
vipin jain
Ranch Hand
Joined: Aug 24, 2008
Posts: 122
posted
0
hi ,
thanks for reply but i alsio want to add image inside csv file.....
Omar Al Kababji
Ranch Hand
Joined: Jan 13, 2009
Posts: 357
posted
0
you can't put an image in a CSV file, unless you just get the InputStream of the image and read its bytes and store them in the file in some way. and then reconstruct the image in the same way you wrote in the CSV file. however a CSV is used only plain text not for images.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35254
7
posted
0
... so, effectively, you can't keep images inside of CSV files. Would using the XLS file format (used by Excel) be an option? It can accommodate images, and there are Java libraries available that can create them.
Thanks for reply.......
can you please tell me which java library is using for that and if you have that jar please send me.
your every help would be appreciated.