summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook
AgeCommit message (Collapse)Author
2020-12-10Fix calculation of worksheet name lengthLuka Lüdicke
- The previous change caused unnecessary issues - We approximate that Excel calculates the character length with UTF-16 - Fixes https://github.com/caxlsx/caxlsx/issues/67
2020-12-03Extend cell_type_from_value with sanity checksToms Mikoss
2020-11-27Add casting to dateArtem Kozaev
Add tests
2020-11-27Allow to set cell type to `date`Artem Kozaev
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-07-14Set column width to the maximum allowed value (#53)Sergey Ponomarev
Maximum column width limit in MS Excel is 255 characters https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3 If this value is exceeded, MS Excel gets stuck and doesn't allow column resizing.
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.)
2019-12-17Check size in bytes as opposed to string sizeIan Clarkson
- `size` returns length in characters, but doesn't factor in multibyte Unicode characters. By switching to `bytesize`, we check the relevant measure of how many bytes the worksheet name is. - Fixes https://github.com/randym/axlsx/issues/588 - Copy of PR against original axlsx (https://github.com/randym/axlsx/pull/589)
2019-12-15Fix typo.Stefan Daschek
See https://github.com/randym/axlsx/pull/635
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.
2018-02-08chore(coverage): 100% coverage, 100% docsrandym
2018-02-08chore(coverage) increase coverage and cleanuprandym
2018-02-07fix(docs): patch docs returns -> returnrandym
2018-02-06Merge branch 'master' into release-3.0.0randym
2018-02-06Merge pull request #432 from repinel/fix-cols-docRandy Morgan (@morgan_randy)
[ci skip] Fix the documentation for Worksheet#cols
2018-01-11chore(clean): remove white spacerandym
2017-04-01Merge branch 'master' into release-3.0.0randym
2017-04-01chore(doc): document some membersrandym
2017-04-01chore(depreciated): remove depreciated membersrandym
2017-03-23Fix typomparramon-kantox
:)
2016-11-15Merge pull request #499 from ehallmark/pivot_table_bugsRandy Morgan (@morgan_randy)
Pivot table bugs
2016-11-15Merge pull request #494 from sato-s/sheet-titleRandy Morgan (@morgan_randy)
Fix #472: worksheet name with underscore
2016-11-15Merge pull request #492 from sato-s/colorRandy Morgan (@morgan_randy)
set color with Row#color=
2016-11-14set color with Row#color=sato-s
2016-11-12fix warning: constant ::Fixnum is deprecatedtakkanm
fix Fixnum deprecated warning on Ruby2.4-preview3. Fixnum was unify into Integer. https://bugs.ruby-lang.org/issues/12005
2016-11-07Added style_info field to pivot_table.rbEvan Hallmark
2016-11-07Updated pivot_table#pivot_field_for to use the axisPage attr for page fields ↵Evan Hallmark
instead of axisCol
2016-11-07Added pivot table option to pass in list of row fields to omit subtotals fromEvan Hallmark
2016-11-04Merge pull request #455 from acl-services/text-typeRandy Morgan (@morgan_randy)
Implement :text cell type
2016-11-02Allow a Row to be passed to merge_cellsMike Dillon
2016-10-09Fix #472: worksheet name with underscoresato-s
Previously, worksheet name was defined as a serializable_attributes that Axlsx automatically camelize by Axlsx.camel . This cause an unexpected worksheet name convertion. For instance, - "Pie_chart" is converted into "Piechart" - "_example" is converted into "Example" This patch disables an unexpected worksheet name convertion.
2016-04-05Escape html in :text typeArkadiy Butermanov
2016-03-23Implement :text cell typeArkadiy Butermanov
2016-01-13Remove incorrect argumentBruce Davidson
2016-01-13Fix #440 - allow control of position of outline summary row/columnsBruce Davidson
2015-12-14[ci skip] Fix the documentation for Worksheet#colsRoque Pinel
2015-11-18remove some code reekRunar Ingebrigtsen
2015-07-29workbook.rb: added possibility to reverse the serialization order of workbookErik Veijola
Signed-off-by: Erik Veijola <[email protected]>
2015-07-04Merge branch 'fix-time-cast' of https://github.com/soutaro/axlsx into ↵Jonathan Tron
soutaro-fix-time-cast
2015-07-04Add test, fix example with tab color generation and fix a but due to a typoJonathan Tron
2015-05-23Option to change tab colorshifakhan
2015-04-26Update worksheet.rbIwan Buetti
small oversight...
2015-01-12Fix #fit_to to work correctly and fix tests under Ruby 2.2.0Jurriaan Pruis
9999 is too big
2014-12-10Typo in row.rbGary Holtz
"sell" should be "cell"
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-07-29Allow multiple autofilters per workbookmfrank01
2014-04-04Fix boolean values so the output matches Excel and works on NumbersJurriaan Pruis
Use 1 or 0 instead of 'true' or 'false' in the XML output
2014-03-17Fix RichText warningJurriaan Pruis
2014-03-12Fix autowidth in combination with sanitizingJurriaan Pruis
By only sanitizing just before serialisation.