using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Default7 : System.Web.UI.Page
{
 protected void Page_Load(object sender, EventArgs e)
 {
 
 }
 protected void Button1_Click(object sender, EventArgs e)
 {
 string picPath1 = FileUpload1.PostedFile.FileName;
 string picPath2 = FileUpload2.PostedFile.FileName;
 InsertPictureToExcel ipt = new InsertPictureToExcel();
 ipt.Open();
 ipt.InsertPicture("B2", picPath1);
 ipt.InsertPicture("B8", picPath2, 120, 80);
 ipt.SaveFile(@"D:\ExcelTest.xls");
 ipt.Dispose();
 }
}
来源:cnblogs

