Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0"
- xmlns="urn:schemas-microsoft-com:office:spreadsheet"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:msxsl="urn:schemas-microsoft-com:xslt"
- xmlns:user="urn:my-scripts"
- xmlns:o="urn:schemas-microsoft-com:office:office"
- xmlns:x="urn:schemas-microsoft-com:office:excel"
- xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
- <xsl:template match="/">
- <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
- xmlns:o="urn:schemas-microsoft-com:office:office"
- xmlns:x="urn:schemas-microsoft-com:office:excel"
- xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
- xmlns:html="http://www.w3.org/TR/REC-html40">
- <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
- <WindowHeight>10005</WindowHeight>
- <WindowWidth>10005</WindowWidth>
- <WindowTopX>120</WindowTopX>
- <WindowTopY>135</WindowTopY>
- <ProtectStructure>False</ProtectStructure>
- <ProtectWindows>False</ProtectWindows>
- </ExcelWorkbook>
- <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
- <Version>11.9999</Version>
- </DocumentProperties>
- <Styles>
- <Style ss:ID="Default" ss:Name="Normal">
- <Alignment ss:Vertical="Bottom"/>
- <Borders/>
- <Font ss:FontName="Arial Cyr" x:CharSet="204"/>
- <Interior/>
- <NumberFormat/>
- <Protection/>
- </Style>
- <Style ss:ID="s22">
- <Borders>
- <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
- </Borders>
- </Style>
- <Style ss:ID="s27">
- <Borders>
- <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
- </Borders>
- <NumberFormat ss:Format="dd/mm/yy;@"/>
- </Style>
- <Style ss:ID="s28">
- <NumberFormat ss:Format="dd/mm/yy;@"/>
- </Style>
- <Style ss:ID="s29">
- <Alignment ss:Vertical="Bottom" ss:WrapText="1"/>
- <Borders>
- <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
- </Borders>
- <Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Bold="1"/>
- <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
- </Style>
- <Style ss:ID="s30">
- <Alignment ss:Vertical="Bottom" ss:WrapText="1"/>
- <Borders>
- <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
- <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
- </Borders>
- <Font ss:FontName="Arial Cyr" x:CharSet="204" ss:Bold="1"/>
- <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/>
- <NumberFormat ss:Format="dd/mm/yy;@"/>
- </Style>
- <Style ss:ID="s31">
- <Alignment ss:Vertical="Bottom" ss:WrapText="1"/>
- </Style>
- </Styles>
- <Worksheet ss:Name="Report">
- <Table x:FullColumns="1" x:FullRows="1">
- <Column ss:Index="2" ss:AutoFitWidth="0" ss:Width="123"/>
- <Column ss:AutoFitWidth="0" ss:Width="78.75"/>
- <Column ss:AutoFitWidth="0" ss:Width="187.5"/>
- <Column ss:AutoFitWidth="0" ss:Width="246"/>
- <Column ss:StyleID="s28" ss:AutoFitWidth="0" ss:Width="64.5" ss:Span="3"/>
- <Column ss:Index="10" ss:AutoFitWidth="0" ss:Width="108.75"/>
- <Column ss:AutoFitWidth="0" ss:Width="95.25"/>
- <Column ss:AutoFitWidth="0" ss:Width="87.75"/>
- <Column ss:AutoFitWidth="0" ss:Width="164.25"/>
- <Row ss:Height="38.25" ss:StyleID="s31">
- <Cell ss:StyleID="s29"><Data ss:Type="String">Number</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Module udf</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Category</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Name</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Description</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s30"><Data ss:Type="String">Submit date</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s30"><Data ss:Type="String">Update date</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s30"><Data ss:Type="String">Close date</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s30"><Data ss:Type="String">Deadline udf</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Submitter</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Handler</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Priority</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- <Cell ss:StyleID="s29"><Data ss:Type="String">Statuts</Data><NamedCell
- ss:Name="_FilterDatabase"/></Cell>
- </Row>
- <xsl:apply-templates select="trackstudio-task/task"/>
- </Table>
- <AutoFilter x:Range="R1C1:R1C13" xmlns="urn:schemas-microsoft-com:office:excel">
- </AutoFilter>
- </Worksheet>
- </Workbook>
- </xsl:template>
- <xsl:template match="trackstudio-task/task">
- <Row>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="number" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:apply-templates select="udfs/udf[@name='Module']" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="category" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="name" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="description" />
- </Data></Cell>
- <xsl:choose>
- <xsl:when test="string-length(submitdate) > 0">
- <Cell ss:StyleID="s27"><Data ss:Type="DateTime">
- <xsl:call-template name="FormatDate">
- <xsl:with-param name="DateTime" select="submitdate"/>
- </xsl:call-template>
- </Data></Cell>
- </xsl:when>
- <xsl:otherwise>
- <Cell ss:StyleID="s27"><Data ss:Type="String">
- <xsl:value-of select="submitdate" />
- </Data></Cell>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="string-length(updatedate) > 0">
- <Cell ss:StyleID="s27"><Data ss:Type="DateTime">
- <xsl:call-template name="FormatDate">
- <xsl:with-param name="DateTime" select="updatedate"/>
- </xsl:call-template>
- </Data></Cell>
- </xsl:when>
- <xsl:otherwise>
- <Cell ss:StyleID="s27"><Data ss:Type="String">
- <xsl:value-of select="updatedate" />
- </Data></Cell>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="string-length(closedate) > 0">
- <Cell ss:StyleID="s27"><Data ss:Type="DateTime">
- <xsl:call-template name="FormatDate">
- <xsl:with-param name="DateTime" select="closedate"/>
- </xsl:call-template>
- </Data></Cell>
- </xsl:when>
- <xsl:otherwise>
- <Cell ss:StyleID="s27"><Data ss:Type="String">
- <xsl:value-of select="closedate" />
- </Data></Cell>
- </xsl:otherwise>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="string-length(udfs/udf[@name='Сделать до даты']) > 0">
- <Cell ss:StyleID="s27"><Data ss:Type="DateTime">
- <xsl:call-template name="FormatDate">
- <xsl:with-param name="DateTime" select="udfs/udf[@name='Deadline udf']"/>
- </xsl:call-template>
- </Data></Cell>
- </xsl:when>
- <xsl:otherwise>
- <Cell ss:StyleID="s27"><Data ss:Type="String">
- <xsl:value-of select="udfs/udf[@name='Deadline udf']" />
- </Data></Cell>
- </xsl:otherwise>
- </xsl:choose>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="submitter" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="handler" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="priority" />
- </Data></Cell>
- <Cell ss:StyleID="s22"><Data ss:Type="String">
- <xsl:value-of select="status" />
- </Data></Cell>
- </Row>
- </xsl:template>
- <xsl:template match="udf">
- <xsl:value-of select="@value" />
- </xsl:template>
- <!-- old date format "23.11.09 15:40" -->
- <xsl:template name="FormatDate">
- <xsl:param name="DateTime" />
- <!-- new date format 2006-01-14T08:55:22 -->
- <xsl:if test="string-length($DateTime) > 0">
- <xsl:variable name="day">
- <xsl:value-of select="substring($DateTime,1,2)" />
- </xsl:variable>
- <xsl:variable name="mo">
- <xsl:value-of select="substring($DateTime,4,2)" />
- </xsl:variable>
- <xsl:variable name="year">
- <xsl:value-of select="substring($DateTime,7,2)" />
- </xsl:variable>
- <xsl:variable name="time">
- <xsl:value-of select="substring-after($DateTime,' ')" />
- </xsl:variable>
- <xsl:variable name="hh">
- <xsl:value-of select="substring-before($time,':')" />
- </xsl:variable>
- <xsl:variable name="mm">
- <xsl:value-of select="substring-after($time,':')" />
- </xsl:variable>
- <xsl:text>20</xsl:text>
- <xsl:value-of select="$year"/>
- <xsl:value-of select="'-'"/>
- <xsl:value-of select="$mo"/>
- <xsl:value-of select="'-'"/>
- <xsl:value-of select="$day"/>
- <xsl:value-of select="'T'"/>
- <xsl:if test="(string-length($hh) < 2)">
- <xsl:value-of select="0"/>
- </xsl:if>
- <xsl:value-of select="$hh"/>
- <xsl:value-of select="':'"/>
- <xsl:value-of select="$mm"/>
- <xsl:value-of select="':'"/>
- <xsl:text>00.000</xsl:text>
- </xsl:if>
- </xsl:template>
- </xsl:stylesheet>
RAW Paste Data