Results 1 to 5 of 5
  1. #1
    irakli_dev is offline Member
    Join Date
    Dec 2011
    Location
    Tbilisi (Georgia)
    Posts
    24
    Rep Power
    0

    Default set column width in Jxl

    hi all
    can anyone help me?
    i need to set to indicate column width;
    i find defaultColumnWidth but i need different width for different column

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default Re: set column width in Jxl

    WritableSheet.setColumnView().
    The link is to one of a couple of versions, but the one I suspect you need?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    irakli_dev is offline Member
    Join Date
    Dec 2011
    Location
    Tbilisi (Georgia)
    Posts
    24
    Rep Power
    0

    Default Re: set column width in Jxl

    thx it helped me, if true yesturday i found this on myself but i thought that i'm wrong and closed the page and when u suggested same i read this

  4. #4
    irakli_dev is offline Member
    Join Date
    Dec 2011
    Location
    Tbilisi (Georgia)
    Posts
    24
    Rep Power
    0

    Default Re: set column width in Jxl

    i have one more problem i using
    WritableCellFormat normalFormat = new WritableCellFormat(normalFont);
    normalFormat.setWrap(true);
    normalFormat.setAlignment(jxl.format.Alignment.CEN TRE);
    normalFormat.setVerticalAlignment(VerticalAlignmen t.CENTRE);
    normalFormat.setBorder(Border.NONE, BorderLineStyle.THIN);
    and then adding sme label
    then i doing
    WritableCellFormat normalFormat1 = new WritableCellFormat(normalFont);
    normalFormat.setWrap(true);
    normalFormat.setAlignment(jxl.format.Alignment.CEN TRE);
    normalFormat.setVerticalAlignment(VerticalAlignmen t.CENTRE);
    normalFormat.setBorder(Border.ALL, BorderLineStyle.THIN);
    because now i want border and when i getting error " Attempt to modify a referenced format"

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,856
    Rep Power
    19

    Default Re: set column width in Jxl

    You're using the same variable name:
    WritableCellFormat normalFormat = new WritableCellFormat(normalFont);
    normalFormat.setWrap(true);
    ...
    WritableCellFormat normalFormat1 = new WritableCellFormat(normalFont);
    normalFormat.setWrap(true);
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. insert row and column and delete row and column
    By daredavil82 in forum New To Java
    Replies: 13
    Last Post: 09-22-2011, 06:10 PM
  2. Column width in excel through jsp
    By syed0071 in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-05-2011, 04:16 PM
  3. Replies: 9
    Last Post: 02-15-2011, 01:13 AM
  4. Replies: 1
    Last Post: 07-06-2010, 04:50 PM
  5. how to retrieve the width of the column
    By katie in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 10:56 PM

Posting Permissions

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