| Age | Commit message (Collapse) | Author |
|
No performance gain, this can be seen as a cosmetic change to have
shorter lines
|
|
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke
methods on `Axlsx` module.
This commit standardizes the approach towards `.`, which will also allow
shorter lines.
Performance is not affected
```
Comparison:
Axlsx.validate: 8515252.3 i/s
Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error
```
|
|
This commit fixes cases that cannot be detected by RuboCop
Ref: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FormatString
|
|
Should also provide a negligible performance improvement, about 3%
on Ruby 3.2 and 6% on Ruby 2.6 (M1 Pro)
|
|
Fix Style/SymbolProc offenses
|
|
This also provides a performance improvement
```
Comparison (array of 4 elements):
map(&): 3643131.4 i/s
map {}: 3488052.5 i/s - 1.04x (± 0.00) slower
Comparison (array of 20 elements):
map(&): 466013.9 i/s
map {}: 408447.2 i/s - 1.14x (± 0.00) slower
```
|
|
|
|
|
|
Fix Style/ZeroLengthPredicate unsafe offenses
|
|
Fix YARD warnings
|
|
- Use https where possible
- Capitalize Excel
|
|
|
|
|
|
Fix a couple of performance RuboCop offenses in workbook
|
|
Currently, there are lots of examples of code like this,
```
str << ('<tag ' << foo << ' ' << bar << '/>')
```
which create the string for the tag in memory before piping to str.
We can avoid creating all of these intermediate strings by dropping
the paranthesis and piping directly to str.
This relies on the `str` passed around to handle lots of small
appends. This is a problem when using RubyZip, but that is solved
in the next commit.
|
|
|
|
|
|
|
|
|
|
Configure with `AllowBeforeTrailingComments: true`
|
|
|
|
```
rubocop --only Layout/EmptyLineAfterGuardClause -a
```
|
|
- Layout/SpaceAfterComma
- Layout/SpaceAroundEqualsInParameterDefault
- Layout/SpaceAroundOperators
- Layout/SpaceBeforeBlockBraces
- Layout/SpaceInsideBlockBraces
- Layout/SpaceInsideHashLiteralBraces
- Layout/SpaceInsideParens
|
|
|
|
```
rubocop --only Layout/CommentIndentation -a
```
|
|
```
rubocop --only Layout/EmptyLines -a
```
|
|
```
rubocop --only Style/Encoding -a
```
|
|
cell levels.
|
|
|
|
|
|
|
|
|
|
On the workbook you can now configure the font_scale_divisor and the bold_font_multiplier to get better results for the automatic cell width calculationb
|
|
This code was added in 3def8f8895 (back in 2011). It has never been worked on further since; `Axlsx::Parser` is not used anywhere in the whole codebase.
Currently there are no plans to support parsing xlsx file anytime soon, so let‘s remove all of this dead code.
|
|
|
|
|
|
Signed-off-by: Erik Veijola <[email protected]>
|
|
and added multiline autowidth for both RichText and normal strings
|
|
Do not create huge strings
Let Row inherit from SimpleTypedList
Optimized sanitizing
Optimized validation
And more..
|
|
This integrates workbook views and sheet state into serialization.
I also noticed that we were populating defined names during
serialization. While it is good to delay this as late as possible
as there is always the chance that some conditional programming
by the consumer adds, and then removes an autofilter, I am
choosing to risk it at this point for cleaner code.
|
|
|
|
|
|
Relationship instances now keep track of their own id – this should be much more reliable than the old way of more or less “guessing” the relationship id based on the position of some object in some array. Fixes https://github.com/randym/axlsx/issues/212, especially.
Each relationship now has its own, unique id – except for the cases when it doesn’t: Some relationships need to share the same id, see `Relation#should_use_same_id_as?` for the gory details.
All tests pass, and the full example.xlsx is generated without errors and looks fine in Excel for Mac 2011.
The pivot table example still has the problems mentioned in https://github.com/randym/axlsx/issues/168 – but as far as I can tell I didn’t make it worse (Excel is still be able to “repair” the file, and the repaired file then contains the pivot table).
|
|
preserve_spaces has been moved to the workbook and renamed xml_space as
that provides a good reference for people trying to figure out what it
does, and let's the author specify space preservation for
serializations using the shared strings table as well as the default
inline serialization in cells.
|
|
|
|
This is part of https://github.com/randym/axlsx/issues/149
|
|
This fixes https://github.com/randym/axlsx/issues/150
|
|
Create a simple Pivot Table
|
|
* 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...)
|
|
Based on the discussion here: https://github.com/randym/axlsx/issues/111
Very simple implementation right now. Does not include any tests yet!
Change-Id: Ia8ec8c52f82577d05e07e21311cdb5fe5d1294be
|