View Full Version : Export in Excel2002 in java

08-12-2004, 02:26 PM
Hello Friends,
I made export option in my application, in which i send data dynamically from java appliaction to excel. Same thing i did with html,word and PDF. All this options working fine except excel option while taking print out. When data length is more it increases the width not height in case of excel.

How can i force excel cell to be a constant in lenght n increases height as per the size of data?

Can U plz help me out?

08-12-2004, 04:27 PM
This can be done using xsl/xml. To force a cell to wrap add a ss:Vertical="Bottom" ss:WrapText="1" style to the cell. To keep a constant width add the attributes: ss:AutoFitHeight="0" ss:Height="46.5". I only know this because I needed some special formatting for my exported data in excel and found this article. (http://aspalliance.com/articleViewer.aspx?aId=471&pId=3) . Of course it didnt have the formatting I needed but if you make a change to the excel file then save as xml you can see what attributes you will need to add to perform the desired formatting.

The article is for asp.net but the xml/xsl will apply to any programming language. Just curious, what format are you sending your data for the other export options?