none
Table Styles in powerpoint 2007 RRS feed

  • Question

  • The inconsistencies in Office Table styles are getting out of hand, I have a powerpoint document with a simple table that uses a table style. In the raw XML, it specifies styles for everything you would expect wholeTbl, band1H, etcc... including first row and last row. 

    The XML tells me that the last row should have a thicker top border on the top of its cells, but this is not rendered in powerpoint 2007. It is just using the property of the wholeTbl element. But according to the precedents layed out in the OOXML spec, lastRow should override anything that wholeTbl specifies. 

    At this point ive concluded that the OOXML spec is bs, and office just does whatever it wants when it renders a doc, FINE, just tell me what its doing and the rules its using to make these decisions.

    At this point, ive found glaring holes in every office product Excel, Word, and Powerpoint in regards to TableStyles. What is going ON !!

    Heres the xml chunk that clearly shows the first and last row both share a thicker border:

            <a:lastRow>
                <a:tcTxStyle b="on">
                    <a:fontRef idx="minor">
                        <a:prstClr val="black"/>
                    </a:fontRef>
                    <a:schemeClr val="lt1"/>
                </a:tcTxStyle>
                <a:tcStyle>
                    <a:tcBdr>
                        <a:top>
                            <a:ln w="38100" cmpd="sng">
                                <a:solidFill>
                                    <a:schemeClr val="lt1"/>
                                </a:solidFill>
                            </a:ln>
                        </a:top>
                    </a:tcBdr>
                    <a:fill>
                        <a:solidFill>
                            <a:schemeClr val="accent6"/>
                        </a:solidFill>
                    </a:fill>
                </a:tcStyle>
            </a:lastRow>
            <a:firstRow>
                <a:tcTxStyle b="on">
                    <a:fontRef idx="minor">
                        <a:prstClr val="black"/>
                    </a:fontRef>
                    <a:schemeClr val="lt1"/>
                </a:tcTxStyle>
                <a:tcStyle>
                    <a:tcBdr>
                        <a:bottom>
                            <a:ln w="38100" cmpd="sng">
                                <a:solidFill>
                                    <a:schemeClr val="lt1"/>
                                </a:solidFill>
                            </a:ln>
                        </a:bottom>
                    </a:tcBdr>
                    <a:fill>
                        <a:solidFill>
                            <a:schemeClr val="accent6"/>
                        </a:solidFill>
                    </a:fill>
                </a:tcStyle>
            </a:firstRow>  

            <a:wholeTbl>
                  ..........
                <a:tcStyle>
                     ...........
                    <a:tcBdr>
                       .........
                        <a:top>
                            <a:ln w="12700" cmpd="sng">
                                <a:solidFill>
                                    <a:schemeClr val="lt1"/>
                                </a:solidFill>
                            </a:ln>
                        </a:top>
                        <a:bottom>
                            <a:ln w="12700" cmpd="sng">
                                <a:solidFill>
                                    <a:schemeClr val="lt1"/>
                                </a:solidFill>
                            </a:ln>
                        </a:bottom>

               <.......closing tags for tcBdr, tcStyle, wholeTbl>

    Just to prove im not crazy I have the offending pptx file uploaded on our work server for download, heres the link:

    Wednesday, February 10, 2010 7:55 PM

