Discussion Locked

How to create formatted ex.sheet in java

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

My project needs one report which should be able to open in excel . It needs to be well formated , like first two columns fixed , left 3 col. fixed . Need to show colors in different cells (according to data) .
And I need to give a link to user to download this file. My problem is that how do I format data in csv format , so that when user open file in excel it would open in formatted form. ?

5 replies

by jay eckles

CSV (comma separated values) is just a data file format that provides for the separation of field values in records. It doesn't provide for any formatting of the data. Excel can open a CSV file, but from within the CSV, you can't specify colors, column widths, etc. I can think of two possible routes:

1. write a macro in Excel that automatically formats the sheet based on the data in the CSV file

2. Find a class that will write true Excel documents. A search on Google will probably getyou far in this area.

Good luck.

Jay
www.jayeckles.com

This discussion is closed to new replies.