发送Excel文件数据,格式为电子邮件正文 [英] Send Excel file data with formatting as email body

查看:424
本文介绍了发送Excel文件数据,格式为电子邮件正文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在电子邮件正文中发送带格式的Excel数据。我想使用C#作为语言,并使用Epplus库来读取excel数据。


有人可以帮忙吗?

解决方案

您好,


您可以使用以下方法从Excel工作表创建HTML表。获取生成的字符串并将其嵌入到您的电子邮件正文中。


如果您需要使用SMTP电子邮件的帮助,请参阅以下页面  http://www.systemnetmail.com/faq/3.1.2.aspx


有关更高级的SMTP编码,请参阅我的TechNet文章


https://social.technet.microsoft.com/wiki/contents/articles/51936.c-working-with-smtp-email-part-2.aspx



I want to send excel data with formatting in an email body. I want to use C# as the language and will use Epplus library to read excel data.

Can anyone please help ?

解决方案

Hello,

You can use the following method to create HTML table from a Excel WorkSheet. Take the resulting string and embed it into your email body.

If you need assistance using SMTP email see the following page http://www.systemnetmail.com/faq/3.1.2.aspx

For more advance SMTP coding see my TechNet article

https://social.technet.microsoft.com/wiki/contents/articles/51936.c-working-with-smtp-email-part-2.aspx


这篇关于发送Excel文件数据,格式为电子邮件正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