Comments (4)
Well unfortunately formula are not implemented yet (the error is not really helping either, I'll change this).
It is not a small task and I'm not sure I can do this in a short time.
Do you want to try implementing a basic support? At least basic functions like:
- arithmetic operations,
- concat
- find
- vlookup/hlookup
- string functions (left, right, mid)
from calamine.
I think there's a way to get the current value without having to interpret the formula. I'm able to read it with 2bbcb08 but I'm not sure it's the best way.
Maybe the better way would be to ignore when e.name() == b"f"
and add a case in https://github.com/tafia/office/blob/c0cc6e7f94d3a1c7bf637c6f2f72e0a771b7e4d9/src/lib.rs#L325 when k == b"r"
(I think) but I'm not sure what the attributes' values means on this cell (there's 3 of them, not 1 like https://github.com/tafia/office/blob/c0cc6e7f94d3a1c7bf637c6f2f72e0a771b7e4d9/src/lib.rs#L328).
from calamine.
I agree with you skipping the <f>
node might be better for now.
Here is what I have for =CONCATENATE("a", "b")
:
<c r="A3" t="str">
<f>CONCATENATE("a","b")</f>
<v>ab</v>
</c>
And for a regular =A1<A2
formula
<c r="A4" t="b">
<f>A1>A2</f>
<v>0</v>
</c>
I am not an expert on excel either, I assume (I'll check that properly later)
t=str
means regular string (that cannot be shared because it is a result of a formula)t=b
means boolean
Updating the code accordingly in #7.
from calamine.
oh it's b"str". I'm an idiot. For some reason I though [115, 116, 114] meant multiple attributes. Didn't realize it spelled "str" haha.
from calamine.
Related Issues (20)
- How to open_workbook from excel xml? HOT 1
- Worksheet Reading 3-4x Slower Than Baseline Of Underlying `quick_xml` Library HOT 4
- [panic] Tables must be loaded before they are referenced HOT 2
- Text is truncated for xls document with BIFF5
- Use atoi_simd for SIMD accelerated &[u8] to integer conversion
- Excel version supported HOT 1
- Pictures information
- Please add `worksheet_range_ref` for `calamine::Xls` and `calamine::Ods` HOT 2
- v0.23.0 worksheet_formula not reading majority of formulas HOT 2
- Password protected XLS is not detected
- Merging cells is not supported HOT 1
- Formula detection not working for dragged formulas HOT 4
- Feature Request: please add method `RangeDeserializerBuilder::with_headers_struct` HOT 3
- Is it possible to directly manipulate Excel and invoke the local printer to print an XLSX file? HOT 1
- Feature request: format-aware version of `as_datetime()` HOT 1
- Isssue with load_tables and table_names functions HOT 5
- Feature Request: Reading (and writing) formatting HOT 2
- Feature: Defined names from workbook returned as Range
- feature request: na_filter/na_values equivalent HOT 1
- Not all table rows are included in data()
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 calamine.