Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.