I would go the xslt2 path. Save the file as csv
, and then you can use a xslt template such as : http://andrewjwelch.com/code/xslt/csv/csv-to-xml_v2.html to convert it to xml.
Edit the template to create a new xsl:result-document whenever you want your new file. Basically you should edit the lines containing
<row>
<xsl:variable name="lineItems" select="fn:getTokens(.)" as="xs:string+" />
Where a new <row>
element is created, and replace them with something like:
<xsl:variable name="lineItems" select="fn:getTokens(.)" as="xs:string+" />
<xsl:result-document href="$lineItems[1]">
Also replace </row>
with </xsl:result-document>
of-course you should change the template to your output needs, and change <xsl:param name="pathToCSV" select="'file:///c:/csv.csv'" />
to reference to your file.
The code above is untested, but I believe it should work.
Edit 1:
xslt2
bindings exist in many programing languages, and there are stand-alone versions as well. You can also split the process in two: save the xml version in excel, and transform the resulting xml to many xml files.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…