64kramsystem / spreadbase Goto Github PK
View Code? Open in Web Editor NEWRuby library for accessing (R/W) OpenOffice/LibreOffice spreadsheets (ods)... because Excel IS a database ๐
License: GNU General Public License v3.0
Ruby library for accessing (R/W) OpenOffice/LibreOffice spreadsheets (ods)... because Excel IS a database ๐
License: GNU General Public License v3.0
Hi @saveriomiroddi ,
I tried to load a existing ODS file by using your gem but I got [FATAL] failed to allocate memory
error.
I attached ODS file which I use and ruby program for reproducing.
Invoke the attached program then you will see the same error like below.
My environment:
Hi @64kramsystem ,
Cannot get any lines except for the first line from a cell having multi lines.
How to reproduce:
require 'spreadbase'
doc = SpreadBase::Document.new('test.ods')
table = doc.tables[0].data
p table[4][4]
You can execute the above code then you will get the result below.
For this case, I expect the table[4][4]
to be "hoge\nhoge"
but the actual value is "hoge"
.
See:
WARNING: open-ended dependency on rubyzip (>= 1.3.0) is not recommended
if rubyzip is semantically versioned, use:
add_runtime_dependency 'rubyzip', '~> 1.3', '>= 1.3.0'
The README Ruby reference is obsolete, and must be updated:
The gem has been tested on Ruby 1.9.3-p125, on Linux and Mac OS X.
Hi, I use your library to create an ods file, but I don't know how do I create this column with one cell like this:
+-----+------+
|a|
+-----+-------+
|a1 |a2 |
+-----+-------+
Thanks in advance!
Regards,Herman
Builds are failing, due to timezone issues, which don't happen locally.
Sample:
3) SpreadBase::Table return the data as string (:to_s)
Failure/Error: @sample_table.to_s.should == expected_string
expected: "+------------+---------------------------+---------------------------+\n| 1 | 1.1 | 1.33 |\n| 2012-04-10 | 2012-04-11 23:33:42 +0000 | 2012-04-11 23:33:42 +0200 |\n| true | a | NIL |\n+------------+---------------------------+---------------------------+\n"
got: "+------------+---------------------------+---------------------------+\n| 1 | 1.1 | 1.33 |\n| 2012-04-10 | 2012-04-11 23:33:42 +0000 | 2012-04-11 23:33:42 +0000 |\n| true | a | NIL |\n+------------+---------------------------+---------------------------+\n" (using ==)
Diff:
@@ -1,6 +1,6 @@
+------------+---------------------------+---------------------------+
| 1 | 1.1 | 1.33 |
-| 2012-04-10 | 2012-04-11 23:33:42 +0000 | 2012-04-11 23:33:42 +0200 |
+| 2012-04-10 | 2012-04-11 23:33:42 +0000 | 2012-04-11 23:33:42 +0000 |
| true | a | NIL |
+------------+---------------------------+---------------------------+
# ./spec/elements/table_spec.rb:326:in `block (2 levels) in <top (required)>'
I've been getting these warnings lately on every instance creation. I guess we could remove the entire constant out of the module.
/home/matt/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spreadbase-0.1.3/lib/spreadbase/helpers/helpers.rb:34: warning: constant ::Fixnum is deprecated
/home/matt/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/spreadbase-0.1.3/lib/spreadbase/codecs/open_document_12_modules/encoding.rb:178: warning: constant ::Fixnum is deprecated
Support for Ruby 1.8 adds some cruft; remove it.
Hi @64kramsystem ,
I got the warning below when using the spreadbase gem with Ruby 3.3.
/opt/rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/spreadbase-0.4.0/lib/spreadbase/codecs/open_document_12_modules/encoding.rb:3: warning: bigdecimal was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add bigdecimal to your Gemfile or gemspec. Also contact author of spreadbase-0.4.0 to add bigdecimal into its gemspec.
To fix this warning, we need to add the bigdecimal gem to the gemspec. However there is version confliction between spreadbase gem and bigdecimal gem.
Line 11 in 02b760a
rexml has already been a bundled gem from Ruby 3.0.
https://stdgems.org/rexml/#as-bundled-gem
Therefore we should add rexml to gemspec.
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.