Commit Graph

358 Commits (master)

Author SHA1 Message Date
Thomas Fussell 1cd5357ddb
Merge pull request #657 from Teebonne/patch-2
Fixes float warnings
2022-10-09 09:30:59 -05:00
Teebonne 2137a7a243
Fixes float warnings
Fixes warning C4305: 'initializing': truncation from 'double' to 'float'
Fixes warning C4244: 'initializing': conversion from 'double' to 'float', possible loss of data
2022-08-29 22:17:42 +01:00
snippet c21014c0fd Added the ability to set the active sheet
Closes #653
2022-08-29 18:30:48 +10:00
Thomas Fussell a52bcd5fef implement defined names 2022-08-21 10:57:02 -05:00
Thomas Fussell bf92dd7640 implement shared and array formulas 2022-08-13 13:20:25 -05:00
Thomas Fussell d88c901faa
Merge pull request #608 from imgspc/iter_has_value
Add has_value to cell_iterator
2022-01-09 17:42:00 -05:00
Thomas Fussell 0246c7bece
Merge pull request #607 from doomlaur/bugfix/windows_utf16_paths
Paths on Windows are now correctly converted from UTF-8 to UTF-16
2022-01-09 17:41:18 -05:00
Félix Bourbonnais 5ff980854a
Merge branch 'master' into iter_has_value 2021-12-09 14:13:21 -05:00
Laurențiu Leahu-Vlăducu 8c584321a5
Paths on Windows are now correctly converted from UTF-8 to UTF-16 instead of UCS-2. This fixes issues with file paths that use 2 wchar_t characters / 4 bytes, also called surrogate pairs. Modified the unit tests to test this case. 2021-12-09 16:42:18 +01:00
Félix Bourbonnais 28f7e6fa69 Add has_value to cell_iterator
When iterating over a range that doesn't ignore null rows/columns,
the operator*() throws when dereferencing an iterator to a null cell.
Add has_value() to cell_iterator to be able to make a check without
relying on exceptions.
And add a test case.
2021-12-08 15:49:14 -05:00
Wu, Ganhao b81d76a223 Fix test case - page size now optional. 2021-09-04 02:15:19 +08:00
Thomas Fussell 50a792a01a Merge branch 'Issue484/fix-calculate-dimension-when-not-skipping-nulls' of https://github.com/imgspc/xlnt into imgspc-Issue484/fix-calculate-dimension-when-not-skipping-nulls 2021-08-22 08:59:05 -04:00
Thomas Fussell 04b6b97577
Merge branch 'master' into master 2021-08-22 08:41:01 -04:00
Thomas Fussell 04ebd7ef9d fix warnings, bump copyright, fix typo, update npm libs 2021-08-22 08:23:18 -04:00
Sewon Park c160db4ef6
Merge branch 'master' into master 2021-06-24 15:45:51 +09:00
vkovec 4294e31253 include first empty rows and columns in range if skip_null false 2021-04-16 11:44:13 -04:00
Thomas Fussell 20f3dac28b reenable tests 2021-02-23 19:36:07 -04:00
Thomas Fussell 74fc642676 work on strikethrough for #530 2021-02-21 16:52:03 -04:00
Sewon Park 7f44dc2274 minimum support for xlsm 2021-01-21 21:45:24 +09:00
Thomas Fussell c448d9788a
Merge branch 'master' into workbook_check_out_of_range_in_sheet_by_index 2021-01-02 15:06:21 -05:00
Thomas Fussell c31b2aa51d
Merge branch 'master' into issue-494-shared-string 2021-01-02 15:01:41 -05:00
Thomas Fussell 08e51ccdc0
Merge branch 'master' into feature/hidden-sheet 2021-01-02 14:58:47 -05:00
Thomas Fussell f6e43a312d
Merge branch 'master' into feature/hidden-sheet 2021-01-02 14:57:12 -05:00
Thomas Fussell dd215794db
Merge branch 'master' into issue_503_external_link 2021-01-02 14:54:31 -05:00
Emmanuel Pescosta 3225f357dd
workbook: Throw if index in (const) sheet_by_index is out of range
The documentation of (const) sheet_by_index already mentions that
invalid_parameter exception will be thrown if the index is out of
range, but the implementation was missing.
2020-12-02 11:06:56 +01:00
胡剑波 e8dd38d0d6 Fix throwing exception when duplicate shared strings occur. 2020-08-25 15:08:20 +08:00
胡剑波 dafdfa3ebb Add the function of getting table hidden attributes. 2020-08-25 13:32:21 +08:00
胡剑波 0ecad78c1d Fixed an exception thrown when parsing external links. 2020-08-25 09:00:22 +08:00
Adam Hooper 319c4197c1
Streaming: skip empty rows in has_cell()/read_cell()
Previously, an empty row would mess with the parser: if we're in an
empty row, our helper methods don't detect us as being in the "row" _or_
in the "sheetData". So `has_cell()` would return false when it
shouldn't. Similarly, `read_cell()` wouldn't skip rows; so `read_cell()`
would return an invalid cell when placed in an empty row, causing a
segfault when the caller tried to use the cell.

