Rac: Do a search here at Tek-Tips - there are about 3 or 4 threads tackling this issue. Here is an example aspx page that accomplishes this (also a recent threat involved opening up the excel sheet in a new pop up window (about 4 days old today).
<%@ Page Language="VB" Debug="true"%>
<%@Import Namespace = "Microsoft.VisualBasic"%>
<%@Import Namespace = "System"%>
<%@Import Namespace = "System.Web"%>
<%@Import Namespace = "System.Web.UI"%>
<%@Import Namespace = "System.Web.UI.WebControls"%>
<%@Import Namespace = "System.Web.UI.HtmlControls"%>
<%@Import Namespace = "System.Data"%>
<%@Import Namespace = "System.Data.OleDb"%>
<script runat="server">
Private Sub Page_Load(sender As Object, e As EventArgs)
'open database...
Dim cmdSelect As OLEDbCommand
Dim dbconnRec As OleDbConnection = New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0; " & _
"Data Source=" & Server.MapPath(".\fpdb\NewData.mdb;"

)
cmdSelect = New OLEDbCommand("SELECT TimeStamp,SampleDate,pH,WaterTemp,Alkalinity,Hardness,Turb1,Turb2,AwwSiteCode,Weather,Streams,DO1,DO2,Secchi,Comments,CID,SID FROM tblNewChemData", dbconnRec)
dbconnRec.Open()
dgChemRecs.DataSource = cmdSelect.ExecuteReader()
dgChemRecs.DataBind()
lblNo.Text = dgChemRecs.Items.Count.ToString()
dbconnRec.Close()
End Sub
Sub btnSaveExcel_Click (Sender as Object, E As EventArgs)
'Set the content type to Excel...
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Me.EnableViewState = False
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
dgChemRecs.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
End sub
</script>
<HTML>
<HEAD>
<title>New Chem Records on the Server</title>
</HEAD>
<body>
<form id="Form1" runat="server">
<p></p>
Send these Records to the New Chem Excel file: <asp:Button id="btnEx" runat="server" width="100px" Text="Creat Excel File" OnClick="btnSaveExcel_Click"/>
<br><asp:Label id="rec" runat="server" Text="Records: " ForeColor="Blue"/> <asp:Label id="lblNo" runat="server"/>
<asp

ataGrid id="dgChemRecs" AutoGenerateColumns="false" Width="95%" BackColor="LightSteelBlue" BorderColor="Blue" CellPadding=1 CellSpacing=1 Font-Name="Times New Roman" Font-Size="8pt" ForeColor="Black" HeaderStyle-BackColor="Wheat" DataKeyField="AwwSiteCode" runat="server">
<Columns>
<asp:BoundColumn DataField="AwwSiteCode" HeaderText="<pre><br>AwwSiteCode</pre>"/>
<asp:BoundColumn DataField="TimeStamp" HeaderText="<pre><br> Date &<br> Time<br> Posted</pre>"/>
<asp:BoundColumn DataField="SampleDate" HeaderText="<pre><br> Sample Date</pre>" DataFormatString="{0:d}"/>
<asp:BoundColumn DataField="pH" HeaderText="<pre><br> pH </pre> "/>
<asp:BoundColumn DataField="WaterTemp" HeaderText="<pre><br> Water<br> (°C)</pre>"/>
<asp:BoundColumn DataField="Hardness" HeaderText="Hardness" DataFormatString="{0:f2}"/>
<asp:BoundColumn DataField="Alkalinity" HeaderText="Alkalinity" DataFormatString="{0:f2}"/>
<asp:BoundColumn DataField="Turb1" HeaderText="<pre><br> Turb1 </pre>" DataFormatString="{0:f2}"/>
<asp:BoundColumn DataField="Turb2" HeaderText="<pre><br> Turb2 </pre>" DataFormatString="{0:f2}"/>
<asp:BoundColumn DataField="Weather" HeaderText="Weather"/>
<asp:BoundColumn DataField="CID" HeaderText="Monitors"/>
<asp:BoundColumn DataField="DO1" HeaderText="<pre><br> DO1 </pre>" DataFormatString="{0:f2}"/>
<asp:BoundColumn DataField="DO2" HeaderText="<pre><br> DO2 </pre>" DataFormatString="{0:f2}"/>
<asp:BoundColumn DataField="Secchi" HeaderText="Secchi"/>
<asp:BoundColumn DataField="SID" HeaderText="Entered by"/>
<asp:BoundColumn DataField="Comments" HeaderText="<pre><br>Comments</pre>"/>
</Columns>
</asp

ataGrid>
</TR>
</form>
</body>
</HTML>