By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,213 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,213 IT Pros & Developers. It's quick & easy.

Datagrid 'colspan' export to Excel problem

P: n/a

I have an 'export to excel' button on my Datagrid. All works well
except that on my Datagrid, I have sub total rows. The subtotal rows
use colspan so that the subtotals are given above certain columns

When I export to excel, I do not have the colspan. As a result, the
subtotals appear over the wrong columns in Excel.
This is how the export looks -

<td >Overall

This is how the datagrid looks -

<td colspan="5">Overall Total</td><td
align="Center">-2024.430</td><td align="Center">0</td><td>2024.430</td>

Here is the export function -

Public Sub ExcelExport()
Response.ContentType = "application/"
' Remove the charset from the Content-Type header.
Response.Charset = ""
' Turn off the view state.
Me.EnableViewState = False
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
' Get the HTML for the control.
' Write the HTML back to the browser.
' End the response.
End Sub

How do i get around this.

Thanks for any help.

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.