zitsen / ooxml-rs Goto Github PK
View Code? Open in Web Editor NEWOffice OpenXML reader and writer in Rust
Office OpenXML reader and writer in Rust
Library should not crash, just return an error
ooxml-rs/src/document/spreadsheet/mod.rs
Line 60 in e97dc1c
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /home/rafal/.cargo/registry/src/github.com-1ecc6299db9ec823/ooxml-0.2.5/src/document/spreadsheet/mod.rs:60:71
ooxml-rs/src/document/spreadsheet/mod.rs
Lines 123 to 124 in e97dc1c
thread '<unnamed>' panicked at 'parse worksheet error: XmlDeError(Custom("missing field `c`"))', /home/rafal/.cargo/registry/src/github.com-1ecc6299db9ec823/ooxml-0.2.5/src/document/spreadsheet/mod.rs:124:18
I currently use the crate to parse the docProps/core.xml
. It would be great if the fields would be public so I can change them and write the changes back using a Writer :)
I'm open to implementing this if you're OK with it.
Hi, thanks for this great crate :)
I'm trying to convert an xlsx doc to csv using xlsx2csv
which uses this crate:
> xlsx2csv Report.xlsx
thread 'main' panicked at 'open xlsx file: IoError(Error { kind: InvalidData, message: "stream did not contain valid UTF-8" })', C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\xlsx2csv-0.4.3\src\main.rs:238:69
It's this line which does let xlsx = ooxml::document::SpreadsheetDocument::open(opt.xlsx).expect("open xlsx file");
:
https://github.com/zitsen/xlsx2csv.rs/blob/936878449a7d5e123f16e142bf086926dda7177b/src/main.rs#L238
Would it be possible to add support for non-UTF-8 encodings? (E.g. using encoding_rs_io::DecodeReaderBytes
.)
(The code has this right and I was in case-insensitive search mode; looks like only the README has the typo)
This makes the method more generic. If a BufReader is needed due to internal implementation, I think it's a better idea to create that inside of the function instead of having the user have to create one themselves.
I'm open to implementing this if you're OK with it.
Hey!
I am currently working on a tool that removes metadata from files and was looking for a crate for OOXML files. This one looks really promising! Do you have a development roadmap (through GitHub projects/issues) or something similar? Since I use the library I'd like to contribute back a little bit :)
Edit: The ECMA standard reference in the readme was really useful, as I only new about the ISO standard and those are too expensive haha :D
如果读取openpyxl生成的xlsx文件时会提示找不到xl/sharedStrings.xml ,
查阅资料后发现xl/sharedStrings.xml这个文件不是必须的 关于openpyxl的解答
是否应该考虑这个定义为
pub shared_strings: Option<SharedStringsPart>
ooxml-rs/src/document/spreadsheet/mod.rs
Lines 68 to 73 in c0765fe
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.