Comments (7)
I would need to see the xlsx in order to debug the issue.
Can you repro the problem on a sanitized xlsx and post it?
from importexcel.
I get this err msg when I try to save when the underlying XLSX still is open (and therefore locked).
from importexcel.
If you have thexlsx
open in Excel, that will fail. Excel has it locked and the Close-ExcelPackage
needs to save the actual file.
from importexcel.
see edit2 below
@dfinke , Doug - how do we troubleshoot errors that prevent save (or $excelPackage.SaveAs($newFilePath)?
I have an xlsx where one of the worksheets is preventing the powershell module to save.
There must be an unsupported element in this specific sheet since I can remove the "problem" sheet in the Excel application and then the module is able to handle the xlsx and save without an issue.
The "problem" sheet does not have any macro or obvious complexity that the module would be unable to handle.
edit: to be clear, my code does not interact with the problem sheet. I have a feeling that any modification to the xlsx requires the entire package to be rebuilt/packaged together and breaks due to a specific element on one of the (problem) sheets.
edit2: i found the issue was caused by a table in the "problem" sheet.
on the "Design" tab of Excel, "Convert to Range". now , ImportExcel is able to handle the xlsx, love GOD.
i did not design the excel file im working with but everything seems normal after convert to range.
<3
thank you for your time.
from importexcel.
Did that resolve your issue. Debugging this sorts of things is just how you did it.
from importexcel.
Did that resolve your issue. Debugging this sorts of things is just how you did it.
yes, "Convert to Range" resolved my issue - but i'm not the original person to open this issue. i happened to have the same error, "Exception calling "Save" with "0" argument(s)" with "InvalidOperationException" - but OP could have an unrelated issue preventing his save.
if i could give feedback:
- amazing module, great work. i respect all your work and response to my message. thank you.
- if "-verbose" is not an available parameter for Close-ExcelPackage , i think it would be helpful to include a list of "known" issues/unsupported xlsx elements in a FAQ page. Maybe my table problem was common knowledge (or unique to my situation), not sure.
thanks again.
from importexcel.
Thanks @jhnkane good poing about an FAQ.
If there was a -Verbose
switch on Close-ExcelPackage
. What details would you like to see?
from importexcel.
Related Issues (20)
- Export-Excel -Style work wrong with multiple sheets HOT 4
- Help with getting a Table without Headers HOT 6
- Faulty Hyperlink to web site using OfficeOpenXml.ExcelHyperLink HOT 2
- Question: How to colorize header columns HOT 3
- Question: How to match a keyword (stored in a variable) in a specific column and color a range? HOT 2
- Formatting OutPut HOT 1
- Created PivotTables that have same SourceWorkSheet and same SourceRange, but manually created slicer cannot see both of them HOT 2
- TableTotalSettings Formulas transformed by Excel HOT 3
- Bug: Spreadsheet with data above StartRow causes column headers to be duplicated HOT 7
- Set-excelrange after export-excel with '-append' results in exception
- Worksheet Argument completer not working
- Conditional Formatting (Date) HOT 3
- Export-Excel -Clearsheet fails
- Powershell issue when opening file in x86 vs x64 HOT 8
- ImportExcel 7.8.7 cannot be imported, fails with loading of EPPlus.dll assembly HOT 9
- broken version pushed to powershellgallery HOT 11
- Feature Request: Apply Sensitivity Label HOT 1
- Import Sheet, including all formatting? HOT 3
- Documentation: many links broken in SUMMARY.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from importexcel.