rxl 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -12
  3. data/lib/rxl/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7820fff21fd0ba92fb5904c2a1a72a303c369830df9018ef12594ee5da572f8c
4
- data.tar.gz: 101f2adf3cd52dc9b25357e772b95cb74121c4f8c66a6effeb7de7ac5de28816
3
+ metadata.gz: 2b102ae677e551c55e09c215bc2d1cce924fd7f2fc04ed62494688ace5ef97d0
4
+ data.tar.gz: e27a358a15acd3ffe9fd7cb0fb28b80bffe1d34a5d4d39cd6daf8588e5f41bc0
5
5
  SHA512:
6
- metadata.gz: 37d51c7a106c7daab8f244726efada37d1e31f178aae7618a1821450898f48e211ce9bf3fa1c7ffdfb25d740a3031b671228922863362f883566c5980ce8d1cd
7
- data.tar.gz: 71ed2283fe0f700ff366e97912cb35863005527c32966722debae51195f4f5ba59a633acc91cf23dbd15917c3e730b63256507c312a380079f695d1816e27d39
6
+ metadata.gz: 16bc6449d64157ba6a930d38c6b2d37e5068e95a2e8c7aa9b0dab8577d4681e852b09b40f3e7cfaab9d428c819a8ca1eb6385ec4d83e37d46828c060aa9e27f4
7
+ data.tar.gz: b7036aaa8fde48fd7c5f5967623c04170c11f8aca19567aa9c21525a23ab8bbe3ae516951718f5ff9eede77d059bade248b0f796e20a44ae372fdc1696c34d77
data/README.md CHANGED
@@ -159,23 +159,23 @@ All cells are written with the format set to general by default
159
159
 
160
160
  If the value is a DateTime object then use `:date_format` with a date format as per the below examples, the default is 'dd/mm/yyyy'
161
161
 
162
- If `:format` is given as `:percentage` where the value is a number or float then the format defaults to a matching format (eg '0' for 1, '0.0' for 0.1), override using `:number_format` if trailing zeroes are required or rounding is needed
162
+ If `:format` is given as `:number` or `:percentage` where the value is a number or float then the format defaults to a matching format (eg '0' for 1, '0.0' for 0.1), override using `:decimals` if trailing zeroes or rounding is needed (nil or 0 values result in no decimal point)
163
163
 
164
164
  Specify the number format according to https://support.office.com/en-us/article/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68?ui=en-US&rs=en-US&ad=US
165
165
 
166
166
  Examples:
167
167
 
168
- | value | number_format | resulting cell format | resulting cell value |
169
- |--------------|---------------|-----------------------|----------------------|
170
- | 0 | '0' | number | 0 |
171
- | 0.49 | '0' | number | 0 |
172
- | 0.5 | '0' | number | 1 |
173
- | 0 | '0.00' | number | 0.00 |
174
- | 0.5 | '0.00' | number | 0.50 |
175
- | 0 |' 0%' | percentage | 0% |
176
- | 1 | '0%' | percentage | 100% |
177
- | 0.101 | '0.00%' | percentage | 10.10% |
178
- | 1 | '0.00%' | percentage | 100.00% |
168
+ | value | decimals | format | resulting cell value |
169
+ |--------------|----------|------------|----------------------|
170
+ | 0 | 0/nil | number | 0 |
171
+ | 0.49 | 0/nil | number | 0 |
172
+ | 0.5 | 0/nil | number | 1 |
173
+ | 0 | 2 | number | 0.00 |
174
+ | 0.5 | 2 | number | 0.50 |
175
+ | 0 | 0/nil | percentage | 0% |
176
+ | 1 | 0/nil | percentage | 100% |
177
+ | 0.101 | 2 | percentage | 10.10% |
178
+ | 1 | 2 | percentage | 100.00% |
179
179
 
180
180
  | value | date_format | resulting cell format | resulting cell value |
181
181
  |--------------|---------------|-----------------------|----------------------|
@@ -1,3 +1,3 @@
1
1
  module Rxl
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian McWilliams