ASP.NET AAND WRITE EXCEL
-
How can we write an excel file by using asp.net it have 7 columns.. Help me please
Sarith...
-
How can we write an excel file by using asp.net it have 7 columns.. Help me please
Sarith...
use StreamWriter and just save your file a excel file dim dtData as new DataTable dtData.Columns.Add("Column1") dtData.Columns.Add("Column2") dtData.Columns.Add("Column3") dtData.Columns.Add("Column4") dtData.Columns.Add("Column5") dtData.Columns.Add("Column6") dtData.Columns.Add("Column7") Dim fInfo As FileInfo fInfo = New FileInfo("C:\test.xls") Dim sw as System.IO.StreamWriter("C:\test.xls") Dim sepator as string = "\t" Dim intColumnCount as integer = dtData.Columns.Count for i as integer = 0 to intColumnCount -1 sw.write(dtData.Columns(i).ColumnName) if i < intCount-1 then sw.write(sepator) end if next sw.Close() i hope this helps Motivation alone is not enough, if you have an idiot and you motivate him/her, you now have a motivated idiot