how to tell the width of a column RRS feed

  • Question

  • Howdy,

    I am trying to figure out how to know what the width of my columns are? I know that int the w:tabl element I have a w:gridCols element and I can snag the values however, how are those associated with my w:tc elements... I am mistified *shrug*


    Friday, April 18, 2008 8:57 PM

All replies

  • Well, It is very reassuring to see that after 6 days no one has had anything to say on this subject however I did somewhat find what I was looking for. Maybe I am just asking stupid questions.

    There is an element nested under the w:tc element called w:tcPr then nested under that element you will find w:tcW which contians an attribute called w:w which is the width of each individual cell. It seems I overlooked this at first.

    A couple of things to note however, you will need to convert from the Open XML unit of measure which is 1/20 of a point into pixel if you are formatting for display on the web (which I am doing).

    Also - I am not really sure why the w:GridCols even exists at this point and how it correlates the w:tcW attribute w:w - maybe someone could enlighten me on that.

    Also - I am learning as I go along so please correct me if I have made any mistaken assumptions.


    Thursday, April 24, 2008 4:59 PM
  • w:GridCols is used by some layout algorithms to lay out a table. For example, cell's width of the specified grid column span set by gridSpan is set based on the w:tcW and w:GridCols.

    Tuesday, April 29, 2008 1:56 AM
  • r0k3t, the answer to your question can be found here:

    GridColumn sets the width, but if a cell in the column has width bigger than the GridColumn's width, the columns takes the bigger width.

    Saturday, February 11, 2012 3:33 PM