Upgrade DocumentFormat.OpenXml

Home Forums SpreadsheetML Upgrade DocumentFormat.OpenXml

This topic contains 1 reply, has 2 voices, and was last updated by  Anonymous 4 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7857

    MattV1509
    Participant

    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.

    #9733

    Anonymous

    The Open XML SDK provides tools for working with Office Word, Excel, and PowerPoint documents. It supports scenarios such as:

    – High-performance generation of word-processing documents, spreadsheets, and presentations.
    – Populating content in Word files from an XML data source.
    – Splitting up (shredding) a Word or PowerPoint file into multiple files, and combining multiple Word/PowerPoint files into a single file.
    – Extraction of data from Excel documents.
    – Searching and replacing content in Word/PowerPoint using regular expressions.
    – Updating cached data and embedded spreadsheets for charts in Word/PowerPoint.
    – Document modification, such as removing tracked revisions or removing unacceptable content from documents.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.