Skip to content

Instantly share code, notes, and snippets.

@ratbeard
Created February 16, 2010 18:18
Show Gist options
  • Save ratbeard/305761 to your computer and use it in GitHub Desktop.
Save ratbeard/305761 to your computer and use it in GitHub Desktop.
# http://roo.rubyforge.org/
# http://code.joejag.com/2009/using-ruby-to-parse-an-excel-document/
class Spreadsheet
def initialize(path, path_to_results='c:/tmp/resultz')
@path = path
@path_to_results =
end
def id
def parse!
# open with roo (or some library) and get a spreadsheet object:
@extracted = slurp(Excel.new(file))
end
# override me in subclasses
# takes in a spreadsheet and returns the interesting extracted data from it
def slurp(spreadsheet)
end
def last_modified
File.mtime(@path)
end
def save_extract
Fil
end
def load_extract
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment