Comments (11)
I also have a similar problem now. Did you happen to edit the file with openpyxl
before?
from pylightxl.
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.
I also have a similar problem now. Did you happen to edit the file with
openpyxl
before?
Yes, with openpyxl no problem
from pylightxl.
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.
Is there a way for us to help btw?
from pylightxl.
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.
@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.
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:
- The syntax
#
only available in excel 365 andopenpyxl
works with excel 2010 - 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.
@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.
Really sorry for the late reply, I am also somehow unable to have it working on two of my laptops anymore...
from pylightxl.
@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)
- Cannot Write to newly created blank excel file
- "Worksheet.ssd()" doesn't read all columns
- My xlxs output is converting & to &
- Corrupted excel file when overwritten HOT 3
- Read Failure When Worksheet Missing HOT 1
- Feature request: Read files from urls HOT 1
- Not reading some cell formulas HOT 1
- & replaced by & when writing a URL with parameters in it HOT 1
- Error during date parsing HOT 2
- Formulas in a csv file are parsed incorrectly
- Temporary file creation in current directory can fail. Use standard Python tempfile mechanism.
- OverflowError when parsing date HOT 1
- upload wheel to pypi
- Pylightxl In the help document, missing:
- Handle filenames in the same way for csv and excel
- Handle the encoding in the csv file
- Missing py.typed marker for mypy support
- better add `encoding='utf-8'` in every `with open(some_path, 'w') as f` statements
- Problem with saving bool data.
- Inconsistent handling of non-ASCII chars HOT 1
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 pylightxl.