roo-rb / roo

Roo provides an interface to spreadsheets of several sorts.
MIT License
2.78k stars 501 forks source link

Roo set method doesn't works for ODS file. anyway to set the value in ODS file? #570

Open SP8890 opened 2 years ago

SP8890 commented 2 years ago

Thanks for filing an issue. Following these instructions will help us solve your problem sooner.

Steps to reproduce

  1. Create an executable test case for this issue (sample test case)
  2. You can share your executable test case as a gist, or simply paste the content into the issue description.
    • You can execute the test case by running ruby the_file.rb in your terminal. If all goes well, you should see your test case failing.
  3. Please provide a stripped down version of the offending spreadsheet.

Issue

Describe the issue

System configuration

Roo version:

Ruby version:

SP8890 commented 2 years ago

Hi please find the details,

  1. require 'roo' xls = Roo::Spreadsheet.open('spreadsheet_test.ods') do sheet = xls.sheet(0) puts sheet.cell(1, 1) sheet.set(3, 3, "test") end

  2. Roo version : 2.8.3

  3. Ruby version : 2.5.3

(Tried with ruby version - Ruby 2.7.1 which isn't works as well)

  1. MIMP : The test is not failing , but it is nothing writing in the cell of the spreadsheet.

I am attaching the spreadsheet please find.

  1. 0> xls.officeversion => "1.2"

    please let me know further. Thanks

patrickkulling commented 1 year ago

Hey @SP8890 roo is not design to write to sheets but purely parse and read the entries.

There are other libraries that do support writing sheets with some support but as far as I understand this is not planned for roo in the near future.