wordpress hit counter
set column width - SpreadsheetML - Formats - OpenXML Developer

set column width

Formats

Discussions about working with different Open XML Formats

set column width

  • rated by 0 users
  • This post has 1 Reply |
  • 0 Followers
  • i'm using java to write the xl/worksheets/sheet1.xml then open it to *.xslx. I'm having problem setting column width. I don't know the syntax or how. Can anyone help me please? Here is my xl/worksheets/sheet1.xml code:
    Thanks.

    -
    -
    -
    -
    -
    Site/Lane


    -
    -
    Event Timestamp (Eastern Time)


    -
    +
    LSC Pkg ID


    -
    -
    Officer Corrected State


    -
    -
    Officer Corrected Plate


    -
    -
    LPR State


    -
    -
    LPR Plate


    -
    -
    Corrected Action


    -
    -
    Officer Decision



    -
    -
    -
    L247 / 02


    -
    -
    12/18/2009 12:02:14


    -
    -
    0000000000000000f2df0d010000c85f


    -
    -



    -
    -



    -
    -
    NM


    -
    -
    KSL247


    -
    -



    -
    -
    A



    .....
  • I am not an expert, but I have tried the modifing the cols node , which is just before the sheetData .

    for example
    <worksheet .... >
    ......
      <cols>
        <col min="1" max="4" width="18.85546875" customWidth="1" />
        <col min="5" max="5" width="18.85546875" style="5" customWidth="1" />
        <col min="6" max="6" width="18.85546875" customWidth="1" />
      </cols>
     <sheetData>
    .......

    the width attribute is measured in "number of characters" , which I found no definitive definition.
    min and max are just column index (one based).

Page 1 of 1 (2 items)