none
Where is the Normal Style Font defined in an XLSX file RRS feed

  • Question

  • Hi all;

    In 18.3.1.13, the attribute width says:

    Column width measured as the number of characters of the maximum digit width of the numbers 0, 1, 2, …, 9 as rendered in the normal style's font. There are 4 pixels of margin padding (two on each side), plus 1 pixel padding for the gridlines.

    And in 18.8.1, the indent attribute says:

    An integer value, where an increment of 1 represents 3 spaces. Indicates the number of spaces (of the normal style font) of indentation for text in a cell. The number of spaces to indent is calculated as following

    Which leads to the question - where is the normal style font specified?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Wednesday, March 12, 2014 5:37 PM

Answers

  • Hi Dave, the 'Normal' style is defined in the styles.xml file. If you create a new workbook, save it, rename it to .zip, and extract the styles.xml file you can clearly see the cellStyle, cellStyleXfs, and font properties for the 'Normal' style. In this case, a file created with Excel 2013 uses the Calibri font at a size of 11 for the 'Normal' style.

     

    Please let me know if this answers your question.

     

    <fonts x14ac:knownFonts="1" count="1">

    <font>

    <sz val="11"/>

    <color theme="1"/>

    <name val="Calibri"/>

    <family val="2"/>

    <scheme val="minor"/>

    </font>

    </fonts>

     

    <cellStyleXfs count="1">

    <xf borderId="0" fillId="0" fontId="0" numFmtId="0"/>

    </cellStyleXfs>

     

    <cellStyles count="1">

    <cellStyle xfId="0" builtinId="0" name="Normal"/>

    </cellStyles>


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, March 13, 2014 8:23 PM
    Moderator

All replies

  • Hello Dave

    Thank you for contacting Microsoft Support. A support engineer will contact you to assist further.

    Regards


    Tarun Chopra | Escalation Engineer | Open Specifications Support Team

    Wednesday, March 12, 2014 6:40 PM
  • Hi Dave, I am the engineer who will be working with you on this issue. I am currently researching the problem and will provide you with an update soon. Thank you for your patience.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Wednesday, March 12, 2014 9:18 PM
    Moderator
  • Hi Dave, the 'Normal' style is defined in the styles.xml file. If you create a new workbook, save it, rename it to .zip, and extract the styles.xml file you can clearly see the cellStyle, cellStyleXfs, and font properties for the 'Normal' style. In this case, a file created with Excel 2013 uses the Calibri font at a size of 11 for the 'Normal' style.

     

    Please let me know if this answers your question.

     

    <fonts x14ac:knownFonts="1" count="1">

    <font>

    <sz val="11"/>

    <color theme="1"/>

    <name val="Calibri"/>

    <family val="2"/>

    <scheme val="minor"/>

    </font>

    </fonts>

     

    <cellStyleXfs count="1">

    <xf borderId="0" fillId="0" fontId="0" numFmtId="0"/>

    </cellStyleXfs>

     

    <cellStyles count="1">

    <cellStyle xfId="0" builtinId="0" name="Normal"/>

    </cellStyles>


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Thursday, March 13, 2014 8:23 PM
    Moderator
  • Hi;

    Thank you. Two follow-ons:

    1. Will the name be "Normal" under all languages? Or does the name change if they're running Excel under the Chinese language?
    2. Can you get them to document this in the spec?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Thursday, March 13, 2014 11:13 PM
  • Hi Dave, I will test out this scenario and let you know what I find out. Also, what specifically do you think needs to be documented in the spec?

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Friday, March 14, 2014 6:43 PM
    Moderator
  • I think they should have a note in both 18.3.1.13 and 18.8.1 that states where the Normal style is defined. Once you listed that it all made complete sense. But that is not listed anywhere in the spec.

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Friday, March 14, 2014 7:13 PM
  • Hi Dave, I tested this scenario using a Japanese installation of Windows and Office 2007/2013 and found out that the name of the style is indeed different. In the styles.xml file the "Normal" style is named "標準" which is ‘hyoujun’ and means standard/normal. So, it appears that some things are localized according to the language.

    I also tested this same scenario with Word and found that it does NOT do the same thing. The styles.xml file remains entirely in English with no localized style names.


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team


    Tuesday, March 18, 2014 5:22 PM
    Moderator
  • First off, thanks for checking.

    Does Microsoft have a list of all names used? We sort of need that to find the normal style.

    ??? - thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Tuesday, March 18, 2014 5:25 PM
  • Hi Dave, I agree. I will continue to pursue this and let you know when I have more information.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, March 18, 2014 7:11 PM
    Moderator
  • Hi Dave, according to ISO/IEC 29500, section 18.8.7 cellStyle (Cell Style), the list of names that are used for built in cellstyles is not required for either writing or reading XML files. This is because the key for cellStyle is the builtinId and not the name. To output or display the file, the builtinId should be what is used to determine the style. When creating files, you have the ability to choose whatever name you like (which will be ignored by Excel for built in styles and respected for custom styles) and the documented recommendation for a default value is Normal.

     

    "For all built-in cell styles, the builtinId determines the style, not the name. For all cell styles, Normal is applied by default"


    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Monday, April 7, 2014 6:47 PM
    Moderator
  • Hi Josh;

    Is a builtInId=0 the normal one? Or is the normal id specified somewhere?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Monday, April 7, 2014 9:22 PM
  • Hi Dave. Yes, that is correct. ISO/IEC 29500-1, Annex G contains a list of the built-in cell styles, their builtinId values, and names.

    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

    Tuesday, April 8, 2014 3:05 PM
    Moderator