Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Odpovědět Why white text in one, black text in the other?

  • 8. května 2012 18:02
     
      Obsahuje kód

    Hi;

    Please take a look at http://www.windward.net/temp/WhiteText.xlsx and http://www.windward.net/temp/BlackText.xlsx

    If you dive in, both have sheet2.xml:

    		<row r="1" spans="1:1" x14ac:dyDescent="0.25">
    			<c r="A1" s="2" t="s">
    				<v>0</v>
    			</c>
    		</row>
    

    And from that they have:

    		<xf numFmtId="0" fontId="2" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1"/>
    <!-- and - the fontId number is different -->
    		<xf numFmtId="0" fontId="4" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1"/>
    

    But both of these resolve to (different fontId but the font pointed to is the same):

    		<font>
    			<b/>
    			<sz val="11"/>
    			<color theme="0"/>
    			<name val="Calibri"/>
    			<family val="2"/>
    		</font>
    
    		<fill>
    			<patternFill patternType="solid">
    				<fgColor theme="3"/>
    				<bgColor indexed="64"/>
    			</patternFill>
    		</fill>
    

    Both are using the office theme. So why does one display the text as white and the other as black?

    ??? - thanks - dave


    Who will win The International Collegiate Programming Championships?

Všechny reakce

  • 8. května 2012 19:25
    Moderátor
     
     

    Hi David,

    Thank you for your question.  A colleague will follow up with you to investigate this issue.
     
    Regards,
    Mark Miller | Open Specifications Support Team

  • 9. května 2012 3:41
    Moderátor
     
     

    Hi Dave,

    I'll look into this and get back to you shortly.  Thanks for the sample documents and description.

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

  • 22. května 2012 2:18
    Moderátor
     
     Odpovědět

    Hi Dave,

    I believe this is because the shared strings have their own color scheme specifications:

    In Whitetext.xlsx:

        <si>
            <r>
                <rPr>
                    <b/>
                    <sz val="11"/>
                    <color theme="0"/>
                    <rFont val="Calibri"/>
                    <family val="2"/>
                </rPr>
                <t>Income and Expenses</t>
            </r>
        </si>

    and in blacktext.xlsx:

        <si>
            <r>
                <rPr>
                    <b/>
                    <sz val="11"/>
                    <color theme="1"/>
                    <rFont val="Calibri"/>
                    <family val="2"/>
                </rPr>
                <t>Income and Expenses</t>
            </r>
        </si>

    And the two definitions for color theme in themes.xml part:
     
            <a:clrScheme name="Office">
                <a:dk1>
                    <a:sysClr val="windowText" lastClr="000000"/>
                </a:dk1>
                <a:lt1>
                    <a:sysClr val="window" lastClr="FFFFFF"/>
                </a:lt1>

    From the description in 18.4 "Shared String Table":
    "Some strings in the workbook can have formatting applied at a level that is more granular than the cell level."

    This means that the string's own properties will be used over the cell property. 

    Tom

  • 29. května 2012 17:08
     
     

    Thank you - we had a bug where we didn't handle a <color> where the only attribute was theme.

    thanks - dave


    Who will win The International Collegiate Programming Championships?