Created
March 11, 2010 12:38
-
-
Save henrygarner/329097 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
require 'spreadsheet' | |
# Code to add integer keys and Excel colorindex codes to | |
# ruby-spreadsheet's Font and Format api. | |
# eg. Spreadsheet::Format.new :color => 1 | |
module Spreadsheet::Excel::Internals | |
(1..56).collect { |i| SEDOC_ROLOC[i.to_s.to_sym] = i + 7 } | |
end | |
class << Spreadsheet::Font | |
(1..56).each { |i| COLORS << i.to_s.to_sym } | |
end | |
class << Spreadsheet::Format | |
(1..56).each { |i| COLORS << i.to_s.to_sym } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment