Install Open XML 2.0

I am trying to use spreadsheetlight to write to an excel file, but apparently spreadsheetlight uses XML 2.0, and I have 2.5. I unistalled version 2.5 and added a 2.0 link to my project, but I still get an error message telling me that I'm using version 2.5. And my question is simple: how do I get a compiler (?) To use version 2.0, not version 2.5?

Regards Axel

+4
source share
2 answers

So the problem is that the nuget Spreadsheetlight package skips the required dependency specification in Nuspec.

Install-Package DocumentFormat.OpenXml -Version 1.0.0


DocumentFormat.OpenXml , Could not load type ‘DocumentFormat.OpenXml.Spreadsheet.SmartTags’ from assembly ‘DocumentFormat.OpenXml, Version=2.5.5631.0

UNinstall-Package DocumentFormat.OpenXml

,

  <dependentAssembly>
    <assemblyIdentity name="DocumentFormat.OpenXml" publicKeyToken="31bf3856ad364e35"... />
    <bindingRedirect oldVersion="0.0.0.0-2.5.5631.0" newVersion="2.5.5631.0" />
  </dependentAssembly>

.

:

Install-Package DocumentFormat.OpenXml -Version 1.0.0

: EricTummers.com

+5

SpreadsheetLight 3.4 Open XML SDK v2.0.

NuGet, .

+1

Source: https://habr.com/ru/post/1535354/


All Articles