The Ruby Spreadsheet

October 28, 2014

spreadsheet in IRB

Filed under: Spreadsheet — Tags: , — zdavatz @ 7:40 am

Spreadsheet can work in IRB. Try this:

 

book = Spreadsheet.open(“foo.xls”) and true

book.worksheets

October 24, 2014

Using Ruby Spreadsheet on Heroku with Dynos

Filed under: 1PX, CPU, Dyno, Heroku — Tags: , , , — zdavatz @ 11:32 am

If you intend to use The Ruby Spreadsheet on Heroku, and your source code is closed source then 0-4 2X dynos at 100% CPU load are considered as one physical CPU (1 PX). In other words, this means that if your Software runs on Heroku, is not OpenSource and uses The Ruby Spreadsheet gem you will have to buy a NON-OpenSource Commercial License that allows you to use The Ruby Spreadsheet together with your closed-source code.

July 10, 2013

Commercial Spreadsheet NON-GPLv3 License Text

Filed under: Commercial Ruby Spreadsheet Licence — Tags: , — zdavatz @ 12:19 pm

Ruby Spreadsheet License Version 0.11

1. The purpose of this license is to allow “Company” the usage of the Ruby Spreadsheet Library by ywesee GmbH up to Version 2.0. The current version is 1.0.0. All versions of the Software can be found at https://github.com/zdavatz/spreadsheet

2. The reason for this license is that “Company” does not want to use Spreadsheet under GPLv3.

3. “Company” is allowed to use the above software on two servers. The Use Case for “Company” is: “Use-Case-Text.”

4. “Company” is allowed to use Spreadsheet as noted under point three.

5. Except otherwise stated in this contract, “Company” is not allowed to resell, reuse or give away any version of above code under any other licence then the GPLv3.

6. “Company” will pay a onetime fee of USD xxxx excl. VAT for the usage of Spreadsheet up to Version 2.0. The fee is due once this contract has been agreed upon by both parties. The invoice willbe sent to “Company” via Email.

7. ywesee GmbH will work towards fixing any bug submitted via https://github.com/zdavatz/spreadsheet/issues . Issues that are estimated to require more than 2 workdays to correct may be subject to a fee, which will be negotiated prior to the work.

8. The court of jurisdiction is Zürich, Switzerland.

Please note: If a bug occurs in Version 1.9999 to Version 2.0 and you or anybody else reports that bug, then we will fix it not matter what. If a bug occurs in Version 2.01 to Version 2.02 then of course we will have to renegotiate the terms of our contract and the price for Version 2.0 up to Version 3.0.We will not “create” a bug in Version pre 2.0 and then ask for money for Version 3.0. Version 2.0 will include many bug and Feature improvements a long way from the current version (if you look at the current Version History you can see our track Record and we will not do a release for “money making reasons”). So to cover our work we need to cover our expenses.

To see the Ruby Spreadsheet Track History, please see:

https://github.com/zdavatz/spreadsheet/blob/master/History.md

To see the Ruby Spreadsheet RoadMap, please see:

https://github.com/zdavatz/spreadsheet/blob/master/README.md

October 20, 2011

Modifying an exiting Workbook with several Worksheets with the Ruby spreadsheet library

Filed under: Workbook, Worksheet — Tags: , , — zdavatz @ 6:22 am

This question has been asked many times on the mailing list:

I have an Excel file (workbook) with many worksheets in it. Now I modify one worksheet but leave the other worksheets untouched. When I write the file and then try to open it with OpenOffice or Microsoft Office the file hangs. What do I have to do?

1. You need to write the modified file to a new file name.

2. If the Workbook contains empty sheets, delete the empty sheets from the source file. There is no point in carrying empty sheets around.

3. If the Workbook contains 1 sheet that you want to modify but you want to leave the other worksheets untouched because they contain data, then read the following post from John Smith (very smart guy).

http://groups.google.com/group/rubyspreadsheet/browse_thread/thread/f5bc157b06b66604

4. If you find a better solution, let me know via the list – and do not forget to post your sample code to github (please do not post it in the mail).

March 23, 2011

Ruby Spreadsheet 0.6.5.3 has been released

Filed under: Uncategorized — Tags: , , — zdavatz @ 3:48 pm

Thanks to Alexandre Bini for this update. See: http://url.ba/ery3

