Created
February 16, 2010 18:18
-
-
Save ratbeard/305761 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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