this is an example from MS:
http://support.microsoft.c
this is c#
http://www.eggheadcafe.com
but his class is so small, it converts quickly using
http://www.developerfusion
Imports System.Data
Imports System.IO
Imports System.Xml
Imports System.Xml.Xsl
Namespace ExcelUtil
Public Class WorkbookEngine
Public Shared Function CreateWorkbook(ByVal ds As DataSet) As String
Dim xmlDataDoc As XmlDataDocument = New XmlDataDocument(ds)
Dim xt As XslTransform = New XslTransform
Dim reader As StreamReader = New StreamReader(GetType(Workb
Dim xRdr As XmlTextReader = New XmlTextReader(reader)
xt.Load(xRdr, Nothing, Nothing)
Dim sw As StringWriter = New StringWriter
xt.Transform(xmlDataDoc, Nothing, sw, Nothing)
Return sw.ToString
End Function
End Class
End Namespace
Main Topics
Browse All Topics





by: samtran0331Posted on 2007-02-20 at 13:28:22ID: 18574209
this is about as easy as it gets to export a datagrid to excel: articles.a spx?articl eid=78
http://www.dotnetjohn.com/