[英]Table Banding in Open Office XML / DrawingML
I am playing with the conversion of PPTX files to HTML and am stuck on an issue with Drawing ML tables, specifically the banding of rows. 我正在玩PPTX文件到HTML的转换,并且遇到了Drawing ML表的问题,特别是行的带区。
I have a table with 3 different colors, the main accent color, a tint on the Band1H row and a lighter tint on the Band2H row. 我有一张桌子,桌子上有3种不同的颜色,主要的主色调,Band1H行上的色调和Band2H行上的较浅色调。 The properties of the table specify that firstRow="1" and bandRow="1".
该表的属性指定firstRow =“ 1”和bandRow =“ 1”。 I have no problems getting the background color for the firstRow and Band1H but the Band2H seems to only be inside the wholeTbl element, which I understand (maybe incorrectly) that I cannot read from unless all table properties are toggled off.
我没有问题可以获取firstRow和Band1H的背景颜色,但是Band2H似乎只位于wholeTbl元素内,我理解(可能是错误地)除非所有表属性都被关闭,否则我无法读取。
Whats the proper way to get these styles? 获得这些样式的正确方法是什么?
Example image of table in question 有关表格的示例图片
Table from slide1.xml slide1.xml中的表
<a:tbl>
<a:tblPr firstRow="1" bandRow="1">
<a:tableStyleId>{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}</a:tableStyleId>
</a:tblPr>
<a:tblGrid>
<a:gridCol w="1354667"/>
<a:gridCol w="1354667"/>
<a:gridCol w="1354667"/>
<a:gridCol w="1354667"/>
<a:gridCol w="1354667"/>
<a:gridCol w="1354667"/>
</a:tblGrid>
<a:tr h="567215">
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h1</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h2</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h3</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h4</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h5</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h5</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
</a:tr>
<a:tr h="567215">
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>a</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>b</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>c</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>d</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>e</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>f</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
</a:tr>
<a:tr h="567215">
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>g</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>h</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" err="1" smtClean="0"/>
<a:t>i</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>j</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>k</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>l</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
</a:tr>
<a:tr h="567215">
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>m</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>n</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>o</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>p</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>q</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr/>
<a:lstStyle/>
<a:p>
<a:r>
<a:rPr lang="en-US" dirty="0" smtClean="0"/>
<a:t>r</a:t>
</a:r>
<a:endParaRPr lang="en-US" dirty="0"/>
</a:p>
</a:txBody>
<a:tcPr/>
</a:tc>
</a:tr>
</a:tbl>
tableStyles.xml tableStyles.xml
<a:tblStyle styleId="{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}" styleName="Medium Style 2 - Accent 2">
<a:wholeTbl>
<a:tcTxStyle>
<a:fontRef idx="minor">
<a:prstClr val="black"/>
</a:fontRef>
<a:schemeClr val="dk1"/>
</a:tcTxStyle>
<a:tcStyle>
<a:tcBdr>
<a:left>
<a:ln w="12700" cmpd="sng">
<a:solidFill>
<a:schemeClr val="lt1"/>
</a:solidFill>
</a:ln>
</a:left>
<a:right>
<a:ln w="12700" cmpd="sng">
<a:solidFill>
<a:schemeClr val="lt1"/>
</a:solidFill>
</a:ln>
</a:right>
<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>
<a:insideH>
<a:ln w="12700" cmpd="sng">
<a:solidFill>
<a:schemeClr val="lt1"/>
</a:solidFill>
</a:ln>
</a:insideH>
<a:insideV>
<a:ln w="12700" cmpd="sng">
<a:solidFill>
<a:schemeClr val="lt1"/>
</a:solidFill>
</a:ln>
</a:insideV>
</a:tcBdr>
<a:fill>
<a:solidFill>
<a:schemeClr val="accent2">
<a:tint val="20000"/>
</a:schemeClr>
</a:solidFill>
</a:fill>
</a:tcStyle>
</a:wholeTbl>
<a:band1H>
<a:tcStyle>
<a:tcBdr/>
<a:fill>
<a:solidFill>
<a:schemeClr val="accent2">
<a:tint val="40000"/>
</a:schemeClr>
</a:solidFill>
</a:fill>
</a:tcStyle>
</a:band1H>
<a:band2H>
<a:tcStyle>
<a:tcBdr/>
</a:tcStyle>
</a:band2H>
<a:band1V>
<a:tcStyle>
<a:tcBdr/>
<a:fill>
<a:solidFill>
<a:schemeClr val="accent2">
<a:tint val="40000"/>
</a:schemeClr>
</a:solidFill>
</a:fill>
</a:tcStyle>
</a:band1V>
<a:band2V>
<a:tcStyle>
<a:tcBdr/>
</a:tcStyle>
</a:band2V>
<a:lastCol>
<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:fill>
<a:solidFill>
<a:schemeClr val="accent2"/>
</a:solidFill>
</a:fill>
</a:tcStyle>
</a:lastCol>
<a:firstCol>
<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:fill>
<a:solidFill>
<a:schemeClr val="accent2"/>
</a:solidFill>
</a:fill>
</a:tcStyle>
</a:firstCol>
<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="accent2"/>
</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="accent2"/>
</a:solidFill>
</a:fill>
</a:tcStyle>
</a:firstRow>
</a:tblStyle>
The lighter band you're looking for is the tint
value calculation of accent2
under schemeClr
in fill
in tcStyle
. 您正在寻找更轻的乐队是
tint
的值计算accent2
下schemeClr
在fill
在tcStyle
。 You'll need to find the value of accent2
and use sRGB to calc the tint
, in this case at 20%, rounding to 0.0 or 1.0 if any values fall below or above. 您需要找到
accent2
的值并使用sRGB来计算tint
,在这种情况下为20%,如果任何值低于或高于则四舍五入为0.0或1.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.