0

Im working on program, that generate excel report from DB. Im using xmlss to create excel document and then convert it. Main problem is that to create cell with different from others style, i need to create the style first. But how to make this not using defined styles?

To make it more clear i can compare this with css.

In css I can define style first and then using ID="StyleName" attach it to my tag. Also I can do like that:tag style="bold:1 etc."

How can I do the same in XMLSS?

Regards, Rich.

dreftymac
  • 31,404
  • 26
  • 119
  • 182
StNickolas
  • 576
  • 7
  • 20

2 Answers2

0

As shown at ss:Span tag description, there are some way to do it but it is underdocumented.

So your example in XMLSS would look like

      <Cell>
        <Data ss:Type="String">
          <Span ss:Style="text-effect:outline">Similar to Bold in behavior, this attribute specifies whether the font is rendered as an outline.</Span>
        </Data>
      </Cell>

But I wonder where to get full list of available options for inline ss:Style or maybe there are some convention to shift easily between inline and predefined ss:Style

      <Style ss:ID="bold">
        <Font ss:Outline="1" />
      </Style>

Also for quick inline formatting try looking at ss:Data optional elements B, Font, I, S, Span, Sub, Sup and U.

Be Brave Be Like Ukraine
  • 7,596
  • 3
  • 42
  • 66
melhesedek
  • 66
  • 3
0

There is a full specification of the Excel XMLSS tags here. It gives a full description of the various tags, optional/required attributes, and short descriptions (Much like a CSS property specification).

If your start by looking at the ss:Workbook tag (which is the top-most element of any XMLSS Excel document) it will tell you the required layout/ordering.

Hope this helps with this and future questions, took me awhile to find the spec and its made my life a lot easier when working with XMLSS.

romeara
  • 1,426
  • 1
  • 17
  • 26
  • I used this specification from the beginning) My question is much wider that this. I wanted to use cascade styling. Now i think that XMLSS got old, and nobody using it. They use OXML instead. – StNickolas Aug 21 '13 at 10:19