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
irb(main):001:0> require "roo" | |
=> true | |
irb(main):002:0> require "roo/version" | |
=> true | |
irb(main):003:0> Roo::VERSION | |
=> "2.0.0" | |
irb(main):004:0> sheet = Roo::Spreadsheet.open("/Users/reshleman/Desktop/roo_error.xlsx", extension: "xlsx") | |
=> {[1, 1]=>#<Roo::Excelx::Cell:0x007fe6b297fef0 @type=:string, @formula=nil, @excelx_type=:string, @excelx_value="0", @style=0, @value="name", @coordinate=#<Roo::Excelx::Cell::Coordinate:0x007fe6b297ff40 @row=1, @column=1>>, [2, 1]=>#<Roo::Excelx::Cell:0x007fe6b297f798 @type=:string, @formula=nil, @excelx_type=:string, @excelx_value="1", @style=0, @value="Robert Eshleman", @coordinate=#<Roo::Excelx::Cell::Coordinate:0x007fe6b297f7e8 @row=2, @column=1>>} | |
irb(main):005:0> sheet.parse(name: "name") | |
=> [{:name=>"name"}, {:name=>"Robert Eshleman"}] |
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
# Used to create tables for importing into quizlet. | |
# gem install zhongwen_tools | |
require 'zhongwen_tools' | |
require 'zhongwen_tools/core_ext/string' | |
def random_tone; (1..4).to_a.sample; end | |
def tsv_list(pyn); [pyn, pyn].join("\t"); end | |
def pinyin_list | |
pyn = ZhongwenTools::Romanization::ROMANIZATIONS_TABLE.map { |k| k[:pyn]} |
OlderNewer