Coder Social home page Coder Social logo

flavorjones / roo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simonoff/roo

2.0 3.0 1.0 1.48 MB

Fork of roo that uses Nokogiri and doesn't pollute the global namespace with multiple class names.

Home Page: http://roo.rubyforge.org/

License: MIT License

JavaScript 9.87% Ruby 90.13%

roo's Introduction

README for Roo

Roo is available here and on Rubyforge. You can install the official release with 'gem install roo' or refer to the installation instructions below for the latest development gem.

NOTE: Roo 1.9 was released by Thomas and I think it was intended for Ruby 1.9 but the dependencies are not working properly so everyone gets it with a gem install Roo. I'm trying to get a hold of him to work out how to fix things.

In the meantime, Roo 1.3.11 should be on gemcutter and works with Ruby 1.8 with no known issues. I'll continue to maintain this version in the interim.

Installation

# Run the following if you haven't done so before:
gem sources -a http://gems.github.com/

# Install the gem:
sudo gem install roo -v 1.3.11

Usage:

require 'rubygems'
require 'roo'

s = Openoffice.new("myspreadsheet.ods")      # creates an Openoffice Spreadsheet instance
s = Excel.new("myspreadsheet.xls")           # creates an Excel Spreadsheet instance
s = Google.new("myspreadsheetkey_at_google") # creates an Google Spreadsheet instance
s = Excelx.new("myspreadsheet.xlsx")         # creates an Excel Spreadsheet instance for Excel .xlsx files

s.default_sheet = s.sheets.first  # first sheet in the spreadsheet file will be used

# s.sheet is an array which holds the names of the sheets within
# a spreadsheet.
# you can also write
# s.default_sheet = s.sheets[3] or
# s.default_sheet = 'Sheet 3'

s.cell(1,1)                                 # returns the content of the first row/first cell in the sheet
s.cell('A',1)                               # same cell
s.cell(1,'A')                               # same cell
s.cell(1,'A',s.sheets[0])                   # same cell

# almost all methods have an optional argument 'sheet'.
# If this parameter is omitted, the default_sheet will be used.

s.info                                      # prints infos about the spreadsheet file

s.first_row                                 # the number of the first row
s.last_row                                  # the number of the last row
s.first_column                              # the number of the first column
s.last_column                               # the number of the last column

# limited font information is available

s.font(1,1).bold?
s.font(1,1).italic?
s.font(1,1).underline?

see http://roo.rubyforge.org for a more complete tutorial

roo's People

Contributors

fd avatar overbryd avatar

Stargazers

Alex Le avatar Mike Dalessio avatar

Watchers

Mike Dalessio avatar James Cloos avatar  avatar

Forkers

sr3d

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.