摘要:
1、首先要确保使用的机器安装Office工具。然后在工程中添加如下引用。usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Data.SqlClient;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingMicrosoft.Office.Interop;usingMicrosoft.Office.Interop.Excel;usingSystem.Reflecti 阅读全文