Hi,
i know how to render one datagrid to excel.
i know how to render 2 datagrids to excel in one sheet
these are a piece of cake.
but how do i render 2 datagrids to excel in 2 sheets????
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "inline;filename=FooBar.xls")
Response.Charset = ""
Me.EnableViewState = False
Dim oStringWriter As System.IO.StringWriter = New System.IO.StringWriter
Dim oHtmlTextWriter As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(oStringWriter)
SomeGrid.RenderControl(oHtmlTextWriter)
'what do i do here
'perhaps oHtmlTextWriter("add something nifty here so it'll get 2 sheets?")
SomeOtherGrid.RenderControl(oHtmlTextWriter)
Response.Write(oStringWriter.ToString())
Response.End()