| Age | Commit message (Collapse) | Author |
|
Ref: https://ruby-doc.org/core-2.6.10/Encoding.html#class-Encoding-label-Changing+an+encoding
|
|
All supported Ruby versions now support the `encode` method on strings,
so the conditional check for this method has been removed. Even if the
default encoding on Ruby >= 2.0 is UTF-8, this is not always the case
when the `LANG` environment variable is not set to `C.UTF-8`, so the
`encode` method has been preserved.
Additionally, this commit updates a link to use the `https` protocol for
improved security.
|
|
|
|
Also refactors Page margins to avoid code duplication
|
|
- Use https where possible
- Capitalize Excel
|
|
|
|
Ruby 2.5 introduced `delete_prefix` and `delete_suffix`.
Those methods are helpful when serializing formula and array formula
values, that are supposed to start and end with given prefixes
Also moves formula prefix to constants so they can be used by both
`Cell` and `CellSerializer` classes
Formula:
```
Ruby version: 3.2.2
Comparison:
delete_prefix: 8759353.5 i/s
sub: 2607022.4 i/s - 3.36x (± 0.00) slower
Comparison:
delete_prefix: 40 allocated
sub: 160 allocated - 4.00x more
```
Array Formula:
```
Ruby version: 3.2.2
Comparison:
delete_prefixes: 4798837.8 i/s
sub_sub: 937072.1 i/s - 5.12x (± 0.00) slower
Comparison:
delete_prefixes: 120 allocated
sub_sub: 488 allocated - 4.07x more
```
|
|
|
|
|
|
```
rubocop --only Layout/LeadingCommentSpace -a
```
|
|
- Layout/SpaceAfterComma
- Layout/SpaceAroundEqualsInParameterDefault
- Layout/SpaceAroundOperators
- Layout/SpaceBeforeBlockBraces
- Layout/SpaceInsideBlockBraces
- Layout/SpaceInsideHashLiteralBraces
- Layout/SpaceInsideParens
|
|
|
|
```
rubocop --only Layout/EmptyLines -a
```
|
|
Co-authored-by: Geremia Taglialatela <[email protected]>
|
|
|
|
Close #163
|
|
|
|
|
|
Prior to this change, strings like "1e12345" would be interpreted as float values, regardless of the actual value of the exponent (which easily could be out of range for Ruby).
In case the exponent was greater than `Float::MAX_10_EXP` (usually 308), this would result in a cell of type `:float` containing the literal string `"Infinity"`. Excel can not parse such cells and therefore gives a “corrupt data” error.
In case the exponent was less than `Float::MIN_10_EXP` (usually -307) the cell would contain `0.0`. This does not result in Excel throwing an error, but probably isn't the expected result either.
Note that this problem is quite likely to happen when creating a worksheet with hexadecimal strings, because e.g. "1234e567" is a perfectly valid hex value.
The additional range check of the exponent introduces a slight performance overhead, so I decided to split the code path: I presume parsing floats with exponents < 100 (or no exponents at all) is way more common, so this code path behaves exactly like before. Only in the case of a 3 digit exponent the additional range check is introduced.
|
|
|
|
The correct core rels namespace is
http://schemas.openxmlformats.org/package/..., and not
http://schemas.openxmlformats.org/officeDocument/...
|
|
Do not create huge strings
Let Row inherit from SimpleTypedList
Optimized sanitizing
Optimized validation
And more..
|
|
|
|
With thanks to http://stackoverflow.com/a/451488/1322410 for providing the
list of characters
|
|
* an example can be run with `ruby examples/pivot_table.rb`
* right now you cannot set options on the pivot table to make it useful (coming soon...)
|
|
|
|
|
|
Adding in Filters, Filter, DateGroupItem and FilterColumns. Still needs
more specs/docs but we are almost there.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allow us to inter-op properly with Numbers
|
|
|
|
fixed 'properly' but I've feeling the schema folder should actually be
lib/axlsx/schema
instead of
lib/schema
|
|
relative to the package as reported by Phong in #21.
https://github.com/randym/axlsx/issues/21
|
|
|
|
resolve https://github.com/randym/axlsx/issues/1
|