简体   繁体   English

Spreadsheet Light v3.4要求使用OpenXML 2.5,但不建议使用智能标签

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

I'm using C# and Spreadsheet Light latest version 3.4. 我正在使用C#和Spreadsheet Light最新版本3.4。 This versions required OPEN Xml 2.5 (which smart tags are deprecated). 此版本需要OPEN Xml 2.5(不建议使用智能标记)。

I'm trying to create a basic XLS, with the below code: 我正在尝试使用以下代码创建基本的XLS:

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. `问题是版本3.4要求使用不推荐使用smarttag的openxml 2.5,因此会产生以下错误。

{"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. 问题在于,在SpreadSheetLight的官方网站上,没有选项可以下载最新版本3.4.9。 You can only download it through nuget package manager. 您只能通过nuget软件包管理器下载它。 Putting 3.4.9 fixed the problem. 放置3.4.9可解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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