Search code examples
c#openxmlspreadsheetlight

Spreadsheet Light v3.4 asks for OpenXML 2.5 but smarttags are deprecated


I'm using C# and Spreadsheet Light latest version 3.4. This versions required OPEN Xml 2.5 (which smart tags are deprecated).

I'm trying to create a basic XLS, with the below code:

SLDocument sl = new SLDocument();
 sl.SetCellValue(1, 1, "SURNAME");
 sl.SaveAs("HelloWorld.xlsx");

` The problem is that version 3.4 asks for openxml 2.5 in which smarttags are deprecated, hence it produces the following error.

{"Could not load type 'DocumentFormat.OpenXml.Spreadsheet.SmartTags' from assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.":"DocumentFormat.OpenXml.Spreadsheet.SmartTags"}

How can i overcome the above problem ?


Solution

  • The problem is that in the official website of SpreadSheetLight, there is no option to download the latest version which is 3.4.9. You can only download it through nuget package manager. Putting 3.4.9 fixed the problem.