0

How to convert XML to CSV (to be shown in Excel file) using XSLT?

Provided XML value itself contains comma, e.g.

<name>The,Bad Boy</name>

My logic considers "The" & "Bad boy" as separate values as it goes in different columns after opening in Excel file.

Tomalak
  • 332,285
  • 67
  • 532
  • 628
Aryan
  • 1,767
  • 2
  • 22
  • 39
  • possible duplicate of [convert xml document to comma delimited (CSV) file using xslt stylesheet.](http://stackoverflow.com/questions/3056579/convert-xml-document-to-comma-delimited-csv-file-using-xslt-stylesheet) –  Oct 28 '10 at 14:28

1 Answers1

4

It's not that this type of question would not have been answered before:

By the way, "CSV" does not mean that values cannot contain commas or must be separated by commas.

Excel can understand CSV that is separated by other characters than comma (tab, for example), and values that contain the separator can be enclosed in quotes.

Community
  • 1
  • 1
Tomalak
  • 332,285
  • 67
  • 532
  • 628