RAA - spreadsheet/0.2.8

spreadsheet / 0.2.8

Short description: Generates MS Excel compatible files
Category: Library/Misc
Status: Usable
Created: 2002-12-31 15:00:00 GMT
Last update: 2003-12-04 17:28:26 GMT
Owner: Hannes Wyss (Projects of this owner)
Homepage: http://rubyspreadsheet.sourceforge.net
Download: http://prdownloads.sourceforge.net/rubyspreadsheet/spreadsheet-0.2.8.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
=========
- Code cleanup for 1.8.x
- Source of $DEBUG warnings fixed

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