Answers

  • i found the answer

    the parts of the tablestyles object that get applied to a given table are set in the element

    <a:tblPr> 

     tblPr (Table Properties)

    This element defines the properties of a table on the whole.  Within this element are many visual modifications that can be applied to the table.

    [Example: Consider the following example of a tblPr within DrawingML:

    <a:tblPr firstRow="1" bandRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

    In this example, we see that there is a link to a table style id5.1.6.10) which is defined elsewhere and that the first column formatting and banded row formatting has been enabled.  The table style defines the formatting applied with the two formatting options enabled.  end example]


     

    Attributes

    Description

    bandCol (Banded Columns)

    Enables or disables the banded column formatting for a table style.  A value of on, 1 or true will enable the banded column formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr bandCol="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the banded column formatting is enabled for the table.  When applied, the linked table style defines the formatting for banded columns. end example]

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    bandRow (Banded Rows)

    Enables or disables the banded row formatting for a table style.  A value of on, 1 or true will enable the banded row formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr bandRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the banded row formatting is enabled for the table.  When applied, the linked table style defines the formatting for banded rows. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    firstCol (First Column)

    Enables or disables the first column formatting for a table style.  A value of on, 1 or true will enable the first column formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr firstCol="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the first column formatting is enabled for the table.  When applied, the linked table style defines the formatting for the first column. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    firstRow (First Row)

    Enables or disables the first row formatting for a table style.  A value of on, 1 or true will enable the first row formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr firstRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the first row formatting is enabled for the table.  When applied, the linked table style defines the formatting for the first row. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    lastCol (Last Column)

    Enables or disables the last column formatting for a table style.  A value of on, 1 or true will enable the last column formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr lastCol="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the last column formatting is enabled for the table.  When applied, the linked table style defines the formatting for the last column. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    lastRow (Last Row)

    Enables or disables the last row formatting for a table style.  A value of on, 1 or true will enable the last row formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr lastRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the last row formatting is enabled for the table.  When applied, the linked table style defines the formatting for the last row. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    rtl (Right-to-Left)

    Defines enables the right-to-left settings of a table.  If the value of rtl is on, 1 or true, then the table will be laid out from the right-to-left rather than the default left-to-right.

     

    [Example:  Consider the following run:

     

    <a:tblPr rtl="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see that the table is to be created in a right-to-left direction. end example]

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    The following XML Schema fragment defines the contents of this element:

    <complexType name="CT_TableProperties">

       <sequence>

           <group ref="EG_FillProperties" minOccurs="0" maxOccurs="1"/>

           <group ref="EG_EffectProperties" minOccurs="0" maxOccurs="1"/>

           <choice minOccurs="0" maxOccurs="1">

              <element name="tableStyle" type="CT_TableStyle"/>

              <element name="tableStyleId" type="ST_Guid"/>

           </choice>

           <element name="extLst" type="CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>

       </sequence>

       <attribute name="rtl" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="firstRow" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="firstCol" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="lastRow" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="lastCol" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="bandRow" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="bandCol" type="xsd:boolean" use="optional" default="false"/>

    </complexType>

    • Marked as answer by adam_j_m_ Wednesday, February 24, 2010 1:00 AM
    Wednesday, February 24, 2010 1:00 AM

All replies

  • Can someone please answer this - we're stuck and only Microsoft can resolve the question.

    thanks - dave
    Windward Reports - World's Greatest SharePoint Reporting & DocGen
    Tuesday, February 23, 2010 5:25 PM
  • i found the answer

    the parts of the tablestyles object that get applied to a given table are set in the element

    <a:tblPr> 

     tblPr (Table Properties)

    This element defines the properties of a table on the whole.  Within this element are many visual modifications that can be applied to the table.

    [Example: Consider the following example of a tblPr within DrawingML:

    <a:tblPr firstRow="1" bandRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

    In this example, we see that there is a link to a table style id5.1.6.10) which is defined elsewhere and that the first column formatting and banded row formatting has been enabled.  The table style defines the formatting applied with the two formatting options enabled.  end example]


     

    Attributes

    Description

    bandCol (Banded Columns)

    Enables or disables the banded column formatting for a table style.  A value of on, 1 or true will enable the banded column formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr bandCol="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the banded column formatting is enabled for the table.  When applied, the linked table style defines the formatting for banded columns. end example]

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    bandRow (Banded Rows)

    Enables or disables the banded row formatting for a table style.  A value of on, 1 or true will enable the banded row formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr bandRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the banded row formatting is enabled for the table.  When applied, the linked table style defines the formatting for banded rows. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    firstCol (First Column)

    Enables or disables the first column formatting for a table style.  A value of on, 1 or true will enable the first column formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr firstCol="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the first column formatting is enabled for the table.  When applied, the linked table style defines the formatting for the first column. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    firstRow (First Row)

    Enables or disables the first row formatting for a table style.  A value of on, 1 or true will enable the first row formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr firstRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the first row formatting is enabled for the table.  When applied, the linked table style defines the formatting for the first row. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    lastCol (Last Column)

    Enables or disables the last column formatting for a table style.  A value of on, 1 or true will enable the last column formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr lastCol="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the last column formatting is enabled for the table.  When applied, the linked table style defines the formatting for the last column. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    lastRow (Last Row)

    Enables or disables the last row formatting for a table style.  A value of on, 1 or true will enable the last row formatting defined in the table style.  The attribute will default to off if it is not specified.

     

    [Example:  Consider the following run:

     

    <a:tblPr lastRow="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see the last row formatting is enabled for the table.  When applied, the linked table style defines the formatting for the last row. end example]

     

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    rtl (Right-to-Left)

    Defines enables the right-to-left settings of a table.  If the value of rtl is on, 1 or true, then the table will be laid out from the right-to-left rather than the default left-to-right.

     

    [Example:  Consider the following run:

     

    <a:tblPr rtl="1">
      <a:tableStyleId>{5940675A-B579-460E-94D1-
      54222C63F5DA}</a:tableStyleId>
    </a:tblPr>

     

    In this example, we can see that the table is to be created in a right-to-left direction. end example]

     

    The possible values for this attribute are defined by the XML Schema boolean datatype.

    The following XML Schema fragment defines the contents of this element:

    <complexType name="CT_TableProperties">

       <sequence>

           <group ref="EG_FillProperties" minOccurs="0" maxOccurs="1"/>

           <group ref="EG_EffectProperties" minOccurs="0" maxOccurs="1"/>

           <choice minOccurs="0" maxOccurs="1">

              <element name="tableStyle" type="CT_TableStyle"/>

              <element name="tableStyleId" type="ST_Guid"/>

           </choice>

           <element name="extLst" type="CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>

       </sequence>

       <attribute name="rtl" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="firstRow" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="firstCol" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="lastRow" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="lastCol" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="bandRow" type="xsd:boolean" use="optional" default="false"/>

       <attribute name="bandCol" type="xsd:boolean" use="optional" default="false"/>

    </complexType>

    • Marked as answer by adam_j_m_ Wednesday, February 24, 2010 1:00 AM
    Wednesday, February 24, 2010 1:00 AM