summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/util/constants.rb
AgeCommit message (Collapse)Author
2023-07-05Use encoding constant instead of hardcoded stringGeremia Taglialatela
Ref: https://ruby-doc.org/core-2.6.10/Encoding.html#class-Encoding-label-Changing+an+encoding
2023-07-02Remove conditional check for `encode` methodGeremia Taglialatela
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.
2023-05-31Fix string concatenation offenses in production codeGeremia Taglialatela
2023-05-24Do not use collection literal in loopsGeremia Taglialatela
Also refactors Page margins to avoid code duplication
2023-05-21Improve commentsGeremia Taglialatela
- Use https where possible - Capitalize Excel
2023-05-17Merge branch 'master' into chore/use-delete-prefix-suffixZsolt Kozaroczy
2023-05-16Replace `sub` with `delete_prefix`/`delete_suffix`Geremia Taglialatela
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 ```
2023-05-15Corrected rubocop offenses in lib/axlsx.rb / test/tc_axlsx.rbPaul Kmiec
2023-05-04Enable Style/FrozenStringLiteralComment and autocorrectPaul Kmiec
2023-04-10Fix Layout/LeadingCommentSpace offensesGeremia Taglialatela
``` rubocop --only Layout/LeadingCommentSpace -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/EmptyLines offensesGeremia Taglialatela
``` rubocop --only Layout/EmptyLines -a ```
2022-09-21Update lib/axlsx/util/constants.rbStefan Daschek
Co-authored-by: Geremia Taglialatela <[email protected]>
2022-09-21Move worksheet name forbidden chars to a constantGeremia Taglialatela
2022-09-21Add worksheet name max length to a constantGeremia Taglialatela
Close #163
2022-02-07Validate name option to be non-empty string when passed.Josef Šimánek
2022-01-24Refractor to use constant based error messagesWeston Ganger
2020-07-27Fix type detection for floats with out-of-rage exponents (#54)Stefan Daschek
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.
2017-04-01chore(doc): document some membersrandym
2015-09-30Fix core rels namespaceRômulo A. Ceccon
The correct core rels namespace is http://schemas.openxmlformats.org/package/..., and not http://schemas.openxmlformats.org/officeDocument/...
2014-02-26Huge refactoringJurriaan Pruis
Do not create huge strings Let Row inherit from SimpleTypedList Optimized sanitizing Optimized validation And more..
2013-02-04Completed missing docs and pre-release prepRandy Morgan
2012-12-12Test for invalid characters in the sheet name.Hayden Ball
With thanks to http://stackoverflow.com/a/451488/1322410 for providing the list of characters
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-09-30added MOAR documentationRandy Morgan
2012-09-30fixed regular expression generation for removing control characters.Randy Morgan
2012-09-25more work on deep autofilter implementationRandy Morgan
Adding in Filters, Filter, DateGroupItem and FilterColumns. Still needs more specs/docs but we are almost there.
2012-08-27release prepRandy Morgan
2012-08-11add hyperlinks for worksheets #118Randy Morgan
2012-07-14Additional validations for excel sheet name and example updatesRandy Morgan
2012-05-13updating docsRandy Morgan
2012-05-13cleaning up comments for pre-releaseRandy Morgan
2012-05-08worksheet comments step 2. Needs docs and specs - but it works in ExcelRandy Morgan
2012-05-04beginnings of comments w/o TDD (^ ^)/Randy Morgan
2012-05-04add comment relationship typeRandy Morgan
2012-04-25label rotation and conditional formatting examplesRandy Morgan
2012-04-23first stage refactoring for Style#add_style [inprogress]Randy Morgan
2012-04-03pre-release cleanupRandy Morgan
2012-03-21resolve small merge conflictRandy Morgan
2012-03-21resolving #53 and adding specs for use_autowidth, show_gridlinesRandy Morgan
2012-03-21Added support for tablesJurriaan Pruis
2012-03-05cleanup of useless line breakRandy Morgan
2012-02-23worksheet names need to be limited to 31 charactersRandy Morgan
2012-02-12Adding in support for optionally using the shared strings table. This will ↵Randy Morgan
allow us to inter-op properly with Numbers
2012-02-02Adding in hyperlinking for images as per issue #22Randy Morgan
2012-02-01https://github.com/randym/axlsx/issues/21Randy Morgan
fixed 'properly' but I've feeling the schema folder should actually be lib/axlsx/schema instead of lib/schema
2012-02-01Updating schema loading for validation to correctly load the schema file ↵Randy Morgan
relative to the package as reported by Phong in #21. https://github.com/randym/axlsx/issues/21
2011-12-08removing unused namespace constants.Randy Morgan
2011-12-06Formatting float values for column width and date values in an attempt to ↵Randy Morgan
resolve https://github.com/randym/axlsx/issues/1