qrilka / xlsx

Simple and incomplete Excel file parser/writer
MIT License
130 stars 64 forks source link

Fix #122 #123

Closed dvekeman closed 5 years ago

dvekeman commented 5 years ago

Richtext cell: underlining not recognized

qrilka commented 5 years ago

Thanks @dvekeman it looks like you're completely right, according to the spec:

<xsd:complexType name="CT_UnderlineProperty">
<xsd:attribute name="val" type="ST_UnderlineValues" use="optional" default="single"/>
</xsd:complexType>

What do you think about adding justNonDef to get the same <u/> in output for single underline? Otherwise looks to be a perfect fix for the problem.

dvekeman commented 5 years ago

Hi Thanks for the feedback! I'm not sure if I got it right, but I submitted a second commit where I use the justNonDef when creating the Element to get back an <u/> tag without attributes instead of <u val="single"/>

qrilka commented 5 years ago

Great, I will try to refactor it a bit (e.g. attrValues is a misleading name as it produces only 1 "value") and will merge

dvekeman commented 5 years ago

Awesome, thanks again!