RAA - spreadsheet/0.2.9

spreadsheet / 0.2.9

Short description: Generates MS Excel compatible files
Category: Library/Misc
Status: Usable
Created: 2002-12-31 15:00:00 GMT
Last update: 2004-06-11 20:07:09 GMT
Owner: Hannes Wyss (Projects of this owner)
Homepage: http://rubyspreadsheet.sourceforge.net
Download: http://prdownloads.sourceforge.net/rubyspreadsheet/spreadsheet-0.2.9.tar.gz?download
License: Ruby's
Dependency:
None
Description:

This module allows you to generate MS Excel compatable files on any platform (also readable by Gnumeric). It's a port of John McNamara's Spreadsheet::WriteExcel Perl module.

Changelog
=========
- Added 'brown','cyan' and 'magenta' to the list of valid color strings
for Format objects.
- Fixed bugs and slightly modified handling with regards to color,
bg_color and fg_color attributes for Format objects. Thanks go to
David Brady for the spot.
- Minor optimization for the append and prepend methods in the BiffWriter
class
- Minor $LOAD_PATH correction for test.rb
- Added some more unit tests for Format ojbects.
- Added warranty information
- LAST RELEASE USING EXCEL 95 FORMAT! (See README for more details)


Synopsis
========
require "spreadsheet/excel"
include Spreadsheet

wb = Excel.new("test.xls")
format1 = wb.add_format(:color=>"blue")

format2 = Format.new(:color=>"green")
wb.add_format(format2)

format3 = Format.new{ |f|
f.color = "red"
f.bold = "true"
}
wb.add_format(format3)

ws = wb.add_worksheet

ws.write(0,0,"Hello World!",format1)
ws.write(1,1,"Ruby Rocks!",format2)
ws.write(2,2,8888,format3)

ws.write_row(3,3,["Matz","Larry","Guido"])
ws.write_column(4,4,["a","b","c"])
ws.write(7,7,[[1,2,3],[4,5,6],[7,8,9]])

ws.format_row(2,nil,format1)
ws.format_column(2..3,30,format2)

wb.close

Versions: [0.3.5 (2006-08-21)] [0.3.4 (2006-02-17)] [0.3.3 (2005-12-05)] [0.3.2 (2005-10-12)] [0.3.1 (2005-10-11)] [0.3.0 (2005-10-11)] [0.2.9 (2004-06-11)] [0.2.8 (2003-12-04)]

Edit this project (for project owner)

back to RAA top