Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find type [OfficeOpenXml.ExcelPackage]: verify that the assembly containing this type is loaded. #57

Open
johnpeck09 opened this issue Jul 4, 2017 · 2 comments

Comments

@johnpeck09
Copy link

Greetings,

We receive the following error when we use the Import-XLXS module to try to combine 2 excel files in PowerShell 5.

    PS C:\windows\system32> $L = Import-XLSX C:\Users\Public\KBs\SecurityUpdates.xlsx
    Import-XLSX : Failed to open 'C:\Users\Public\KBs\SecurityUpdates.xlsx':
    Cannot find type [OfficeOpenXml.ExcelPackage]: verify that the assembly containing this type is 
    loaded.
    At line:1 char:6
    + $L = Import-XLSX C:\Users\Public\KBs\SecurityUpdates.xlsx
   +      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : NotSpecified: (  [Write-Error], WriteErrorException
   + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Import-XLSX  

I look forward to hearing back from you soon concerning this issue.

@RamblingCookieMonster
Copy link
Owner

Hi John!

A few questions:

  • How did you install PSExcel? Install-Module PSExcel? Download the zip from GitHub and extract somewhere? If the latter, you'll need to unblock the zip (or the files in it, particularly the dll in /lib)
  • Where is the module installed? Network shares won't be an option in most cases, given the dll
  • How did you import the module? Guessing this isn't the case, but you can't selectively use Import-XLSX.ps1, the module itself needs to load

Cheers!

@johnpeck09
Copy link
Author

Good news, we got the module working; however, we are still having the following issue. When we import the xlsx one sheet has embedded URLs and the other is for a join-object key. when we do a "join-object" and export-xlsx, why doesn't it keep the URLs?

I appreciate the help.

  • John

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants