1、导入类型库
项目(或网站)菜单 à 添加引用 à COM à Microsoft Excel 11.0 Object Library à 确定
2、清理
wb.Close(null, null, null);
app.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(wb);
System.Runtime.InteropServices.Marshal.ReleaseComObject(app);
app = null;
wb = null;
System.GC.Collect();