| Age | Commit message (Collapse) | Author |
|
- 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
|
|
|
|
Add tests
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.)
|
|
- `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)
|
|
See https://github.com/randym/axlsx/pull/635
|
|
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.
|
|
|
|
|
|
|
|
|
|
[ci skip] Fix the documentation for Worksheet#cols
|
|
|
|
|
|
|
|
|
|
:)
|
|
Pivot table bugs
|
|
Fix #472: worksheet name with underscore
|
|
set color with Row#color=
|
|
|
|
fix Fixnum deprecated warning on Ruby2.4-preview3.
Fixnum was unify into Integer.
https://bugs.ruby-lang.org/issues/12005
|
|
|
|
instead of axisCol
|
|
|
|
Implement :text cell type
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Erik Veijola <[email protected]>
|
|
soutaro-fix-time-cast
|
|
|
|
|
|
small oversight...
|
|
9999 is too big
|
|
"sell" should be "cell"
|
|
This skips calling `#to_time` if the value is a instance of subclass of `Time`, like `ActiveSupport::TimeWithZone`.
|
|
|
|
Use 1 or 0 instead of 'true' or 'false' in the XML output
|
|
|
|
By only sanitizing just before serialisation.
|