Comments (7)
Nice debugging work. I've added a fix to the shared strings serialization code that should take care of this for you. I'm currently refactoring much of the serialization so I don't want to spend too much time on making this more performant (specifically removing duplicates after loading the workbook).
from xlnt.
Perfect, many thanks! Performance isn't a problem for me at the moment so no complaints there.
from xlnt.
From the ISO/IEC 29500 18.4.9 sst(Shared String Table)
"A string is unique even if it is a copy of another string, but has different formatting applied at the character level."
Character level formatting will break the string into multiple text runs (multiple "t" child). The current code only picks up the first text run. More over, since it ignores all the character level formatting, unique "si" may still end up the same string value.
from xlnt.
Thanks Wei. I should have checked the standard. I'll be pushing some big updates in the next week so I'll try to implement this more correctly in that release.
from xlnt.
Thanks! Great work!
from xlnt.
FYI, unrelated to @wei-sketchup's issue, I have worked out the cause of the duplicate shared strings in the #42 test case. It turns out that Excel only does string deduplication when you enter them by hand. When you copy and paste a large block of data (e.g. from a .csv file) then Excel does not perform deduplication, I guess for performance reasons. This is why you end up with duplicate shared strings in that case where you really shouldn't as they are truly identical.
from xlnt.
I appreciate the follow-up Adam. I was debating asking you how I could reproduce this issue. I have a lot to go on now!
from xlnt.
Related Issues (20)
- When outputting file paths, emojis will not be displayed if they are included in the path, here are my thoughts. HOT 2
- Loading file fails with error: attribute 'localSheetId' expected HOT 4
- Parse error!(xlnt::exception : bad cell coordinates: (#REF!))
- This is really a good library for xlsx, but the document may need improved?
- number_serialiser::deserialise returns wrong result due to buffer not being null terminated
- Unexpected attribute 'ca' when working with formular in xlsx file.
- Is it possible to write a whole record i.e std::vector<std::string> into the xlnt::worksheet instead of writing cell by cell?
- Throw "counts don`t match" exception
- How do I insert a picture as embedded in a cell ? HOT 1
- When string tables entries exceed 1000, a ',' is being inserted in the string table number, resulting in errors opening file HOT 1
- C++23 aligned storage deprecation warning
- Reference counting issues with xlnt::format_impl
- Do Excel files not support Chinese path? HOT 1
- Fresh release HOT 2
- Errors when try to use in Windows
- Crash on Release HOT 1
- Cloning project failed HOT 1
- Read xls file?
- password
- error in Add Password: wb.save("lots_of_properties.xlsx","password");
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 xlnt.