locked
about CT_Xf RRS feed

  • السؤال

  • Hi dear all,

    1. If CT_Xf.apply* , for example, CT_Xf.applyNumberFormat is missing , what does it mean ? true or false?

    2. For a record in cellXfs CT_Xf.xfid can miss ?

    many thanks !!!


    • تم التحرير بواسطة yushang4 02/شعبان/1436 01:06 ص
    02/شعبان/1436 01:03 ص

الإجابات

  • Hi yushang4

    The better place to ask this might be the forum that supports the various file specifications (https://social.msdn.microsoft.com/Forums/office/en-US/523f0f30-7073-4e42-a98f-6f8f8550af56/about-ctxf?forum=oxmlsdk), however, reading the ECMA Open Office XML Part 1 document, sections 18.8.9 and 18.8.10 indicates that if you do NOT specify then the default behavior applies. If you specify 0 then the formatting is definitely NOT applied; if you specify 1 then it is applied.

    "...Master formatting records also specify whether to apply or ignore particular aspects of formatting."

    [Example: This example shows 4 master formatting records, each defining formatting for a named cell style (expressed in the cellStyles collection). Note that 0th record does not express any "apply" attributes, while the other records do express "apply" attribute values. For example, the last record specifies that number format, alignment, and protection formatting will not be applied to the cell, even when that information is specified in related formatting records. <cellstylexfs count="4"><xf borderid="0" fillid="0" fontid="0" numfmtid="0"><xf applyalignment="0" applyborder="0" applyfill="0" applynumberformat="0" applyprotection="0" borderid="0" fillid="0" fontid="2" numfmtid="0"><xf applyalignment="0" applyfill="0" applynumberformat="0" applyprotection="0" borderid="1" fillid="0" fontid="3" numfmtid="0"><xf applyalignment="0" applynumberformat="0" applyprotection="0" borderid="2" fillid="2" fontid="4" numfmtid="0"></xf> end example]</xf></xf></xf></cellstylexfs>

    <cellStyleXfs count="4">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
    <xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyNumberFormat="0"
    applyFill="0" applyBorder="0" applyAlignment="0" applyProtection="0"/>
    <xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyNumberFormat="0"
    applyFill="0" applyAlignment="0" applyProtection="0"/>
    <xf numFmtId="0" fontId="4" fillId="2" borderId="2" applyNumberFormat="0"
    applyAlignment="0" applyProtection="0"/>
    </cellStyleXfs>


    Cindy Meister, VSTO/Word MVP, my blog

    02/شعبان/1436 07:10 م

جميع الردود

  • Hi yushang4

    The better place to ask this might be the forum that supports the various file specifications (https://social.msdn.microsoft.com/Forums/office/en-US/523f0f30-7073-4e42-a98f-6f8f8550af56/about-ctxf?forum=oxmlsdk), however, reading the ECMA Open Office XML Part 1 document, sections 18.8.9 and 18.8.10 indicates that if you do NOT specify then the default behavior applies. If you specify 0 then the formatting is definitely NOT applied; if you specify 1 then it is applied.

    "...Master formatting records also specify whether to apply or ignore particular aspects of formatting."

    [Example: This example shows 4 master formatting records, each defining formatting for a named cell style (expressed in the cellStyles collection). Note that 0th record does not express any "apply" attributes, while the other records do express "apply" attribute values. For example, the last record specifies that number format, alignment, and protection formatting will not be applied to the cell, even when that information is specified in related formatting records. <cellstylexfs count="4"><xf borderid="0" fillid="0" fontid="0" numfmtid="0"><xf applyalignment="0" applyborder="0" applyfill="0" applynumberformat="0" applyprotection="0" borderid="0" fillid="0" fontid="2" numfmtid="0"><xf applyalignment="0" applyfill="0" applynumberformat="0" applyprotection="0" borderid="1" fillid="0" fontid="3" numfmtid="0"><xf applyalignment="0" applynumberformat="0" applyprotection="0" borderid="2" fillid="2" fontid="4" numfmtid="0"></xf> end example]</xf></xf></xf></cellstylexfs>

    <cellStyleXfs count="4">
    <xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>
    <xf numFmtId="0" fontId="2" fillId="0" borderId="0" applyNumberFormat="0"
    applyFill="0" applyBorder="0" applyAlignment="0" applyProtection="0"/>
    <xf numFmtId="0" fontId="3" fillId="0" borderId="1" applyNumberFormat="0"
    applyFill="0" applyAlignment="0" applyProtection="0"/>
    <xf numFmtId="0" fontId="4" fillId="2" borderId="2" applyNumberFormat="0"
    applyAlignment="0" applyProtection="0"/>
    </cellStyleXfs>


    Cindy Meister, VSTO/Word MVP, my blog

    02/شعبان/1436 07:10 م
  • many thanks , I'll check it
    20/ربيع الأول/1441 01:41 ص