I have an excel template with an .xlsx extension and I have a graphic in it. I want to copy this template and save it with a new name, but the save () method throws a SystemNullException error. I share the code and template below, please help
Foy.zip (Template) (15.8 KB)
string InputPath = Server.MapPath("~/Taslaklar/Foy.xlsx");
Workbook excelWorkbook0 = new Workbook(InputPath);
excelWorkbook0.Worksheets.Add(“Foy1”);
excelWorkbook0.Worksheets[“Foy1”].Copy(excelWorkbook0.Worksheets[“Foy”]);
excelWorkbook0.Save(Server.MapPath("~/Taslaklar/Foy2.xlsx"));