We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to copy excel worksheet to email body

I have an Excel workbook which contains 2 worksheets, one is hidden and contains data grid, and another contains some texts (titles, descriptions) and a few charts which data source is from the hidden worksheet.


I want to export the sheet that has charts into outlook email, how can I achieve that?

I tried to save the excel into a memory stream (in Html format) and then extract the html string and set it to the HtmlBody of Aspose.Email.MailMessage but it resulted in “This page uses frames, but your browser doesn’t support them.” in the mail body.

I also tried to save it in memory stream with MHtml format and load it by MailMessage.Load() method , but it resulted in chart in image files in attachments and also some other unknown files which “cannot be previewed”.

Is there a way to export ole objects from Excel worksheet to email? Just like press Ctrl +A in a worksheet and then copy it and paste the data in email? In that way, we still can edit the charts in email, like change the size of chart, add chart elements, change chart styles, chart filters, etc.

Hi,


Thank you for posting your inquiry.

At present, the best output is when Excel worksheet with plain data is exported to HTML and assigned to the Html body of the email message. The API doesn’t process and embed OLE objects from Excel worksheet to email body as it doesn’t lie in the functional domain of Aspose.Email API. Please let us know if we can be of any additional help to you with reference to your requests related to API.

okay, thanks for the reply.

You are welcome.