Web Service outputting csv files

F

fmancina

Hi All,

I currently have a web service outputting data in many different
formats (XML, EXCEL/XML, DataSet, ...). I was wondering what was the
best way to output CSV files? I have no problem building the files,
however I can't decide what data type to return them as. Should I
return a concatenated String and assume the consumer of the web service
will know how to write it to file?

I am just trying to find the most common way people return CSV files
from a Web Service.

Thanks for any help,

Frank
 
U

UsualDosage

I generally return mine as a StringBuilder object. Though I have also used a
straight string, and also a formatted DataTable.

Unless you really want it as a webservice, you can also just stream it back
through HTTP and set the MIME type to "application/excel". It'll open
directly in the browser as an Excel document, or prompt the user to save it.

HTH.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top