📊 Cross-platform user-friendly xlsx library for C++11+
Go to file
JCrawfy 7ba36b5e73 fix dumb bug in input randomiser, add basic double->string benchmarks
* input randomiser was feeding a constant value previously, now actually randomising
* start to_string with the current method (sstream), an faster more correct version (sstream_cached), snprintf, and std::to_chars
** NOTE: only std::to_chars and sstream_cached are correct in the face of locales

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                                 1012 ns         1001 ns       640000
RandFloatStrs/double_from_string_strtod                                   276 ns          276 ns      2488889
RandFloatStrs/double_from_string_strtod_fixed                             312 ns          308 ns      2133333
RandFloatStrs/double_from_string_strtod_fixed_const_ref                   307 ns          300 ns      2240000
RandFloatStrs/double_from_string_std_from_chars                           194 ns          188 ns      3733333
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_ref              315 ns          314 ns      2240000
RandFloatCommaStrs/double_from_string_strtod_fixed_comma_const_ref        306 ns          305 ns      2357895
RandFloats/string_from_double_sstream                                    1372 ns         1381 ns       497778
RandFloats/string_from_double_sstream_cached                             1136 ns         1123 ns       640000
RandFloats/string_from_double_snprintf                                    536 ns          516 ns      1000000
RandFloats/string_from_double_std_to_chars                                116 ns          115 ns      6400000
2020-02-29 22:59:25 +13:00
benchmarks fix dumb bug in input randomiser, add basic double->string benchmarks 2020-02-29 22:59:25 +13:00
cmake Export xlnt::xlnt target when installed. 2018-08-07 09:08:29 -04:00
docs generate man page from docs 2017-09-08 17:00:11 -04:00
include/xlnt bump copyright year to 2020 2020-02-08 12:12:59 -05:00
logo fix logo 2017-04-12 10:33:40 -04:00
python copyright year bump (2018) 2018-01-22 09:38:48 -05:00
samples Run documentation samples on Appveyor 2018-07-28 17:59:11 +12:00
source Parse inlineStr values 2020-02-25 14:32:14 -05:00
tests Parse inlineStr values 2020-02-25 14:32:14 -05:00
third-party update utfcpp to 3.1 2019-12-26 12:51:52 -05:00
.appveyor.yml Actually build samples + benchmarks on appveyor 2018-07-28 18:13:56 +12:00
.clang-format clang-format all source files, fix broken test helpers--lots of cleanup necessary as a result [ci skip] 2016-12-24 10:04:57 -05:00
.gitattributes clean up gitattributes 2016-11-09 17:24:47 -05:00
.gitignore clean up cmake files and add d suffix to xlnt debug library, closes #214 2017-09-08 14:33:18 -04:00
.gitmodules use externalproject instead of git submodules for dependencies 2017-03-02 08:41:17 -05:00
.travis.yml Add GCC 5 to the build matrix, update comments about what each build is 2018-09-15 19:44:19 +12:00
AUTHORS.md Adding tpmccallum 2017-05-04 11:59:33 +10:00
book.json generate man page from docs 2017-09-08 17:00:11 -04:00
CHANGELOG.md start working on documentation [ci skip] 2017-04-12 10:17:26 -04:00
CMakeLists.txt Added CTest support 2019-07-17 12:09:07 -05:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-09-08 23:09:35 -04:00
CONTRIBUTING.md Clarify how to contribute to the project 2016-09-07 18:36:36 -04:00
LICENSE.md copyright year bump (2018) 2018-01-22 09:38:48 -05:00
README.md fix gitbook link/badge (point to legacy for now) 2018-07-22 22:23:01 -04:00
SUMMARY.md start working on documentation [ci skip] 2017-04-12 10:17:26 -04:00

xlnt logo

Travis Build Status AppVeyor Build status Coverage Status Documentation Status License

Introduction

xlnt is a modern C++ library for manipulating spreadsheets in memory and reading/writing them from/to XLSX files as described in ECMA 376 4th edition. The first public release of xlnt version 1.0 was on May 10th, 2017. Current work is focused on increasing compatibility, improving performance, and brainstorming future development goals. For a high-level summary of what you can do with this library, see the feature list. Contributions are welcome in the form of pull requests or discussions on the repository's Issues page.

Example

Including xlnt in your project, creating a new spreadsheet, and saving it as "example.xlsx"

#include <xlnt/xlnt.hpp>

int main()
{
    xlnt::workbook wb;
    xlnt::worksheet ws = wb.active_sheet();
    ws.cell("A1").value(5);
    ws.cell("B2").value("string data");
    ws.cell("C3").formula("=RAND()");
    ws.merge_cells("C3:C4");
    ws.freeze_panes("B2");
    wb.save("example.xlsx");
    return 0;
}
// compile with -std=c++14 -Ixlnt/include -lxlnt

Documentation

Documentation for the current release of xlnt is available here.

License

xlnt is released to the public for free under the terms of the MIT License. See LICENSE.md for the full text of the license and the licenses of xlnt's third-party dependencies. LICENSE.md should be distributed alongside any assemblies that use xlnt in source or compiled form.