Git Product home page Git Product logo

Comments (7)

dfinke avatar dfinke commented on June 7, 2024

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.

TWalijew avatar TWalijew commented on June 7, 2024

I get this err msg when I try to save when the underlying XLSX still is open (and therefore locked).

from importexcel.

dfinke avatar dfinke commented on June 7, 2024

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.

jhnkane avatar jhnkane commented on June 7, 2024

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.

dfinke avatar dfinke commented on June 7, 2024

Did that resolve your issue. Debugging this sorts of things is just how you did it.

from importexcel.

jhnkane avatar jhnkane commented on June 7, 2024

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:

  1. amazing module, great work. i respect all your work and response to my message. thank you.
  2. 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.

dfinke avatar dfinke commented on June 7, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.