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

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.

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

March 4, 2009

Not-For-Profit Licence for Ruby-Spreadsheet

Filed under: Licence, Not For Profit, Release, Ruby, Spreadsheet — Tags: , — zdavatz @ 5:55 pm

Today we received an Email from AtomicObject regarding a free NON-GPLv3 licence for their Non-For-Profit Project SMEToolkit – that code is not OpenSource other code from AtomicObject obviously is OSS. After our first reaction of a flat denial to do so, we had some internal discussions and would be willing to provide AtomicObject with a licence for SMEToolkit under the following circumstances (and maybe more to come):

1. Where will we be credited for our work? Where in the Website and where in the source code? The term to mention would be “ywesee – the Ruby Spreadsheet” that of course would have to be linked i.e. to some new Blog entry on this Blog. Maybe even with this entry.

2. Where, in which countries, and on how many servers do you and will you run http://www.smetoolkit.org/smetoolkit/en?

3. What are the reasons why http://www.smetoolkit.org/ can not be licensed under GPLv3? We would like to state those reasons in the free license.

4. We could only grant our licence for this specific project. Other projects and clients of AtomicObject would not be allowed to use Ruby Spreadsheet under the possibly given licence.

5. We are willing to do this because we want you to see how easy it is to print a spreadsheet with our Software and of course because we want to sell additional licences to you 😉 for your other NON GPLv3 clients.

Lets see how this turns out.

February 13, 2009

0.6.3.1 Ruby Spreadsheet released

Filed under: Release, Ruby, Spreadsheet — Tags: — zdavatz @ 3:02 pm

*   Reduce warnings produced by running under ruby -w
*   Improved auto-formatting for Dates and Times
*   Honor Row, Column, Worksheet and Workbook-formats
*   Merge branch ‘master’ into HEAD
*   Only select the First Worksheet by default

http://scm.ywesee.com/?p=spreadsheet/.git;a=summary

January 15, 2009

Spreadsheet 0.6.3 released

Filed under: Release, Spreadsheet — zdavatz @ 9:34 am

0.6.3 / 2009-01-14

* 1 Bugfix

* Fixes the issue reported by Corey Martella in http://rubyforge.org/forum/message.php?msg_id=63651 as well as other issues engendered by the decision to always shorten Rows to the last non-nil value.

* 2 minor enhancements

* Added bin/xlsopcodes, a tool for examining Excel files

* Documents created by Spreadsheet can now be Printed in Excel and Excel-Viewer. This issue was reported by Spencer Turner in http://rubyforge.org/tracker/index.php?func=detail&aid=23287&group_id=678&atid=2677

0.6.2.1 / 2008-12-18

* 1 Bugfix

* Using Spreadsheet together with ‘jcode’ could lead to broken Excel-Files Thanks to Eugene Mikhailov for tracking this one down in: http://rubyforge.org/tracker/index.php?func=detail&aid=23085&group_id=678&atid=2677

January 10, 2009

I get an error when trying to open a file with spreadsheet

Filed under: Ruby, Spreadsheet — Tags: , , — zdavatz @ 2:52 pm

Mike Potter reported that he gets an error when he try’s to open a file a file with Ruby Spreadsheet.

http://rubyforge.org/forum/forum.php?thread_id=25135&forum_id=2920

This is due to still having the old ParseExcel installed. You must manually uninstall that (gem uninstall parseexcel), otherwise you will run into all sorts of errors.

January 9, 2009

Cell all the cells of a column except the first

Filed under: Spreadsheet — Tags: , — zdavatz @ 9:21 am

Happy New Year to all of you!

We are working on the next version of Spreadsheet and squashing some bugs in the mean time. This Bug-Report comes from Corey Martella

http://rubyforge.org/forum/message.php?msg_id=63651

This seems to be a Symptom of the underlying problem.

We anticipated the decision that fields that the client set to ‘nil’ (nothing) would completely be deleted from the spreadsheet. But it turns out that like that some formatting is being lost. When thinking about it, we noticed that this behavior could also be inconvenient for other cases, i.e. when a row is completed in two separate steps but after the first step ‘nil’-values still would exist at the end of the data.  Then the following fields would all be moved to the left.

Basically the goal still is to filter out empty and unformatted cells; but this has to happen later, when the file is being written.

The problem has been solved here:

http://scm.ywesee.com/?p=spreadsheet;a=commit;h=52755ad76fdda151564b689107ca2fbb80af3b78

December 10, 2008

The Ruby Spreadsheet

Filed under: Ruby, Spreadsheet — Tags: , , — zdavatz @ 4:15 pm

http://spreadsheet.rubyforge.org

http://scm.ywesee.com/?p=spreadsheet;a=summary

The Spreadsheet Library is designed to read and write Spreadsheet
Documents. As of version 0.6.0, only Microsoft Excel compatible
spreadsheets are supported. Spreadsheet is a combination/complete
rewrite of the Spreadsheet::Excel Library by Daniel J. Berger and the
ParseExcel Library by Hannes Wyss. Spreadsheet can read, write and
modify Spreadsheet Documents.

Changes:

### 0.6.0 / 2008-10-13
Initial upload of the shiny new Spreadsheet Gem after three weeks of
grueling labor in the dark binary mines of Little-Endian Biff and long
hours spent polishing the surfaces of documentation:

* Significantly improved memory-efficiency when reading large Excel Files
* Limited Spreadsheet modification support
* Improved handling of String Encodings
* Runs on top of the ruby-ole Library

Roadmap:

0.7.0: Improved Format support/Styles
0.7.1: Document Modification: Formats/Styles
0.8.0: Formula Support
0.8.1: Document Modification: Formulas
0.9.0: Write-Support: BIFF5
1.0.0: Ruby 1.9 Support;
Remove backward compatibility code

Backward Compatibility:

Spreadsheet is designed to be a drop-in replacement for both
ParseExcel and Spreadsheet::Excel. It provides a number of
require-paths for backward compatibility with its predecessors. If you
have been working with ParseExcel, you have probably used one or more
of the following:

require ‘parseexcel’
require ‘parseexcel/parseexcel’
require ‘parseexcel/parser’

Either of the above will define the ParseExcel.parse method as a
facade to Spreadsheet.open. Additionally, this will alter Spreadsheets
behavior to define the ParseExcel::Worksheet::Cell class and fill each
parsed Row with instances thereof, which in turn provide ParseExcel’s
Cell#to_s(encoding) and Cell#date methods.
You will have to manually uninstall the parseexcel library.

If you are upgrading from Spreadsheet::Excel, you were probably using
Workbook#add_worksheet and Worksheet#write, write_row or write_column.
Use the following to load the code which provides them:

require ‘spreadsheet/excel’

Again, you will have to manually uninstall the spreadsheet-excel library.

If you perform fancy formatting, you may run into trouble as the
Format implementation has changed considerably. If that is the case,
please drop me a line at hannes.wyss@gmail.com and I will try to help
you. Don’t forget to include the offending code-snippet!

Blog at WordPress.com.