广州市德慷软件有限公司
广州市德慷软件有限公司
使用 sheet.CopyTo 会造成,生成xls文件部分报损坏,或者文件无法在受保护的视图中打开该文件。 环境: Vs 2022 C# Excel 2016 通过以下代码,会出现生成的文件,部分损坏,或者文件无法在受保护的视图中打开。但更换一个Excel文件,又可以正常生成,这是什么原因造成? private void DoCopySheet() { string tplFullname = @"template.xls"; System.IO.FileStream tplFileStream = new System.IO.FileStream(tplFullname, System.IO.FileMode.Open, System.IO.FileAccess.Read); IWorkbook workbook = new HSSFWorkbook(tplFileStream);...
If the sheet has button. can not use copy a new sheet. It will raise An unhandled exception of type "System.InvalidOperationException" occurred in EPPlus.dll. The Inner Exception is: Cannot access...