Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Roo percent values
$ pry
[1] pry(main)> require "roo"
=> true
[2] pry(main)> require "roo/version"
=> true
[3] pry(main)> Roo::VERSION
=> "2.7.1"
[4] pry(main)> sheet = Roo::Spreadsheet.open("roo-percents-as-strings.xlsx", extension: "xlsx")
=> <#Roo::Excelx:1257514717731600 @tmpdir @shared @filename @sheet_files @sheet_names @sheets @sheets_by_name @options @cell @cell_type @cells_read @first_row @last_row @first_column @last_column @header_line>
[5] pry(main)> sheet.formatted_value('A', 1)
=> "30%"
[6] pry(main)> sheet.excelx_value('A', 1)
=> "0.3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment