Creating Excel Report from ASP page (Not using Off

Results 1 to 2 of 2

Thread: Creating Excel Report from ASP page (Not using Off

  1. #1
    rifat Guest

    Default Creating Excel Report from ASP page (Not using Off

    Is there any way of creating an excel report from an ASP page? I know it can be done by using MS Office Web Components but it requiqres Office 2000 which I don&#039;t have.<BR><BR>What I am after is, after displaying the information in a table format to the user, he/she clicks on a button, and an excel session starts. All the info on the table appears on the excel report as well.<BR><BR>I hope I am clear enough. If not please let me know.<BR><BR>Many thanks<BR><BR>rifat

  2. #2
    rifat Guest

    Default I have found the answer, thanks anyway

    What you need to do is <BR>1- Display your page as usual(I assume you create a recordset and display the content of it - Usual stuff).<BR><BR>2- Have a button (e.g. "Show Excel") on this page.<BR><BR>3- When you click on the button, call a Sub <BR> e.g. Display_ExcelReport<BR><BR>4- In this Sub Create the recordset again<BR>5- After creating the recordset type<BR><BR> Response.ContentType="application/" <BR><BR>6- Go through the recordset and display the contents of it<BR>7- You will see it will display the records on Excel.<BR><BR> What Response.ContentType="application/" does is to tell the browser to display the following info on Excel.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts