Hi All,
I have a website that uses OpenXml (version 2.5.5631.0) to build spreadsheets. Recently this has been failing on some (not all) of our servers with the exception “Store must be open for this operation”.
Upgrading the DocumentFormat.OpenXml to the latest stable version (or 2.8.1) introduces errors into my code that I am struggling to understand.
Severity Code Description Project File Line Suppression State
Error CS0012 The type ‘OpenXmlPart’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’. GCMS.Templates C:\GIT\ReporterSuite\vip\GCMS.Templates\Excel\SpreadsheetWriter.cs 123 Active
Here is the code
var workbookPart = sDoc.WorkbookPart;
var wXDoc = workbookPart.GetXDocument();
The error message is telling me to use the version of DocumentFormat that I am trying to upgrade.
Can anyone on this forum offer advice, all gratefully received.
Thanks,
Matthew.