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
|