How create a csv file from a datatable

  • Thread starter Thread starter radiohead
  • Start date Start date
R

radiohead

Is there a straightforward way of creating an excel/csv
file from a datatable. I don't know where to start with
this.

thank you.
 
Hi
what you can do with one line of code it to write your table to an XML
file . Using the wirteXML command of datasets ( you can wrap your datatable
in a dataset object if it is not already contained inside one ) .
if you what to write it to excel however , you can create and adaptor that
is connected to excel file and use that adataper's update command to fill
the excel file with your datatable ( you will pass the dataset of your
table as a parameter to the update command of the adaptor)
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC
 

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

Back
Top