Callers must take care to call `has_next()` before `read_next()`. In
the future, perhaps we can make `read_next()` return a `std::optional`
and nix `has_next()` altogether?

[Closes #492]
2020-07-28 15:29:12 -04:00
Thomas Fussell 2f5934f60e
Merge pull request #447 from Crzyrndm/feature/benchmark
microbenchmarks for double<->string conversion, serialisation improvements
2020-03-20 18:02:37 -04:00
amiremohamadi 33a56b3a04 add more tests for absolute and relative column, row forms 2020-03-20 23:06:58 +03:30
JCrawfy ee593c2673 bug fixes, move the faster serialisation into the numeric header
serialisation ends up roughly 2x improvement going from sstream to snprintf

Run on (4 X 3500 MHz CPU s)
CPU Caches:
  L1 Data 32K (x4)
  L1 Instruction 32K (x4)
  L2 Unified 262K (x4)
  L3 Unified 6291K (x1)
-------------------------------------------------------------------------------------------------------------
Benchmark                                                                   Time             CPU   Iterations
-------------------------------------------------------------------------------------------------------------
RandFloatStrs/double_from_string_sstream                                  968 ns          977 ns       640000
RandFloatStrs/double_from_string_strtod                                   272 ns          270 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed                             272 ns          270 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed_const_ref                   273 ns          270 ns      2488889
RandFloatStrs/double_from_string_std_from_chars                           193 ns          195 ns      3446154
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_ref              272 ns          273 ns      2635294
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_const_ref        276 ns          273 ns      2635294
RandFloats/string_from_double_sstream                                    1311 ns         1318 ns       497778
RandFloats/string_from_double_sstream_cached                             1076 ns         1050 ns       640000
RandFloats/string_from_double_snprintf                                    601 ns          600 ns      1120000
RandFloats/string_from_double_snprintf_fixed                              600 ns          600 ns      1120000
RandFloats/string_from_double_std_to_chars                                117 ns          117 ns      5600000
RandFloatsComma/string_from_double_snprintf_fixed_comma                   600 ns          600 ns      1120000
2020-03-01 22:01:14 +13:00
Adam Hooper ac18fc6dde Parse inlineStr values
inlineStr XML structure is <c><is><t>. This was being parsed incorrectly
when streaming (because has_value wasn't being set to true) and when
reading the whole file (because the <t> was ignored).

[closes #445]
2020-02-25 14:32:14 -05:00
Thomas Fussell e8ee585897
bump copyright year to 2020 2020-02-08 12:12:59 -05:00
Thomas Fussell 39503e8bf0 fix warnings and other minor issues 2019-12-26 12:52:14 -05:00
Thomas Fussell a560756b35 use clang-format, fix some small warnings 2019-12-26 12:03:12 -05:00
JCrawfy f2ad495326 resolve warnings, remove failing test (CI doesn't know what locale "de-DE" is?) 2019-11-18 21:45:46 +13:00
JCrawfy 97841413fa fixed more parsing errors, added test for ',' locale serialisation (it fails...) 2019-11-18 21:12:21 +13:00
JCrawfy 2eb88c23d6 move numeric utils into the public headers
resolves #398
2019-11-18 19:25:02 +13:00
Thomas Fussell 5791ca80bf
Merge pull request #396 from apthorpe/master
Added CTest support
2019-07-23 08:17:23 -04:00
Bob Apthorpe bd84c7f576 Added CTest support 2019-07-17 12:09:07 -05:00
Thomas Fussell 90b672cf6b Merge branch 'Issue#318_fp-equality' of https://github.com/Crzyrndm/xlnt into Crzyrndm-Issue#318_fp-equality 2019-07-06 14:20:53 -04:00
Thomas Fussell 40baecdf02 Merge branch 'images' of https://github.com/kostasdizas/xlnt into kostasdizas-images 2019-07-06 14:02:24 -04:00
Thomas Fussell 123ecc95fe
Merge branch 'dev' into issue378-unicode_title 2019-06-22 10:54:20 -04:00
Thomas Fussell 1c22e9781e
Merge pull request #364 from kostasdizas/phonetics
Added support for phonetic fields
2019-06-22 10:53:09 -04:00
Thomas Fussell b6455ff6d1
Merge pull request #356 from kostasdizas/issue353
Fixed block calculation in xlsx_producer
2019-06-22 10:52:14 -04:00
Thomas Fussell f54a150589
Merge branch 'dev' into phonetics 2019-06-22 10:51:30 -04:00
Thomas Fussell e11188ccd1
Merge branch 'dev' into issue378-unicode_title 2019-06-22 10:48:35 -04:00
Thomas Fussell b1a2f6d0bf
Merge pull request #382 from kostasdizas/issue374-format
Update the format elements when setting the cell style
2019-06-22 10:43:41 -04:00
Thomas Fussell 595397994f
Merge pull request #359 from kostasdizas/issue254
Corrected the calculation and formatting of weekdays
2019-06-21 17:52:14 -04:00