summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_cell.rb
AgeCommit message (Collapse)Author
2023-10-02Fix failing specjohnnyshields
2023-10-02Set escape_formulas as "true" as a global default.johnnyshields
2023-05-22Use Ruby 1.9 hash syntax (non-production code)Geremia Taglialatela
2023-05-15Remove ability to set `u=` to true in favor of :singlePaul Kmiec
The `u=` would convert `true` to `:single` for backwards compatibility. However, it is more explicit to set it to `:single` or one of the other underline options instead of relying on the conversion.
2023-05-04Enable Style/FrozenStringLiteralComment and autocorrectPaul Kmiec
2023-05-03Fix Style/RedundantFileExtensionInRequire offenseGeremia Taglialatela
2023-05-03Add RuboCop MinitestGeremia Taglialatela
2023-05-03Fix offenses to non-production codeGeremia Taglialatela
- Lint/AmbiguousBlockAssociation - Lint/AmbiguousOperatorPrecedence - Lint/EmptyBlock - Lint/RedundantSplatExpansion - Lint/RedundantStringCoercion - Lint/SymbolConversion - Lint/UnusedBlockArgument - Style/BlockDelimiters - Style/CommentAnnotation - Style/EachForSimpleLoop - Style/EmptyMethod - Style/ExpandPathArguments - Style/FileWrite - Style/GlobalStdStream (UNSAFE) - Style/HashEachMethods (UNSAFE) - Style/NestedParenthesizedCalls - Style/NilComparison - Style/NumericLiteralPrefix (manually fixed) - Style/ParallelAssignment - Style/PreferredHashMethods (UNSAFE) - Style/RedundantInterpolation (UNSAFE) - Style/RedundantParentheses (UNSAFE) - Style/RegexpLiteral - Style/RescueStandardError - Style/SpecialGlobalVars (UNSAFE) - Style/SymbolProc (UNSAFE) - Style/ZeroLengthPredicate (UNSAFE)
2023-04-23Add test to ensure various OWASP prefixes are never parsed as formulaStefan
2023-04-13Merge branch 'master' into escape-formulas-improvementJohnny Shields
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-03Escape array formulasjohnnyshields
2023-04-02`escape_formulas` should handle all [OWASP-designated formula ↵johnnyshields
prefixes](https://owasp.org/www-community/attacks/CSV_Injection).
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
2021-01-05Merge pull request #71 from artplan1/add-date-typeNoel Peden
Allow to set cell type to `date`
2020-12-03Extend cell_type_from_value with sanity checksToms Mikoss
2020-11-27Add casting to dateArtem Kozaev
Add tests
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.
2020-02-13Improve cell string_autowidth calculations (#44)Weston Ganger
Previously, cells with autowidth sometimes were too narrow for the content to fit. The original width calculation tried to take the difference between narrow and wide chars into account, but it didn’t work out very well. The new calculation is simpler. Compared to the previous implementation it results in cells being slightly wider in most cases.
2019-12-20Add option to protect against formula injection attacks (#34)Gabriel Morcote
Caxlsx used to treat cell values beginning with an equal sign as formula by default. This can be dangerous if the input data is user generated or coming from other untrusted sources (see https://www.owasp.org/index.php/CSV_Injection for details). This commit adds a new option `escape_formulas` that can be used with `#add_row` and on instances of `Cell`. If set to true, cell values beginning with an equal sign are treated as normal strings (and will be displayed literally by Excel and co.)
2018-02-08chore(coverage) increase coverage and cleanuprandym
2016-11-04fix(test): explicitly require members in xpath query assertionrandym
2016-11-03Add testsArkadiy Butermanov
2014-10-29Skip to_time if the value is a Time instanceSoutaro Matsumoto
This skips calling `#to_time` if the value is a instance of subclass of `Time`, like `ActiveSupport::TimeWithZone`.
2014-03-04Fix cell merging, #179Jurriaan Pruis
2014-03-04Array forumla tests.tafryn
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-30add name attribute to cell to create defined names for a single cell. ↵Randy Morgan
https://github.com/randym/axlsx/issues/241
2013-01-15Added support for iso 8601 data types.Randy Morgan
Not really sure what excel is going to do with these data types, but hooking it up is the first step ;)
2012-11-08fixed cell text run validation for u and familyRandy Morgan
2012-09-23Autofilter extended implementationRandy Morgan
Beginnings of 18.3.2 AutoFilter Settings implementation. I've moved auto_filter into its own directory as there will be a minimum of 15 or 20 classes required to implement this in full.
2012-09-14incorporate deeper check for cell size and adjust for boldRandy Morgan
2012-09-07properly recognize exponential values as floatRandy Morgan
2012-08-12specs to prove the sz bug is actually fixed.Randy Morgan
2012-07-15cleanup worksheet initializer.Randy Morgan
2012-05-17fix ALL the warnings!Randy Morgan
2012-05-15bring coverage up to 100% and patch a few minor bugs in cell style overrides ↵Randy Morgan
and misnamed app attributes.
2012-05-12patch formula parsing. Randy Morgan
#92 many thanks to @alexei-lexx for not only finding this, but taking time to report the problem.
2012-05-09patch nil row style issueRandy Morgan
https://github.com/randym/axlsx/issues/91
2012-04-06put only plain string cells in shared string tableochko
2012-04-02Merge pull request #73 from jurriaan/empty-cellRandy Morgan
Support for empty cells like Excel
2012-04-02Updated tests for nil cellsJurriaan Pruis
2012-04-02move axlsx.rb helper methods into separate test suite.Randy Morgan
2012-04-01Test 3+ letter column references and indices.Joe Kain
2012-04-01part way through changing all serialization to use string concatenation ↵Randy Morgan
prior to dropping Nokogiri dep in production.
2012-03-28Still not fast enough?Randy Morgan
``` user system total real axlsx_noautowidth 0.760000 0.020000 0.780000 ( 0.885482) axlsx 3.560000 0.130000 3.690000 ( 4.158594) axlsx_shared 11.610000 0.180000 11.790000 ( 13.208945) axlsx_stream 3.450000 0.120000 3.570000 ( 3.920745) csv 0.240000 0.010000 0.250000 ( 0.269822)
2012-03-27FAST ENOUGH?Randy Morgan
user system total real axlsx_noautowidth 1.560000 0.030000 1.590000 ( 1.717595) axlsx 4.360000 0.140000 4.500000 ( 5.748329) axlsx_shared 6.880000 0.160000 7.040000 ( 9.325648) axlsx_stream 4.320000 0.120000 4.440000 ( 5.642124) csv 0.240000 0.010000 0.250000 ( 0.301004)