The server doesn't need Excel...
Here's a method that sends a excel application type stream, converting a
datagrid object into a excel like table...
public static void ExportToXls(DataGrid dgExport, HttpResponse
response)
{
response.Clear();
response.Buffer = true;
response.Charset = "";
response.ContentType = "application/vnd.ms-excel";
System.IO.StringWriter stringWrite = new
System.IO.StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
ClearControls(dgExport);
dgExport.GridLines = GridLines.None;
dgExport.HeaderStyle.Font.Bold = true;
dgExport.AlternatingItemStyle.BackColor =
System.Drawing.Color.WhiteSmoke;
dgExport.HeaderStyle.ForeColor =
System.Drawing.Color.DarkBlue;
dgExport.HeaderStyle.BackColor =
System.Drawing.Color.LightGray;
dgExport.RenderControl(htmlWrite);
response.Write(stringWrite.ToString());
response.End();
}
"Terry" <te***@xxx.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I am building an ASP.net application which will generate a formatted Excel
report.
Is there a way I can using the Excel on the client pc?
Do I have to do a full install of Excel on the server or just add the
needed
dll's to my ASP.net project.
Terry