I need to export DataTable to Excel file. Is tehre anyone help me?
I dont want to listview to excel...
Regards.
darkocean
1
Junior Poster in Training
Recommended Answers
Jump to PostWhy not? Have a look at this link - http://www.codeproject.com/KB/office/exportxlscsv.aspx
Suggestion : http://sqlserver-qa.net/google_bart.gif
Jump to PostTry this:
// TO USE: // 1) include COM reference to Microsoft Excel Object library // add namespace... // 2) using Excel = Microsoft.Office.Interop.Excel; private static void Excel_FromDataTable(DataTable dt) { // Create an Excel object and add workbook... Excel.ApplicationClass excel = new Excel.ApplicationClass(); Excel.Workbook workbook = excel.Application.Workbooks.Add(true); …
All 7 Replies
kvprajapati
1,826
Posting Genius
Team Colleague
serkan sendur
821
Postaholic
Banned
BarbaStipe
-1
Newbie Poster
DdoubleD
315
Posting Shark
ddanbe
commented:
Nice SPAM counter!
+5
SomakSen
0
Newbie Poster
SomakSen
0
Newbie Poster
deepanbecse
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.