12 2013 档案
摘要:首先添加命名空间using System.Net.Mail; /// /// 发送邮件 /// /// /// protected void ForMail(string name, string mail) { try { //string email = txtemail.Text.Trim(); MailAddress MessageFrom = new MailAddress("【发件箱地址】"); //发件人邮箱地址 string MessageTo = mail; //收件人邮箱地址 string MessageSubject = bs.HtmlEncode(w
阅读全文
摘要:1.首先在项目中添加引用2.添加该COM组件后会再文件夹中出现一个Interop.Excel.dll的文件,将之前的Microsoft Excel 11.0 Object Library组件删除,添加新的Interop.Excel.dll的引用。然后添加excel的.net组件3.现在开始贴代码:导出excel文件的样式设计、保存、释放资源都存放在一个Share.cs的类文件中using System.IO;using System.Runtime.InteropServices;using Microsoft.Office.Interop.Excel;#region 设置excel样式并保存
阅读全文
浙公网安备 33010602011771号