"
 
 
 
ASP.NET (snapshot 2017) Microsoft documentation and samples

[How Do I:] Export Data to a Comma Delimited (CSV) File for an Application Like Excel

by Chris Pels

In this video Chris Pels shows how to take data from a database or other source and export it to a comma delimited file that can be used in an application like Excel. First, a set of data is created as a DataTable object. Next, the Response for the current web page request is cleared and the header and content type are configured to be a csv file. Then the actual data is added to the response stream by first writing the column headers for the csv file followed by the data values. This approach can be useful when users require an export of data so it can be manipulated locally in a program like Excel.

▶ Watch video (19 minutes)





Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnet/web-forms/videos/how-do-i/how-do-i-export-data-to-a-comma-delimited-csv-file-for-an-application-like-excel.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>