一、打开Excel
(一)方法一:使用Microsoft.Office.Interop.Excel.dll操作
首先,需要引用一个dll
1 using Excel = Microsoft.Office.Interop.Excel;
然后直接执行如下代码即可:
1 string excelName = "";//你的excel文件的位置 2 string sheetName = "";//你的sheet的名字 3 object missing =
首先,需要引用一个dll
1 using Excel = Microsoft.Office.Interop.Excel;
然后直接执行如下代码即可:
1 string excelName = "";//你的excel文件的位置 2 string sheetName = "";//你的sheet的名字 3 object missing =