cdb50bbd6b
Otherwise, XLNT_INCLUDE_INSTALL_DIR is not set correctly and find_package(Xlnt) results to an error: ``` CMake Error at /usr/lib64/cmake/xlnt/XlntConfig.cmake:23 (message): File or directory include referenced by variable XLNT_INCLUDE_DIR does not exist ! Call Stack (most recent call first): /usr/lib64/cmake/xlnt/XlntConfig.cmake:41 (set_and_check) CMakeLists.txt:4 (find_package) ``` The content of the line 41 of /usr/lib64/cmake/xlnt/XlntConfig.cmake is: `set_and_check(XLNT_INCLUDE_DIR "include")`. I'm using the Arch Linux user repository package https://aur.archlinux.org/packages/xlnt/. The used build manual is described here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=xlnt. |
||
---|---|---|
benchmarks | ||
cmake | ||
docs | ||
include/xlnt | ||
logo | ||
python | ||
samples | ||
source | ||
tests | ||
third-party | ||
.appveyor.yml | ||
.clang-format | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.release-it.json | ||
.travis.yml | ||
AUTHORS.md | ||
book.json | ||
CHANGELOG.md | ||
CMakeLists.txt | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE.md | ||
package-lock.json | ||
package.json | ||
README.md | ||
SUMMARY.md |
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.