XMLSS style inheritance

I am working on creating Excel workbooks in XML, through XMLSS, and I found myself stuck in one specific place.

According to the documentation at http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx#odc_xmlss_ss:style tag <ss:Style />has an available property ss:Parentthat allows this to inherit attributes of a previously defined style. However, I have a terrible time to get this to work.

I do not get any errors when opening the book, and the attributes of the child style are applied correctly, but none of the attributes of the parent style are transferred.

Since XMLSS is not very well documented outside of MSDN docs, I come to the StackOverflow crowd for help. Are there any caveats to using ss:Parentpoperty in elements <ss:Style />?

+3
source share
1 answer

Hi user352078 (catchy name that is)

SpreadsheetML ( "ss: Parent =" ) ( , ), , , : , , : ( ), , . sty_ProjektzeileStatus Borders-Style, Bottom (.. LineStyle: "Dash" ..).

, Borders , Borders ( , ).

<Style ss:ID="sty_ProjektzeileTexte" ss:Name="Texte">
   <Font ss:Bold="1" />
   <NumberFormat ss:Format="Standard" />
   <Borders>
      <Border ss:Position="Bottom" ss:LineStyle="Dash" ss:Weight="1" />
   </Borders>
</Style>

<Style ss:ID="sty_ProjektzeileStatus" ss:Parent="sty_ProjektzeileTexte">
   <!-- Overwrites original definition -->
   <NumberFormat ss:Format="0" />
   <!-- Although only Right line is added to the original definition from the parent style, 
        all 'sides' of the border element need to be defined, 
        even style for Bottom that is unchanged -->
   <Borders>
      <Border ss:Position="Bottom" ss:LineStyle="Dash" ss:Weight="1" />
      <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="2" />
   </Borders>
   <!-- Only fontstyle Bold is actually inherited -->
</Style>

, . , (ss: Name=) , , , ).

+4

Source: https://habr.com/ru/post/1747384/


All Articles