Workbook.Save(saveSettings) throw exception Value cannot be null. (Parameter 'value')

Syncfusion.EJ2.Spreadsheet.AspNet.Core 19.4.0.54

View.cshtml

@(Html.EJS().Spreadsheet("sheet") .OpenUrl("OpenExcel") .SaveUrl("SaveExcel") .Render())

Controller 

#region 

Excel public IActionResult Excel () { return View(); } 

 public IActionResult OpenExcel(IFormCollection openRequest) { 

 OpenRequest open = new OpenRequest(); 

 if (openRequest.Files.Count != 0) 

 { 

 open.File = openRequest.Files[0]; 

 } 

 open.Password = openRequest["Password"]; 

 if (openRequest["SheetIndex"].Count != 0) 

 { 

 open.SheetIndex = int.Parse(openRequest["SheetIndex"]); 

 } 

 open.SheetPassword = openRequest["SheetPassword"]; 

 return Content(Workbook.Open(open));

 } 

 public IActionResult SaveExcel(SaveSettings saveSettings) 

 { 

 return Workbook.Save(saveSettings); 

 } 

 #endregion


3 Replies 1 reply marked as answer

AC angus chao March 2, 2022 01:05 PM UTC

Can open and edit, when save

Syncfusion.EJ2.Spreadsheet.AspNet.Core 19.4.0.54

Syncfusion.EJ2.AspNet.Core 19.4.0.54



AC angus chao March 2, 2022 06:47 PM UTC

Sorry, finally found the problem. I was updated  19.4.0.54 nuget but not js file. After using CDN, everything fine.



Marked as answer

SP Sangeetha Priya Murugan Syncfusion Team March 8, 2022 09:26 AM UTC

Hi Angus, 
 
We are happy to hear that your requirement has been achieved. Kindly get back to us if you need any further assistance. 
 
Regards, 
Sangeetha M 


Loader.
Up arrow icon