Monthly Archives: November 2019

Workday – XSLT transformation to generate a CSV file with quotes

If you have a Studio integration that needs to output a XML file to CSV and needs quotes around your data use XTT. I used an XsltPlus step and then used an XSLT stylesheet to loop through my data and then copied the data needed into the CSV file. My Store step after the XsltPlus step is where I defined my CSV name.

A xml-to-csv step didn’t work for me as it would not wrap quotes around my data.

Make sure you have this in your stylesheet…

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
    xmlns:wd="urn:com.workday/bsvc" version="2.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xtt="urn:com.workday/xtt">

Example of XML creating the CSV…

<DELIMITER>
	<xsl:value-of select="$Delimiter" />
</DELIMITER>
<SUPERVISOR>
	<xsl:text>"WD_PAYROLL"</xsl:text>
</SUPERVISOR>
<DELIMITER>
	<xsl:value-of select="$Delimiter" />
</DELIMITER>