小编mos*_*ini的帖子

通过 xslt 添加超链接到 Excel 单元格

我有一个 xml 文件和一个 xslt 样式表文件。

如何通过特定 xml 字段仅将超链接添加到 xslt 文件中的特定 Excel 单元格。

我有以下伪代码,但不知道如何在 xslt 文件中设置它。

if (xmlAttribute =="Beleg")
{   href = "http://www.xyz.de/beleg.php?beleg=$fieldvalue
}
else if (xmlAttribute == "Lieferant")
{  href = "http://www.xyz.de/lieferant.php?lieferant=$fieldvalue
}
else
{  // no link
}
Run Code Online (Sandbox Code Playgroud)

有人能帮帮我吗。

这是我的 xml 和 xslt

XML:

<xml>
 <s:Schema id="RowsetSchema" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
<s:ElementType name="row" content="eltOnly">
<s:AttributeType name="ART">
  <s:datatype dt:type="string" dt:maxLength="3" rs:maybenull="false" /> 
  </s:AttributeType>
<s:AttributeType name="BELEG">
  <s:datatype dt:type="string" dt:maxLength="63" rs:maybenull="false" /> 
  </s:AttributeType>
<s:AttributeType name="BELEGPOSITION">
  <s:datatype dt:type="i2" /> 
  </s:AttributeType>
<s:AttributeType name="BESTELLUNGSDATUM">
  <s:datatype dt:type="dateTime" …
Run Code Online (Sandbox Code Playgroud)

xml xslt excel

4
推荐指数
1
解决办法
3532
查看次数

标签 统计

excel ×1

xml ×1

xslt ×1