Giter Site home page Giter Site logo

Comments (4)

tafia avatar tafia commented on June 18, 2024

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.

bbigras avatar bbigras commented on June 18, 2024

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.

tafia avatar tafia commented on June 18, 2024

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&gt;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.

bbigras avatar bbigras commented on June 18, 2024

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)

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.