tag:blogger.com,1999:blog-32696142.post3961136711650702635..comments2024-02-19T01:02:59.086-06:00Comments on ASP.Net, C#, SQL, JQuery, Sharepoint: Exporting DataTable to CSV File FormatUnknownnoreply@blogger.comBlogger11125tag:blogger.com,1999:blog-32696142.post-59983734105087829982013-08-04T13:01:37.837-05:002013-08-04T13:01:37.837-05:00 good one good one Anonymoushttps://www.blogger.com/profile/02810699469956368630noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-89861010792898106102012-09-12T22:26:54.283-05:002012-09-12T22:26:54.283-05:00how come my result is when u click the button then...how come my result is when u click the button then the gridview show.Anonymoushttps://www.blogger.com/profile/02411693700411088210noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-55634636805524948662012-05-30T15:58:47.410-05:002012-05-30T15:58:47.410-05:00This doesn't handle any special cases for text...This doesn't handle any special cases for text columns. Leading 0, line breaks, quotes, commas, etc.Jesse and Begoñahttps://www.blogger.com/profile/02404054161378566550noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-64527956067950814472012-03-10T03:08:21.836-06:002012-03-10T03:08:21.836-06:00May god compensate u for saving our time
he canMay god compensate u for saving our time<br />he canOptimizerhttps://www.blogger.com/profile/17225127087254712907noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-38522173921051903192011-07-20T05:17:29.090-05:002011-07-20T05:17:29.090-05:00Thank you, you saved atleast one hour of my life!Thank you, you saved atleast one hour of my life!Khadimhttps://www.blogger.com/profile/17799093034824596101noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-20784615403029178512011-05-26T02:27:34.990-05:002011-05-26T02:27:34.990-05:00This is really helpful,i see the leading zero prob...This is really helpful,i see the leading zero problem solution suggested by you is really nice, but my requirement is to get the exactly same value e.g. 00001122 in excel file..as the soultion you suggested is producing the value like ="00001122" in the excel cell...Our client don't want this format..It should be exactly the similar to original value ..any help is really appreciated.Rockyhttps://www.blogger.com/profile/05465736229151589886noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-1443174392746878032010-07-01T08:34:04.719-05:002010-07-01T08:34:04.719-05:00This is a simple way but powerfull. That's gre...This is a simple way but powerfull. That's great !!<br /><br />Molto grazia Stephen...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-32696142.post-57572769905801188312009-09-08T02:54:58.124-05:002009-09-08T02:54:58.124-05:00Thanks Stephen. The leading zero problem solution ...Thanks Stephen. The leading zero problem solution suggested by you is really very helpful.<br /><br />Thank you.Vijaynoreply@blogger.comtag:blogger.com,1999:blog-32696142.post-31025642701566777012009-07-24T06:40:52.245-05:002009-07-24T06:40:52.245-05:00Thanks for the code, it has an issue where number ...Thanks for the code, it has an issue where number begin with 0 - such as telephone numbers. Excel will rmeove the leading 0. <br /><br />Here is a version which handles this case. <br /><br /> public static void ExportToCSV(DataTable dt, string strFilePath,string fileName)<br /> {<br /> var sw = new StreamWriter(strFilePath + fileName, false);<br /><br /> // Stephen Adamhttps://www.blogger.com/profile/16829510137441004560noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-43762372188657007382009-07-01T14:40:45.033-05:002009-07-01T14:40:45.033-05:00This is a pretty decent way convert a DataTable to...This is a pretty decent way convert a DataTable to CSV but as someone pointed out on my blog <a href="http://blog.runxc.com/post/2009/06/24/Exporting-a-DataTable-to-Excel-(DataTable-to-CSV).aspx" rel="nofollow"> Blog.RunXc DataTable to CSV</a> you need to really watch for string fields that have "commas , " in themBret Ferrierhttps://www.blogger.com/profile/10818434838861254953noreply@blogger.comtag:blogger.com,1999:blog-32696142.post-4136616443146161522009-03-29T15:37:00.000-05:002009-03-29T15:37:00.000-05:00Thank you so much!Thank you so much!Anonymousnoreply@blogger.com