using EXCELAPP = Microsoft.Office.Interop.Excel;
<span style="white-space:pre"> </span>#region Modify Existing Excel File
//file name
string filename = @"C:/xxxx.xlsx";
EXCELAPP.Application app = new EXCELAPP.Application();
app.DisplayAlerts = false;
app.Visible = false;
//EXCELAPP.Workbook workbook1 = app.Workbooks.Open(filename, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
// Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
EXCELAPP.Workbook workbook1 = app.Workbooks.Open(filename, 0, false, 5, "", "", false, EXCELAPP.XlPlatform.xlWindows, "", true,
false, 0, true, false, false);
Interop 修改已存在的EXCEL 新增一列
最新推荐文章于 2023-11-27 15:00:34 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)