View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Coneection OLAP Coneection OLAP is offline
external usenet poster
 
Posts: 1
Default Export To Excel From ASPNET

Hi:

Mi Problem is the next, i want export to excel from page ASPX, i can make
all, but mi problem is that only make excel application in the memory, no
display el excel worrbook, the code use is C#

private void Button1_Click(object sender, System.EventArgs e)
{
Microsoft.Office.Interop.Excel.Application oExcel;
Microsoft.Office.Interop.Excel.Workbook oBook;

object oMissing = System.Reflection.Missing.Value;
oExcel = new Microsoft.Office.Interop.Excel.Application();

// Add a Workbook.
oBook = oExcel.Workbooks.Add(oMissing);
oBook.Activate();
oExcel.Visible = true;
oExcel.UserControl = true;
}