Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2005, 03:56 PM
Registered User
 
Join Date: Jun 2005
Location: Pittsburgh, PA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel on the fly

Hello
I have a question. Can I create excel sheets on the fly from an http post and have it go directly into an attachment and sent to recipients using cdonts?

if I response write the content I get a prompt and the file will be available to be saved. If I don't, then the xls is blank.

basically the process is:
\receive http post data
\\process into excel file on the fly
\\\choose email recipients
\\\\send the excel file as attachment


Here is somewhat of what I have now
*************************************

    Dim csvinput
    Response.ContentType= "application/vnd.ms-excel"'
        Response.AddHeader "Content-disposition","attachment;filename=Report.xls"
        csvinput = request.form("test")
        response.write csvinput
        response.end



    sch = "http://schemas.microsoft.com/cdo/configuration/"

    Set cdoConfig = CreateObject("CDO.Configuration")



    With cdoConfig.Fields
        .Item(sch & "sendusing") = 2 ' cdoSendUsingPort
        .Item(sch & "smtpserver") = "newdbtmail"
        .update
    End With

    Set cdoMessage = CreateObject("CDO.Message")

    With cdoMessage
        Set .Configuration = cdoConfig
        .From = ""
        .To = ""
        '.To = rsMail("dvEmail")'"email address of the person who will receive the emails"
        '.CC = ""
        '.BCC ="If Ever"
        .Subject = "support xls"
        .HTMLBody="whats up dawg"
       ' .AddAttachment "Report.xls"'Server.MapPath Response.AddHeader "Content-Disposition","attachment;filename=Report.xls"
       ' .AddAttachment Server.MapPath("application/upload/excelsample.xls")
      .AddAttachment
      .Send
    End With
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    response.Redirect "SEND.ASP"
        ' End the Mailer
*************************************
If anybody has any insight, it would be greatly appreciated



if they cant take a "fark" joke em -=tj
 
Old September 23rd, 2005, 06:18 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hiii tjse7en!!

1>u r using response.end after response.write csvinput

  which stop exection of any other script followed by it

 http://www.developerfusion.co.uk/forums/topic-24907

Hope this will help you

Cheers :)

vinod




Similar Threads
Thread Thread Starter Forum Replies Last Post
Generating ASPX on the fly sandeepbhutani304 ASP.NET 2.0 Basics 0 September 16th, 2008 12:49 AM
Creating tables on the fly Keith Smith Access VBA 1 January 15th, 2008 10:49 AM
creating textfield on the fly Acod Classic ASP Professional 1 April 25th, 2007 09:22 AM
Crystal Report on the Fly with C# spaceodyssey Crystal Reports 0 July 13th, 2004 05:01 AM
display data on the Fly worshiploud Classic ASP Basics 15 June 25th, 2003 07:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.