Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2004
    Thanked 0 Times in 0 Posts

    Export in Excel2002 in java

    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?

  2. #2
    Regular Coder
    Join Date
    Jun 2002
    Cincinnati, OH
    Thanked 0 Times in 0 Posts
    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. . 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?
    does this sig match?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts