/    Sign up×
Community /Pin to ProfileBookmark

Export to Excel Then Send As Mail

Hi,

I need help on sending the form out as an attachment. I’ve done exporting the data to excel format but the problem is I want to send it out as attachment and may need to attach other files from my computer, so i will nid the mail dialogbox to pop up. Can someone pls help me? here is my code:

[code]set rs = Server.CreateObject(“ADODB.Recordset”)
rs.Open “SELECT Order.MatchID, Order.EID, Order.ProductNumber, Order.ProductOption, Order.Description, Order.Quantity_Unit FROM Order, Product WHERE Product.ID=Order.MatchID”, conn

Response.ContentType = “application/vnd.ms-excel”
%>
<table BORDER=”1″ align=”center”>
<tr>
<td bgcolor=#FF6600 align=center><font color=white><b>Reference ID</b></font></td>
<td bgcolor=#FF6600 align=center><font color=white><b>EID</b></font></td>
<td bgcolor=#FF6600 align=center><font color=white><b>Product Number</b></font></td>
<td bgcolor=#FF6600 align=center><font color=white><b>Product Option</b></font></td>
<td bgcolor=#FF6600 align=center><font color=white><b>Description</b></font></td>
<td bgcolor=#FF6600 align=center><font color=white><b>Quantity(Unit)</b></font></td>
</tr>

<%
‘ Move to the first record
rs.movefirst

‘ Start a loop that will end with the last record
do while not rs.eof
%>

<tr>
<td>
<%= rs(“MatchID”) %>
</td>

<td>
<%= rs(“EID”) %>
</td>

<td>
<%= rs(“ProductNumber”) %>
</td>

<td>
<%= rs(“ProductOption”) %>
</td>

<td>
<%= rs(“Description”) %>
</td>

<td>
<%= rs(“Quantity_Unit”) %>
</td>
</tr>

<%
‘ Move to the next record
rs.movenext
‘ Loop back to the do statement
loop %>
[/code]

to post a comment
HTML

0Be the first to comment 😎

×

Success!

Help @cba321 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...