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

Saving Excel Package #1649

Open
efigueredo opened this issue Oct 23, 2024 · 9 comments
Open

Saving Excel Package #1649

efigueredo opened this issue Oct 23, 2024 · 9 comments

Comments

@efigueredo
Copy link

I just updated to the latest version of ImportExcel
My script was previously able to save successfully and as of the new update, saving fails.
The lack of detail makes it very hard to troubleshoot what the cause might be.

====
Exception calling "Save" with "0" argument(s): "Error saving file

ImportExcel\7.8.10\Public\Close-ExcelPackage.ps1:29 char:20

  •         else { $ExcelPackage.Save() }
    
  •                ~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : InvalidOperationException
@dfinke
Copy link
Owner

dfinke commented Oct 23, 2024

no idea. if you roll back to the other version, does it work?

@efigueredo
Copy link
Author

efigueredo commented Oct 23, 2024 via email

@efigueredo
Copy link
Author

efigueredo commented Oct 23, 2024 via email

@dfinke
Copy link
Owner

dfinke commented Oct 23, 2024

if possible, send me the xlsx. may be possible to import that error message,

@efigueredo
Copy link
Author

efigueredo commented Oct 23, 2024 via email

@efigueredo
Copy link
Author

efigueredo commented Nov 4, 2024 via email

@dfinke
Copy link
Owner

dfinke commented Nov 5, 2024

can you create an xlsx with 2 sheets, one that is good an the other with the bad formula?

@efigueredo
Copy link
Author

efigueredo commented Nov 12, 2024 via email

@dfinke
Copy link
Owner

dfinke commented Nov 14, 2024

Thanks for the question @efigueredo.

Is that a pre-existing workbook?

On the Export-Excel there is a switch AutoNameRange that creates names.

I believe I do it at the workbook level.

The $xlValueCell.Formula = “=COUNTA(tblClusters[Cluster])” - iirc there may be addtional syntax to make that work, check the Examples folder in the repo.

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

3 participants
@dfinke @efigueredo and others