我尝试使用EPPLUS使用现有数据更改excel文件中单元格的值,但它会删除所有内容。我修改过的单元格也没有更新。以下是我的代码:
Dim fileInfo As FileInfo = New FileInfo(newfilename)
Dim p As ExcelPackage = New ExcelPackage(fileInfo)
Dim myWorksheet As ExcelWorksheet = p.Workbook.Worksheets("Sheet1")
myWorksheet.Cells("A1").Value = "Data 1"
p.Save()
上述代码有什么问题?