Menu

#11 Export to Excel fails

v4.0 Beta
open
Vivek K
9
2021-08-26
2017-05-08
James W
No

Export to excel fails. See screenshot.

1 Attachments

Discussion

  • Andi Lauren

    Andi Lauren - 2017-07-28

    Hi, I am having the same problem exporting to Excel. Is there a solution?

     
  • Johnathan Schmidt

    The packaged Open XML DLL v2.5 is not compatible, expected is DLL version 2.0.
    The solution is to copy the correct Open XML DLL to the project directory. To do so:

    1. Download MSI installer "OpenXMLSDKv2.msi" from Microsoft:
      https://www.microsoft.com/en-us/download/details.aspx?id=5124
    2. No need to install the SDK. Extract the msi archive with the following command (absolute paths):
      msiexec /a d:\somedir\someinstaller.msi /qb TARGETDIR=c:\temp
    3. Copy file "DocumentFormat.OpenXml.dll" from extraction "c:\temp\Global Assembly Cache Folder\DocumentFormat.OpenXml\2.0.5022.0_31BF3856AD364E35" to project directory
    4. Done.
     
  • Bill Miller

    Bill Miller - 2018-08-27

    Thank you! I performed the steps, and it resolved the issue in the screenshot.

    Here is the "loose" text of the error message (in case the image is not yet machine-readable/OCR)

    Failed to create excel from the datasetCould not load file or assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicToken='31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.