PS: A lot of questions have already been answered here:

http://rubyforge.org/forum/forum.php?set=custom&forum_id=2920&style=nested&max_rows=50&submit=Change+View

February 14, 2011

New Mailinglist for Ruby Spreadsheet

Filed under: Feature, Ruby, Spreadsheet, ywesee — Tags: — zdavatz @ 8:43 am

This is the new mailing list for Ruby Spreadsheet.

http://groups.google.com/group/rubyspreadsheet

Any technical, featural or legal question should go here, or as a comment into this blog. Feel free to document on your own site as well and then just send in your link to the ML. You may also write in Japanese if you like 😉 or prefer, the answer may come in english though. English is the preferred language.

December 7, 2010

Hiding and Grouping of columns and lines now possible with Ruby Spreadsheet

Filed under: New Features, Outline — Tags: , , , , , — zdavatz @ 4:10 pm

If you are using Ruby-Spreadsheet to edit existing Excel Files then we have a new feature for you: Hiding, Unhiding, and Outlining of columns and lines is now possible with Ruby-Spreadsheet 0.6.5.

You can create a new file with outline and hiding rows and columns as
follows:

require ‘spreadsheet’

# create a new book and sheet
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet
5.times {|j| 5.times {|i| sheet[j,i] = (i+1)*10**j}}

# column
sheet.column(2).hidden = true
sheet.column(3).hidden = true
sheet.column(2).outline_level = 1
sheet.column(3).outline_level = 1

# row
sheet.row(2).hidden = true
sheet.row(3).hidden = true
sheet.row(2).outline_level = 1
sheet.row(3).outline_level = 1

# save file
book.write ‘out.xls’

gem and gemspec for ruby spreadsheet 0.6.5 can be found here. Hit the “Blob” link to download the gem.

# This deletes the highest outline level

require ‘spreadsheet’

file = ARGV[0]
book = Spreadsheet.open(file, ‘rb’)
sheet= book.worksheet(0)

26.upto(30) do |i|
sheet.row(i).outline_level = 4
end

book.write “out.xls”

# This hides the rows in the highest level of outline

require ‘spreadsheet’

file = ARGV[0]
book = Spreadsheet.open(file, ‘rb’)
sheet= book.worksheet(0)

26.upto(30) do |i|
sheet.row(i).hidden = true
end

book.write “out.xls”

See the sample file. Sample Nested Outline for Ruby-Spreadsheet 0.6.5.

November 26, 2010

getting ready to add some new features to ruby-spreadsheet

Filed under: New Features — Tags: , , , , — zdavatz @ 8:07 am

We are getting ready to add some new features to ruby spreadsheet: http://dev.ywesee.com/wiki.php/Spreadsheet/Iss

February 23, 2010

Formula support is coming to spreadsheet, we just do not know when

Filed under: Formula Support — Tags: , , , — zdavatz @ 9:18 am

Obviously Formula support is the single most wanted feature for Ruby-Spreadsheet. This will come, we just do not know when. In the meantime we fixed two bugs:

  • Add missing Font-encoding
  • Properly encode fragment mark in URLs

check it out at: http://scm.ywesee.com/?p=spreadsheet/.git;a=summary

February 8, 2010

Exported Formulas displaying #name? and #REF? when opened in Excel

Filed under: Spreadsheet — Tags: , , — zdavatz @ 7:23 am

The Ruby Spreadsheet Gem is not acting as expected with the formula of cell A2 in: http://www.kangarooit.com/test/test_input.xls When copying this formula into another spreadsheet (and writing that spreadsheet to disk using the ruby Spreadsheet API), the resultant spreadsheet (test_output.xls) shows ‘#REF!’ in mac excel and ‘#NAME?’ in openoffice for cell A2 instead of ‘365’ How can this script be modified so that the resultant spreadsheet ‘test_output.xls’ has ‘365’ visible in cell A2 when opened in a spreadsheet program (eg. excel, open office)?? To test this behavior, copy this script into a file called ‘spreadsheet_spec.rb’ & run: > spec spreadsheet_spec.rb

http://pastie.org/809024?theme=blackboard

http://github.com/jacobat/ruby-spreadsheet/issues#issue/2

Older Posts »

Create a free website or blog at WordPress.com.