0

我已经有了 Excel 文件的路径,但是每当我调用 save 方法时,程序都会将新内容写入 UTC.xlsx 文件。

string pathString = "C:\Users\ADMIN-PC\Documents\SUMMER 2018\PRN192\CreateFile\SubFolder\UTC.xlsx"; ef.Save(pathString);

4

1 回答 1

0
var path = @"C:\Users\ADMIN-PC\Documents\SUMMER 2018\PRN192\CreateFile\SubFolder\UTC.xlsx";

// Load the workbook:
var workbook = ExcelFile.Load(path);

// Manipulate the workbook … 
// … and save it over the original
workbook.Save(path);
于 2019-07-10T13:22:46.390 回答