Hi I've a report and it has got an option to send it as mail attachment. For this what I've done is provided a MAIL link on the page, on clicking this I'm opening a pop up window and allowing user to enter the Email address to which they want to send the report
and once he clicks on the SEND button mail is sent with attachment and the pop up window vanishes. But the attachment is a excel file with a graph (.png) file inserted in it. So when the user clicks on the MAIL link, I am generating the graph, opening Excel
COM object, inserting the image into it and then creating a file (temporarily) and then sending the mail (deleting the file created) Can anyone please tell me a better solution for this. Since in the current solution, I am using the COM which is leaving the
excel reference on the server and sometimes I'm getting the "The instruction at '0x3006ib44' referenced memory at '0x050c0481'. The memory could not be read. Click ok to terminate. Click cancel to debug" error on the server. Thanks in advance Srinivas
Hi, The problem is not for sending the mail, but to generate the excel sheet and inset a graph image into it effectively. ASP.NET by default has got MAIL class and I'm using the same. But the thing is, when I tried the same appln in VB.Net application it worked
fine and there is no trace of EXCEL after using the MARSHAL class. I need to do the same in web application, where it's not working. Srinivas
Yes, Sorry not to have grasped the problem at once. I think that you are aware as me that using com & .Net fram togheter is not a good thing. Depending on the complexity of the graph you are producing I 'd leave com and excell for production. Why don't build
an user control and show the graph directly on the page? Your customer can save the image and help using other software. I am in the mood to develop in a way that people can have full visibility by only using the browser. Thay in my opinion is the spirit of
the NET.Framework. Before to give up look at the 1.1 version of the framework on a Windows 2003 server Ent. With the last updates. nice developing
None
0 Points
10 Posts
Send excel report as mail attachment
Nov 20, 2003 08:20 PM|Y.Srinivas|LINK
None
0 Points
3 Posts
Re: Send excel report as mail attachment
Nov 22, 2003 12:29 PM|diegoaldo|LINK
None
0 Points
10 Posts
Re: Send excel report as mail attachment
Nov 22, 2003 04:25 PM|Y.Srinivas|LINK
None
0 Points
3 Posts
Re: Send excel report as mail attachment
Nov 23, 2003 02:56 PM|diegoaldo|LINK
Member
193 Points
84 Posts
Re: Send excel report as mail attachment
Aug 11, 2011 01:19 AM|animeshsantoki|LINK
hi Y.Srinivas
here is you compelete solution.
Code is here
In this code you can send any file you have to give your smtp, email and password then it works.
if any query then feel free to ask me. i'll try my best
None
0 Points
1 Post
Re: Send excel report as mail attachment
Aug 28, 2011 10:29 AM|DanKaplan|LINK
Thanks! Your'e a lifesaver.