Coder Social home page Coder Social logo

I can not read file about pylightxl HOT 11 OPEN

pydpiper avatar pydpiper commented on September 3, 2024
I can not read file

from pylightxl.

Comments (11)

steven-tjong avatar steven-tjong commented on September 3, 2024

I also have a similar problem now. Did you happen to edit the file with openpyxl before?

from pylightxl.

PydPiper avatar PydPiper commented on September 3, 2024

Hey everyone, sorry for the delay on addressing this its finals week. This should be resolved next week. Thank you for your patience

from pylightxl.

Aitor13 avatar Aitor13 commented on September 3, 2024

I also have a similar problem now. Did you happen to edit the file with openpyxl before?

Yes, with openpyxl no problem

from pylightxl.

Aitor13 avatar Aitor13 commented on September 3, 2024

Hey everyone, sorry for the delay on addressing this its finals week. This should be resolved next week. Thank you for your patience

Thank you!

from pylightxl.

steven-tjong avatar steven-tjong commented on September 3, 2024

Is there a way for us to help btw?

from pylightxl.

PydPiper avatar PydPiper commented on September 3, 2024

Is there a way for us to help btw?

yes, of course! If you guys figure out the bug and send in a merge request, those are usually easier and faster for me to incorporate

from pylightxl.

PydPiper avatar PydPiper commented on September 3, 2024

@Aitor13 I was not able to replicate the error. I altered an existing excel file with openpyxl as it appears that is what you have done and added a named range since the trace appears to stop there but the file was able to be read back in to pylightxl. Can you send a simple excel file where this error exists?

from pylightxl.

steven-tjong avatar steven-tjong commented on September 3, 2024

I added a formula that is only available for microsoft excel 365 to encounter that problem btw, formulas like this:

worksheet['C5'].value = '=UNIQUE(B5#)'

which gives me the following error if opened with pylightxl:

Traceback (most recent call last):
  File "/Users/aa/Documents/excel_debug.py", line 13, in main
    db = xl.readxl(f)
  File "/Users/aa/venv/lib/python3.8/site-packages/pylightxl/pylightxl.py", line 119, in readxl
    wb_rels = readxl_get_workbook(fn)
  File "/Users/aa/venv/lib/python3.8/site-packages/pylightxl/pylightxl.py", line 234, in readxl_get_workbook
    sheetId = int(re.sub('[^0-9]', '', rId))
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/re.py", line 210, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

Process finished with exit code 1

More info:

  1. The syntax # only available in excel 365 and openpyxl works with excel 2010
  2. But more importantly, normal excel will also fail to open the file (having formula from 365 but saved as 2010): Normal excel will delete the cell 'C5' instead

Maybe the error is then out of the scope of this library?

from pylightxl.

PydPiper avatar PydPiper commented on September 3, 2024

@steven-tjong hey i took a deeper look at the new office 365 "spill array" which is what the # is in reference to and without getting 365 myself i wouldnt be able to dig further into it. i am not sure what the structure of the xml is for such reference. However we can see if i can dig into it if you send a office 365 file with a simple unique(B5#) used in it.

from pylightxl.

steven-tjong avatar steven-tjong commented on September 3, 2024

Really sorry for the late reply, I am also somehow unable to have it working on two of my laptops anymore...

image

from pylightxl.

PydPiper avatar PydPiper commented on September 3, 2024

@steven-tjong right, thank you for posting. Yes currently pylightxl does not support the new office 365 features such as the one you showed in the figure (spill arrays). I will keep this issue open until pylightxl addressed the new 365 features, but for the mean time i will add a disclaimer/limitation to pylightxl that it does not support new 365 features like spill arrays.

from pylightxl.

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.