generating excel from ASP output

Results 1 to 3 of 3

Thread: generating excel from ASP output

  1. #1
    Join Date
    Dec 1969

    Default generating excel from ASP output

    Hi all. I am creating an ASP page that performs some calculations in VB and generates a table in HTML that displys the calculations (a sort of "crosstab" on the fly).<BR><BR>I am wondering if there is a way (or, if possible, what is the easiest way) to output the resulting HTML table into Excel. MUST I set up the resulting Excel layout in a SQL/Access table first, or is there a way around this?<BR><BR>Any thoughts would be appreciated<BR><BR>Tim<BR><BR>

  2. #2
    Wasabi Guest

    Default use

    the Excel.Application object in vbScript. dimension an array called arr and put your data into the array.. then <BR><BR> &#039; Launch Excel<BR> dim app<BR> set app = createobject("Excel.Application")<BR> <BR> &#039; Make it visible<BR> app.Visible = true<BR> <BR> &#039; Add a new workbook<BR> dim wb<BR> set wb = app.workbooks.add<BR> &#039;-- Make the array for inserting into excel spreadsheet --&#039;<BR> &#039; Declare a range object to hold our data<BR> dim rng<BR> &#039;-- FFR: input the first value --&#039;<BR> set rng = wb.Activesheet.Range("A1").Resize(put Size IN Here) <BR> &#039; Now assign them all in one shot...<BR> rng.value = arr<BR> &#039; Give the user control of Excel<BR> app.UserControl = true<BR><BR><BR>True.

  3. #3
    Join Date
    Dec 1969

    Default If u just want to show the output in Excel....

    u can do it by adding this line at the top of the existing page<BR>&#060;% response.contenttype = "application/" %&#062;<BR><BR>it is up to the users whether to save it locally or not!

Posting Permissions

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