zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

Percentage format #212

Closed dsounded closed 6 years ago

dsounded commented 6 years ago

Hello, thanks for the gem, currently I can't find a proper way to set the Excel percentage format to the column, only percentage_format = Spreadsheet::Format.new(number_format: '##0.00%'). I use this for now, any other options(e.g. DSL for setting this). But even with the mask it gives wrong calculation...

zdavatz commented 6 years ago

Use the mailing list to ask this question.

dsounded commented 6 years ago

@zdavatz I tried but there is not response :(

zdavatz commented 6 years ago

Did you also check Stackoverflow?

adrianmann commented 6 years ago

I am looking for a solution for this also. I have asked an SO question here with no response as of yet: https://stackoverflow.com/questions/49899882/ignore-number-stored-as-text-warning-rails. Did you get a result @dsounded ?

zdavatz commented 6 years ago

Ok, thanks for reporting this!

adrianmann commented 6 years ago

I got an answer here: https://stackoverflow.com/q/49916286/1945948 (the first comment) combined with: percent_format = Spreadsheet::Format.new :number_format => '#0 %'.

zdavatz commented 6 years ago

Cool, great, thank your for linking the Issue here.