Skip to content

Instantly share code, notes, and snippets.

@mrzasa
Last active February 17, 2017 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrzasa/358d42de6349cb16128d91cc26c2a9fb to your computer and use it in GitHub Desktop.
Save mrzasa/358d42de6349cb16128d91cc26c2a9fb to your computer and use it in GitHub Desktop.
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