Git Product home page Git Product logo

Comments (9)

gorn avatar gorn commented on August 10, 2024

It seems to me that f5a4e01 only resolves this partially, what about many rows which have two empty cellspans.

from rspreadsheet.

jglauche avatar jglauche commented on August 10, 2024

In my tests, I've seen some rows to have unusual size limits, gonna dig into that. I also found yet another issue that content with .fods files is not being parsed correctly, not sure if that is related:

 = Rspreadsheet.new("spec/testfile4.fods"); @sheet = r.worksheet(1)
 => #<Rspreadsheet::Worksheet:0x0000555e1aae3210 @itemcache={}, @xmlnode=#<LibXML::XML::Node:0x0000555e1aae3288>> 
2.6.3 :008 > @sheet.xmlsubnodes.map{|x| x.content}
 => ["\n     \n      mew\n     \n     \n      1,00 €\n     \n     \n    ", "\n     \n      mew\n     \n     \n     \n      10\n     \n     \n    ", "\n     \n      mew\n     \n     \n    ", "\n     \n      mew\n     \n     \n    ", "\n     \n      mewmew\n     \n     \n    ", "\n     \n      mew\n     \n     \n    ", "\n     \n      meow\n     \n     \n    ", "\n     \n      meow\n     \n     \n    ", "\n     \n      meow\n     \n     \n    ", "\n     \n    ", "\n     \n     \n      1,00 €\n     \n     \n    ", "\n     \n    ", "\n     \n      mew\n     \n     \n    ", "\n     \n     \n     \n    ", "\n     \n     \n      1,00 €\n     \n     \n    ", "\n     \n    ", "\n     \n     \n    ", "\n     \n    ", "\n     \n    "]

I don't know how to distinguish between manually created but empty cellspans vs. empty styles being automatically applied to large row/column number. Do you have a suggestions or a test case I could work with?

from rspreadsheet.

jglauche avatar jglauche commented on August 10, 2024

I added a bunch of tests to my upstream. .fods file and gnumeric .ods file tests still fail.

It seems like merged cells are counted as individual cells:
[cell1] [merged cell 2+3] [cell4]
would currently behave in returning row.size of 4. I could use some input on how it's supposed to work.

from rspreadsheet.

jglauche avatar jglauche commented on August 10, 2024

I fixed the issues with flat ods and gnumeric files by checking against content.strip.empty?

from rspreadsheet.

gorn avatar gorn commented on August 10, 2024

The way it is supposed to work is that if row=[cell1] [merged cell 2+3] [cell4] than row.size should be 4. If is more row.width than "number of cells". It is a good point however, it just did not come to my mind, that there can be different approach to this.

from rspreadsheet.

jglauche avatar jglauche commented on August 10, 2024

If we go by different ways to approach this, we should make it consistent for merged rows and cells
My question would be how we would name the different functions that act as between merged and unmerged content and which mode would be the default?

from rspreadsheet.

gorn avatar gorn commented on August 10, 2024

@jglauche Surely the behaviour must be consistent. Is the behaviour different for rows? (Sorry did not have chance to pull your code and hand test it, from diffs it looks good however)

from rspreadsheet.

jglauche avatar jglauche commented on August 10, 2024

@gorn no, my current implementation is consistently showing merged cells in any direction as individual items.

from rspreadsheet.

gorn avatar gorn commented on August 10, 2024

Accepting the oull request

from rspreadsheet.

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.