Hi guys, My boss wants me to write a servlet to generate output in the CSV (is that the correct word ?) format. Fortunately, my servlet is generating XML data. I think, i will have to change the XSL only. Can someone tell me the mime type (and anything you know about it)?
CSV stands for Comma-Separated Values, and is normally a set of values separated by commas broken into rows terminated by your favorite end-of-line characters. And yes, it's fairly easy to set up XSL to transform those XML tags into commas and end-of-line' s.
Customer surveys are for companies who didn't pay proper attention to begin with.
Just a note if you're thinking of offering the CSV output to users in the 'rest of the world' (non-US) Here in Germany Excel seems to have other default separators than in the US. It appears to expect semi-colons and not commas. This may well be the case in other countries too. At the time I could not find any concrete documentation on this issue at M$. Paul
Joined: Sep 05, 2001
I checked it out. Excel has got different formats for DOS, MAC and Windows.
"Here in Germany Excel seems to have other default separators than in the US. It appears to expect semi-colons and not commas. This may well be the case in other countries too." Have you checked to see if "comma" separated CSVs are improperly displayed? The Excel delimited text import feature was designed for a number of different delimiters, including spaces, tabs, vertical-bars (an old Unix favorite), and, so far as I know, semicolons. When you open a delimited text as a file, it tries to guess and presents a dialog -- which it doesn't do when displaying in a browser, so I don't know if it limits itself to a particular delimiter set or not.