summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/workbook.rb
AgeCommit message (Collapse)Author
2023-06-15Fix redundant self offensesGeremia Taglialatela
No performance gain, this can be seen as a cosmetic change to have shorter lines
2023-06-10Fix safe Style/ColonMethodCall offensesGeremia Taglialatela
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 ```
2023-06-05Prefer `Kernel#format` to `String#%`Geremia Taglialatela
This commit fixes cases that cannot be detected by RuboCop Ref: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/FormatString
2023-06-02Fix negated if offensesGeremia Taglialatela
Should also provide a negligible performance improvement, about 3% on Ruby 3.2 and 6% on Ruby 2.6 (M1 Pro)
2023-05-31Merge pull request #268 from tagliala/chore/fix-symbol-proc-offensesZsolt Kozaroczy
Fix Style/SymbolProc offenses
2023-05-31Fix Style/SymbolProc offensesGeremia Taglialatela
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 ```
2023-05-31Fix Style/ConditionalAssignment offensesGeremia Taglialatela
2023-05-24Fix Style/RedundantFileExtensionInRequire offensesGeremia Taglialatela
2023-05-22Merge pull request #243 from tagliala/chore/fix-zero-length-predicate-offensesZsolt Kozaroczy
Fix Style/ZeroLengthPredicate unsafe offenses
2023-05-22Merge pull request #235 from tagliala/chore/fix-yard-warningsZsolt Kozaroczy
Fix YARD warnings
2023-05-21Improve commentsGeremia Taglialatela
- Use https where possible - Capitalize Excel
2023-05-20Fix Style/ZeroLengthPredicate unsafe offensesGeremia Taglialatela
2023-05-20Fix sheet_by_name for sheets with escaped charactersAdam Kiczula
2023-05-15Use `include?` and `find` for performanceGeremia Taglialatela
Fix a couple of performance RuboCop offenses in workbook
2023-05-05Pipe output directly to str and avoid additional memory allocationsPaul Kmiec
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.
2023-05-04Fix tests / code to work with frozen string literalsPaul Kmiec
2023-05-04Enable Style/FrozenStringLiteralComment and autocorrectPaul Kmiec
2023-04-13Merge branch 'master' into escape-formulas-improvementJohnny Shields
2023-04-12Small fixes: whitespace, typos, ordering, etc. (#188)Johnny Shields
2023-04-09Fix Layout/ExtraSpacing offensesGeremia Taglialatela
Configure with `AllowBeforeTrailingComments: true`
2023-04-09Fix offenses related to indentation consistencyGeremia Taglialatela
2023-04-08Fix Layout/EmptyLineAfterGuardClause offensesGeremia Taglialatela
``` rubocop --only Layout/EmptyLineAfterGuardClause -a ```
2023-04-08Fix space-related offensesGeremia Taglialatela
- Layout/SpaceAfterComma - Layout/SpaceAroundEqualsInParameterDefault - Layout/SpaceAroundOperators - Layout/SpaceBeforeBlockBraces - Layout/SpaceInsideBlockBraces - Layout/SpaceInsideHashLiteralBraces - Layout/SpaceInsideParens
2023-04-08Fix EmptyLines related offensesGeremia Taglialatela
2023-04-06Fix Layout/CommentIndentation offensesGeremia Taglialatela
``` rubocop --only Layout/CommentIndentation -a ```
2023-04-06Fix Layout/EmptyLines offensesGeremia Taglialatela
``` rubocop --only Layout/EmptyLines -a ```
2023-04-06Fix Style/Encoding offensesGeremia Taglialatela
``` rubocop --only Style/Encoding -a ```
2023-03-31Add settings for escape_formulas at global, workbook, worksheet, row and ↵johnnyshields
cell levels.
2022-10-12Resolve all TODOsWeston Ganger
2022-10-09ImprovementsWeston Ganger
2022-10-09Remove active_support dependency from axlsx_stylerWeston Ganger
2022-09-29Merge axlsx_styler gem into caxlsxWeston Ganger
2022-02-06Autowidth cell calculation is now configurableTobias Egli
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
2019-12-03Remove unused / stubbed code related to parsing xlsx filesStefan Daschek
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.
2017-04-01chore(doc): document some membersrandym
2016-01-13Fix #440 - allow control of position of outline summary row/columnsBruce Davidson
2015-07-29workbook.rb: added possibility to reverse the serialization order of workbookErik Veijola
Signed-off-by: Erik Veijola <[email protected]>
2014-03-01Implemented RichText (multiple text runs)Jurriaan Pruis
and added multiline autowidth for both RichText and normal strings
2014-02-26Huge refactoringJurriaan Pruis
Do not create huge strings Let Row inherit from SimpleTypedList Optimized sanitizing Optimized validation And more..
2013-09-29Integrate workbook views and alter serializationRandy Morgan
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.
2013-08-19More work on page breaksRandy Morgan
2013-08-17add first bits of col/row break supportRandy Morgan
2013-07-08Make relationship ids more reliable.Stefan Daschek
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).
2013-04-28Refactored and renamed space preservationRandy Morgan
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.
2013-01-10reduced processing of 3000 rows from 3+ seconds to just under 2Randy Morgan
2012-12-04Added sheet_format_pr to help iOS/OSX preview renderers look niceRandy Morgan
This is part of https://github.com/randym/axlsx/issues/149
2012-12-04Moved defined names in workbook to be serialized before pivot tablesRandy Morgan
This fixes https://github.com/randym/axlsx/issues/150
2012-11-27Merge pull request #148 from alexrothenberg/pivot_tableRandy Morgan (@morgan_randy)
Create a simple Pivot Table
2012-11-27Create a simple Pivot TableAlex Rothenberg
* 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...)
2012-11-22Adds basic support for headers and footers.Adam Mueller
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