简体   繁体   中英

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM