pax_global_header 0000666 0000000 0000000 00000000064 14353601326 0014515 g ustar 00root root 0000000 0000000 52 comment=fc06b59d5bd5ee62afe820083d73b02ee29b2842
libxlsxwriter-RELEASE_1.1.5/ 0000775 0000000 0000000 00000000000 14353601326 0015603 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/.github/ 0000775 0000000 0000000 00000000000 14353601326 0017143 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/.github/FUNDING.yml 0000664 0000000 0000000 00000000041 14353601326 0020753 0 ustar 00root root 0000000 0000000 custom: ["paypal.me/xlsxwriter"]
libxlsxwriter-RELEASE_1.1.5/.github/ISSUE_TEMPLATE.md 0000664 0000000 0000000 00000004375 14353601326 0021661 0 ustar 00root root 0000000 0000000 # libxlsxwriter: Reporting Bugs
Here are some tips on reporting bugs in `libxlsxwriter`.
### Upgrade to the latest version of the library
Upgrade to the latest version of the library since the bug you are reporting
may already be fixed.
Check the [Changes][changes] section of the documentation to see what has
changed in the latest versions.
[changes]: http://libxlsxwriter.github.io/changes.html
You can check which version of `libxlsxwriter` that you are using by checking
the `xlsxwriter.h` header file or by adding the following to your program:
```C
#include
#include "xlsxwriter.h"
int main() {
printf("Libxlsxwriter version = %s\n", lxw_version());
return 0;
}
```
### Read the documentation
Read or search the `libxlsxwriter` [documentation][docs] to see if the issue
you are encountering is already explained.
[docs]: http://libxlsxwriter.github.io/index.html
### Look at the example programs
There are many [examples programs][examples] in the distribution. Try to
identify an example program that corresponds to your query and adapt it to use
as a bug report.
[examples]: http://libxlsxwriter.github.io/examples.html
### Tips for submitting a bug report
1. Describe the problem as clearly and as concisely as possible.
2. Include a sample program. This is probably the most important step.
It is generally easier to describe a problem in code than in written
prose.
3. The sample program should be as small as possible to demonstrate the
problem. Don't copy and paste large non-relevant sections of your
program.
A sample bug report is shown below. This format helps analyze and respond to
the bug report more quickly.
> Subject: Issue with SOMETHING
>
> Greetings,
>
> I am using libxlsxwriter to do SOMETHING but it appears to do SOMETHING ELSE.
>
> I am using CC version X.Y.Z, OS = uname and libxlsxwriter x.y.z.
>
> Here is some code that demonstrates the problem:
>
>
>```C
>#include "xlsxwriter.h"
>
>int main() {
>
> lxw_workbook *workbook = workbook_new("bug_report.xlsx");
> lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
>
> worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
> worksheet_write_number(worksheet, 1, 0, 123, NULL);
>
> return workbook_close(workbook);
>}
>```
>
libxlsxwriter-RELEASE_1.1.5/.github/PULL_REQUEST_TEMPLATE.md 0000664 0000000 0000000 00000006754 14353601326 0022760 0 ustar 00root root 0000000 0000000 # libxlsxwriter: Submitting Pull Requests
# Pull Requests and Contributing to Libxlsxwriter
All patches and pull requests are welcome but in general you should start with
an issue tracker to describe what you intend to do before you do it.
### Getting Started
1. Pull requests and new feature proposals must start with an [issue
tracker][issues]. This serves as the focal point for the design discussion.
2. Describe what you plan to do. If there are API changes add some code
example to demonstrate them.
3. Fork the repository.
4. Run all the tests to make sure the current code works on your system using
`make test`. See the [Running the Test Suite][tests] section of the docs
for instructions.
5. Create a feature branch for your new feature.
[tests]: http://libxlsxwriter.github.io/running_the_tests.html
### Code Style
The code style is mainly K&R style with 4 space indents.
The author uses GNU indent (`gindent`) 2.2.10 with the following options:
```
--braces-on-if-line
--braces-on-struct-decl-line
--case-indentation 4
--continue-at-parentheses
--declaration-comment-column 0
--format-first-column-comments
--honour-newlines
--ignore-profile
--indent-label 0
--indent-level 4
--no-space-after-function-call-names
--no-tabs
--swallow-optional-blank-lines
```
The [indent configuration file][indentpro] is available in the repo. The code
can be indented automatically if the same version of `gindent` is used with
the following make command:
```shell
make indent
```
Note, make sure you have backed up your files or added them to the index
before running this command.
In general follow the existing style in the code.
[indentpro]: https://github.com/jmcnamara/libxlsxwriter/blob/master/.indent.pro
### Writing and Running Tests
Any significant features should be accompanied by a test. See the `test`
directory and the [Running the Test Suite][tests] section of the docs for
details of the test setup.
The tests can be run as follows:
```shell
make test
```
Same as:
```shell
make test_unit
make test_functional
```
The functional tests require the Python module [pytest][pytest] as a test runner.
If you have `valgrind` installed you can use the test suite to check for memory leaks:
```shell
make test_valgrind
```
When you push your changes they will also be tested automatically using
[GitHub Actions][actions].
[actions]: https://github.com/jmcnamara/libxlsxwriter/actions
[pytest]: http://pytest.org/
### Documentation
The `libxlsxwriter` documentation is written in Doxygen format in the header
files and in additional `.dox` files in the `docs/src` directory of the
repo. The documentation can be built as follows:
```shell
make docs
open docs/html/index.html
```
### Example programs
If applicable add an example program to the `examples` directory. Example
files can be built using:
```shell
make docs
```
### Copyright and License
Copyright remains with the original author. Do not include additional
copyright claims or Licensing requirements. GitHub and the `git` repository
will record your contribution and it will be acknowledged it in the Changes
file.
### Submitting the Pull Request
If your change involves several incremental `git` commits then `rebase` or
`squash` them onto another branch so that the Pull Request is a single commit
or a small number of logical commits.
Push your changes to GitHub and submit the Pull Request with a hash link to
the to the Issue tracker that was opened above.
libxlsxwriter-RELEASE_1.1.5/.github/workflows/ 0000775 0000000 0000000 00000000000 14353601326 0021200 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/.github/workflows/cmake_actions.yml 0000664 0000000 0000000 00000002742 14353601326 0024530 0 ustar 00root root 0000000 0000000 name: Build with CMake
on: [push, pull_request]
jobs:
build:
name:
Cmake
strategy:
matrix:
cc: [gcc, clang]
cmake_flags: ["",
"-DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON",
"-DUSE_DTOA_LIBRARY=ON -DBUILD_TESTS=ON",
"-DUSE_MEM_FILE=ON -DBUILD_TESTS=ON",
"-DUSE_NO_MD5=ON -DBUILD_TESTS=ON",
"-DUSE_OPENSSL_MD5=ON -DBUILD_TESTS=ON",
"-DUSE_STANDARD_TMPFILE=ON -DBUILD_TESTS=ON",
"-DUSE_SYSTEM_MINIZIP=ON -DBUILD_TESTS=ON",
"-DUSE_SYSTEM_MINIZIP=ON -DUSE_OPENSSL_MD5=ON -DBUILD_TESTS=ON"]
runs-on: ubuntu-latest
env:
CC: ${{ matrix.cc }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
sudo apt-get -y install zlib1g-dev
sudo apt-get -y install libminizip-dev
sudo apt-get -y install libssl-dev
- name: Configure CMake
working-directory: ${{ github.workspace }}/cmake
run: cmake .. -DBUILD_TESTS=ON ${{ matrix.cmake_flags }} -DCMAKE_BUILD_TYPE=Release
- name: Build
working-directory: ${{ github.workspace }}/cmake
run: cmake --build . --config Release --parallel
- name: Test
working-directory: ${{ github.workspace }}/cmake
run: ctest -C Release -V
libxlsxwriter-RELEASE_1.1.5/.github/workflows/code_style.yml 0000664 0000000 0000000 00000000634 14353601326 0024060 0 ustar 00root root 0000000 0000000 name: Check code style
on: [push, pull_request]
jobs:
build:
name:
Check code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get -y install indent
sudo ln -s /usr/bin/indent /usr/bin/gindent
- name: Make indent
run: |
make indent
git status | grep 'nothing to commit'
libxlsxwriter-RELEASE_1.1.5/.github/workflows/coverity.yml 0000664 0000000 0000000 00000000726 14353601326 0023574 0 ustar 00root root 0000000 0000000 name: Coverity Scan
on:
push:
branches: [coverity]
jobs:
coverity:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build third party libs to exclude them from scan
run: make third_party
- uses: vapier/coverity-scan-action@v1
with:
project: libxlsxwriter
email: ${{ secrets.COVERITY_SCAN_EMAIL }}
token: ${{ secrets.COVERITY_SCAN_TOKEN }}
command: make -C src libxlsxwriter.a
libxlsxwriter-RELEASE_1.1.5/.github/workflows/make_actions.yml 0000664 0000000 0000000 00000002371 14353601326 0024363 0 ustar 00root root 0000000 0000000 name: Build with Make
on: [push, pull_request]
jobs:
build:
name:
Make
strategy:
matrix:
cc: [gcc, clang]
make_flags: ["",
"USE_STANDARD_TMPFILE=1",
"USE_SYSTEM_MINIZIP=1",
"USE_DTOA_LIBRARY=1",
"USE_NO_MD5=1",
"USE_OPENSSL_MD5=1",
"USE_MEM_FILE=1"]
runs-on: ubuntu-latest
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cc }}
CFLAGS: '-Werror'
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
sudo apt-get -y install zlib1g-dev
sudo apt-get -y install libminizip-dev
sudo apt-get -y install libssl-dev
sudo apt-get -y install valgrind
- name: make
run: ${{ matrix.make_flags }} make V=1
- name: test unit
run: ${{ matrix.make_flags }} make test_unit V=1
- name: test functional
run: ${{ matrix.make_flags }} make test_functional V=1 -j
- name: test cpp
run: ${{ matrix.make_flags }} make test_cpp V=1
- name: test examples
run: ${{ matrix.make_flags }} make examples V=1
libxlsxwriter-RELEASE_1.1.5/.github/workflows/valgrind.yml 0000664 0000000 0000000 00000000602 14353601326 0023527 0 ustar 00root root 0000000 0000000 name: Test for memory leaks
on: [push, pull_request]
jobs:
build:
name:
Valgrind
runs-on: ubuntu-latest
env:
CC: gcc
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get -y install valgrind
sudo apt-get -y install zlib1g-dev
- name: test valgrind
run: make test_valgrind V=1 -j 2
libxlsxwriter-RELEASE_1.1.5/.github/workflows/windows_build.yml 0000664 0000000 0000000 00000003220 14353601326 0024571 0 ustar 00root root 0000000 0000000 name: Cmake on Windows
on: [push, pull_request]
jobs:
build:
name: CMake on Windows
strategy:
matrix:
cmake_flags: ["-DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON",
"-DUSE_DTOA_LIBRARY=ON -DBUILD_TESTS=ON",
"-DUSE_OPENSSL_MD5=ON -DBUILD_TESTS=ON",
"-DUSE_SYSTEM_MINIZIP=ON -DBUILD_TESTS=ON",
"-DUSE_SYSTEM_MINIZIP=ON -DUSE_OPENSSL_MD5=ON -DBUILD_TESTS=ON"]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
vcpkg.exe install zlib:x64-windows minizip:x64-windows openssl:x64-windows
vcpkg.exe integrate install
pip install pytest
- name: Configure CMake
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
cd cmake
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake .. -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_flags }} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -A x64
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
cd cmake
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config Release
- name: Test
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
cd cmake
copy test\functional\src\Release\*.exe test\functional\src
pytest -v test/functional
libxlsxwriter-RELEASE_1.1.5/.gitignore 0000664 0000000 0000000 00000001502 14353601326 0017571 0 ustar 00root root 0000000 0000000 *.a
*.o
*.so
*.so.*
*.to
*.lo
*.la
*.dylib
*.dll
*.gcno
*.gcda
test_*
!test_*.c
!test_*.cpp
!test_*.py
*.tar.gz
*~
TAGS
.#*
*#
~*xlsx
*.xlsx
*.bak
!test/functional/xlsx_files/*.xlsx
*.pyc
.pytest_cache/
.cproject
.project
.pydevproject
.settings/
.DS_Store
__pycache__
.cache
docs/html
docs/latex
.deps
.dirstamp
_temp.c
examples/*
!examples/*.c
!examples/*.png
!examples/Makefile
!examples/vbaProject.bin
cov-int
libxlsxwriter-coverity.tgz
build
third_party/zlib-1.2.8/configure.log
third_party/zlib-1.2.8/contrib/minizip/miniunz
third_party/zlib-1.2.8/contrib/minizip/minizip
third_party/zlib-1.2.8/example
third_party/zlib-1.2.8/examplesh
third_party/zlib-1.2.8/minigzip
third_party/zlib-1.2.8/minigzipsh
third_party/zlib-1.2.8/zlib.pc
cmake
!cmake/FindMINIZIP.cmake
!cmake/FindPackage.cmake
!cmake/i686-toolchain.cmake
.vscode
libxlsxwriter-RELEASE_1.1.5/.indent.pro 0000664 0000000 0000000 00000006172 14353601326 0017672 0 ustar 00root root 0000000 0000000 /*
* Indent rules for libxlsxwriter.
*
* The rules for user defined typedefs can be update as follows:
*
perl -i -pe 'print and last if /[l]ibxlsxwriter typedefs/' .indent.pro
ack -h typedef include/xlsxwriter/*.h src/*.c | perl -lne 'print "-T $1" if /\w+\s+\w+\s+(\w+)/' | sort >> .indent.pro
*
*/
/* Command line options used with GNU indent 2.2.10 */
--braces-on-if-line
--braces-on-struct-decl-line
--case-indentation 4
--continue-at-parentheses
--declaration-comment-column 0
--format-first-column-comments
--honour-newlines
--ignore-profile
--indent-label 0
--indent-level 4
--no-space-after-function-call-names
--no-tabs
--swallow-optional-blank-lines
/* Typedefs used in the code. */
-T int8_t
-T int16_t
-T int32_t
-T int64_t
-T uint8_t
-T uint16_t
-T uint32_t
-T uint64_t
-T ssize_t
-T size_t
-T time_t
-T LIST_ENTRY
-T RB_ENTRY
-T SLIST_ENTRY
-T STAILQ_ENTRY
-T TAILQ_ENTRY
/* libxlsxwriter typedefs. */
-T lxw_app
-T lxw_author_id
-T lxw_autofilter
-T lxw_border
-T lxw_button_options
-T lxw_cell
-T lxw_chart
-T lxw_chart_axis
-T lxw_chart_axis_display_unit
-T lxw_chart_axis_label_alignment
-T lxw_chart_axis_label_position
-T lxw_chart_axis_tick_mark
-T lxw_chart_axis_tick_position
-T lxw_chart_axis_type
-T lxw_chart_blank
-T lxw_chart_custom_label
-T lxw_chart_data_label
-T lxw_chart_error_bar_axis
-T lxw_chart_error_bar_cap
-T lxw_chart_error_bar_direction
-T lxw_chart_error_bar_type
-T lxw_chart_fill
-T lxw_chart_font
-T lxw_chart_gridline
-T lxw_chart_label_position
-T lxw_chart_label_separator
-T lxw_chart_legend
-T lxw_chart_legend_position
-T lxw_chart_line
-T lxw_chart_line_dash_type
-T lxw_chart_marker
-T lxw_chart_marker_type
-T lxw_chart_options
-T lxw_chart_pattern
-T lxw_chart_pattern_type
-T lxw_chart_point
-T lxw_chart_series
-T lxw_chart_title
-T lxw_chart_trendline_type
-T lxw_chart_type
-T lxw_chartsheet
-T lxw_chartsheet_name
-T lxw_col_options
-T lxw_col_t
-T lxw_color_t
-T lxw_comment
-T lxw_comment_options
-T lxw_cond_format_hash_element
-T lxw_cond_format_obj
-T lxw_conditional_format
-T lxw_content_types
-T lxw_core
-T lxw_custom
-T lxw_custom_property
-T lxw_data_val_obj
-T lxw_data_validation
-T lxw_datetime
-T lxw_defined_name
-T lxw_doc_properties
-T lxw_drawing
-T lxw_drawing_coords
-T lxw_drawing_object
-T lxw_drawing_rel_id
-T lxw_error
-T lxw_fill
-T lxw_filter_rule
-T lxw_filter_rule_obj
-T lxw_font
-T lxw_format
-T lxw_hash_element
-T lxw_hash_table
-T lxw_header_footer_options
-T lxw_heading_pair
-T lxw_image_md5
-T lxw_image_options
-T lxw_merged_range
-T lxw_metadata
-T lxw_object_properties
-T lxw_packager
-T lxw_panes
-T lxw_part_name
-T lxw_print_area
-T lxw_protection
-T lxw_protection_obj
-T lxw_rel_tuple
-T lxw_relationships
-T lxw_repeat_cols
-T lxw_repeat_rows
-T lxw_rich_string_tuple
-T lxw_row
-T lxw_row_col_options
-T lxw_row_t
-T lxw_selection
-T lxw_series_data_point
-T lxw_series_error_bars
-T lxw_series_range
-T lxw_sheet
-T lxw_sst
-T lxw_styles
-T lxw_table
-T lxw_table_column
-T lxw_table_obj
-T lxw_table_options
-T lxw_theme
-T lxw_tuple
-T lxw_vml
-T lxw_vml_obj
-T lxw_workbook
-T lxw_workbook_options
-T lxw_worksheet
-T lxw_worksheet_init_data
-T lxw_worksheet_name
libxlsxwriter-RELEASE_1.1.5/CMakeLists.txt 0000664 0000000 0000000 00000034760 14353601326 0020355 0 ustar 00root root 0000000 0000000 # :copyright: (c) 2017 Alex Huszagh.
# :license: FreeBSD, see LICENSE.txt for more details.
# Description
# ===========
#
# Use:
# Move to a custom directory, ideally out of source, and
# type `cmake $LXW_SOURCE $FLAGS`, where `LXW_SOURCE` is the
# path to the libxlsxwriter project, and `FLAGS` are custom
# flags to pass to the compiler.
#
# Example:
# For example, in the project directory, to build libxlsxwriter
# and the unittests in release mode, type:
# mkdir build && cd build
# cmake .. -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
# cmake --build . --config Release
# ctest -C Release -V
# cmake --build . --config Release --target install
#
# If using a Makefile generator, you may use the simpler
# mkdir build && cd build
# cmake .. -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
# make
# make test
# make install
#
# Flags:
# ZLIB_ROOT
# The ZLIB root directory can be specified either through
# an environment variable (`export ZLIB_ROOT=/usr/include`)
# or using a flag with CMake (`-DZLIB_ROOT:STRING=/usr/include`).
# This sets the preferred search path for the ZLIB installation.
#
# BUILD_TESTS
# Build unittests (default off). To build the unittests,
# pass `-DBUILD_TESTS=ON` during configuration.
#
# BUILD_EXAMPLES
# Build example files (default off). To build the examples,
# pass `-DBUILD_EXAMPLES=ON` during configuration.
#
# USE_STANDARD_TMPFILE
# Use the standard tmpfile() function (default off). To enable
# the standard tmpfile, pass `-DUSE_STANDARD_TMPFILE=ON`
# during configuration. This may produce bugs while cross-
# compiling or using MinGW/MSYS.
#
# USE_DTOA_LIBRARY
# Use the third party emyg_dtoa() library (default off). The
# emyg_dtoa() library is used to avoid sprintf double issues with
# different locale settings. To enable this library, pass
# `-DUSE_DTOA_LIBRARY=ON` during configuration.
#
# USE_NO_MD5
# Compile without third party MD5 support. This will turn off the
# functionality of avoiding duplicate image files in the output xlsx
# file. To enable this option pass `-DUSE_NO_MD5=ON` during
# configuration.
#
# USE_OPENSSL_MD5 Compile with OpenSSL MD5 support. This will link
# against libcrypto for MD5 support rather than using the local MD5
# support. MD5 support is required to avoid duplicate image files in
# the output xlsx file. To enable this option pass
# `-DUSE_OPENSSL_MD5=ON` during configuration.
#
# USE_STATIC_MSVC_RUNTIME
# Use the static msvc runtime library when compiling with msvc (default off)
# To enable, pass `-DUSE_STATIC_MSVC_RUNTIME` during configuration.
#
# Toolchains:
# On multiarch Linux systems, which can build and run multiple
# binary targets on the same system, we include an `i686-toolchain`
# file to enable building i686 (x86 32-bit) targets on x86_64 systems.
# To use the i686 toolchain, pass the `-DCMAKE_TOOLCHAIN_FILE` option
# during CMake configuration. For example, from the build directory,
# you would use:
# cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/i686-toolchain.cmake
#
# CMake Options:
# CMake sets debug and release builds with the `CMAKE_BUILD_TYPE`
# option, which can be set as a flag during configuration.
# To build in release mode, pass `-DCMAKE_BUILD_TYPE=Release`
# during configuration.
#
# CMake sets the creation of static and shared libraries with the
# `BUILD_SHARED_LIBS` option, which can be set as a flag during
# configuration. To build a static library, pass
# `-DBUILD_SHARED_LIBS=OFF` during configuration.
#
# Generators:
# CMake also supports custom build generators, such as MakeFiles,
# Ninja, Visual Studio, and XCode. For example, to generate
# a Visual Studio solution, configure with:
# cmake .. -G "Visual Studio 14 2015 Win64"
#
# For more information on using generators, see:
# https://cmake.org/cmake/help/v3.0/manual/cmake-generators.7.html
#
set(CMAKE_LEGACY_CYGWIN_WIN32 1)
if(MSVC)
cmake_minimum_required(VERSION 3.4)
else()
cmake_minimum_required(VERSION 3.1)
endif()
SET(XLSX_PROJECT_NAME "xlsxwriter" CACHE STRING "Optional project and binary name")
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
project(${XLSX_PROJECT_NAME} C)
enable_testing()
# POLICY
# ------
# The use of the word ZLIB_ROOT should still work prior to "3.12.0",
# just it's been generalized for all packages now. Just set the policy
# to new, so we use it, and it will be used prior to 3.12 anyway.
if(${CMAKE_VERSION} VERSION_GREATER "3.12" OR ${CMAKE_VERSION} VERSION_EQUAL "3.12")
cmake_policy(SET CMP0074 NEW)
endif()
# OPTIONS
# -------
SET(ZLIB_ROOT "" CACHE STRING "Optional root for the ZLIB installation")
option(BUILD_TESTS "Build libxlsxwriter tests" OFF)
option(BUILD_EXAMPLES "Build libxlsxwriter examples" OFF)
option(USE_SYSTEM_MINIZIP "Use system minizip installation" OFF)
option(USE_STANDARD_TMPFILE "Use the C standard library's tmpfile()" OFF)
option(USE_NO_MD5 "Build libxlsxwriter without third party MD5 lib" OFF)
option(USE_OPENSSL_MD5 "Build libxlsxwriter with the OpenSSL MD5 lib" OFF)
option(USE_MEM_FILE "Use fmemopen()/open_memstream() in place of temporary files" OFF)
option(IOAPI_NO_64 "Disable 64-bit filesystem support" OFF)
option(USE_DTOA_LIBRARY "Use the locale independent third party Milo Yip DTOA library" OFF)
if(MSVC)
option(USE_STATIC_MSVC_RUNTIME "Use the static runtime library" OFF)
endif()
if(DEFINED ENV{${ZLIB_ROOT}})
set(ZLIB_ROOT $ENV{ZLIB_ROOT})
endif()
if(IOAPI_NO_64)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS IOAPI_NO_64=1)
endif()
# CONFIGURATIONS
# --------------
if(USE_SYSTEM_MINIZIP)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_SYSTEM_MINIZIP)
endif()
if(USE_STANDARD_TMPFILE)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_STANDARD_TMPFILE)
endif()
if(NOT USE_OPENSSL_MD5 AND USE_NO_MD5)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_NO_MD5)
endif()
if(USE_OPENSSL_MD5)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_OPENSSL_MD5)
if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
endif()
endif()
if(USE_MEM_FILE OR USE_FMEMOPEN)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_FMEMOPEN)
endif()
if(USE_DTOA_LIBRARY)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_DTOA_LIBRARY)
endif()
if(NOT BUILD_SHARED_LIBS)
if(UNIX)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
elseif(MINGW OR MSYS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static -static-libgcc -Wno-char-subscripts -Wno-long-long")
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS USE_FILE32API)
elseif(MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Fd\"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb\"")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Ox /Zi /Fd\"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb\"")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /Zi /Fd\"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb\"")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /Fd\"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.pdb\"")
endif()
endif()
if(MSVC AND USE_STATIC_MSVC_RUNTIME)
foreach(flag_var CMAKE_C_FLAGS
CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${flag_var} MATCHES "/MD")
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endif()
endforeach()
endif()
# Configure pkg-config
file(READ "include/xlsxwriter.h" ver)
string(REGEX MATCH "LXW_VERSION \"([^\"]+)\"" _ ${ver})
set(VERSION ${CMAKE_MATCH_1})
string(REGEX MATCH "LXW_SOVERSION \"([^\"]+)\"" _ ${ver})
set(SOVERSION ${CMAKE_MATCH_1})
set(PREFIX ${CMAKE_INSTALL_PREFIX})
configure_file(dev/release/pkg-config.txt xlsxwriter.pc @ONLY)
# INCLUDES
# --------
enable_language(CXX)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# ZLIB
find_package(ZLIB REQUIRED "1.0")
list(APPEND LXW_PRIVATE_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
message("zlib version: " ${ZLIB_VERSION})
# MINIZIP
if (USE_SYSTEM_MINIZIP)
find_package(MINIZIP REQUIRED "1.0")
list(APPEND LXW_PRIVATE_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIRS})
endif()
# LIBRARY
# -------
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS NOCRYPT NOUNCRYPT)
# Ensure CRT Secure warnings are disabled
if(MSVC)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS _CRT_SECURE_NO_WARNINGS)
endif()
# Ensure "TESTING" macro is defined if building tests
if(BUILD_TESTS)
list(APPEND LXW_PRIVATE_COMPILE_DEFINITIONS TESTING)
endif()
file(GLOB LXW_SOURCES src/*.c)
file(GLOB_RECURSE LXW_HEADERS RELATIVE include *.h)
if(NOT USE_SYSTEM_MINIZIP)
list(APPEND LXW_SOURCES third_party/minizip/ioapi.c third_party/minizip/zip.c)
if(MSVC)
list(APPEND LXW_SOURCES third_party/minizip/iowin32.c)
endif()
endif()
if (NOT USE_STANDARD_TMPFILE)
list(APPEND LXW_SOURCES third_party/tmpfileplus/tmpfileplus.c)
endif()
if(NOT USE_OPENSSL_MD5 AND NOT USE_NO_MD5)
list(APPEND LXW_SOURCES third_party/md5/md5.c)
endif()
if(USE_OPENSSL_MD5)
find_package(OpenSSL REQUIRED)
if(OpenSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
message(STATUS "OpenSSL version: ${OPENSSL_VERSION}")
endif()
endif()
if (USE_DTOA_LIBRARY)
list(APPEND LXW_SOURCES third_party/dtoa/emyg_dtoa.c)
endif()
set(LXW_PROJECT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(LXW_LIB_DIR "${LXW_PROJECT_DIR}/lib")
add_library(${PROJECT_NAME} "")
set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${SOVERSION})
target_sources(${PROJECT_NAME}
PRIVATE ${LXW_SOURCES}
PUBLIC ${LXW_HEADERS}
)
target_link_libraries(${PROJECT_NAME} LINK_PUBLIC ${ZLIB_LIBRARIES} ${MINIZIP_LIBRARIES} ${LIB_CRYPTO} ${OPENSSL_CRYPTO_LIBRARY})
target_compile_definitions(${PROJECT_NAME} PRIVATE ${LXW_PRIVATE_COMPILE_DEFINITIONS})
# /utf-8 needs VS2015 Update 2 or above.
# In CMake 3.7 and above, we can use (MSVC_VERSION GREATER_EQUAL 1900) here.
if(MSVC AND NOT (MSVC_VERSION LESS 1900))
target_compile_options(${PROJECT_NAME} PRIVATE /utf-8)
endif()
if (WINDOWSSTORE)
target_compile_definitions(${PROJECT_NAME} PRIVATE -DIOWIN32_USING_WINRT_API)
endif()
target_include_directories(${PROJECT_NAME}
PRIVATE ${LXW_PRIVATE_INCLUDE_DIRS}
PUBLIC include include/xlsxwriter
)
# TESTS
# -----
# Create test and runner.
#
# Args:
# sources Name of variable holding source files
# target Test name
#
macro(CreateTest sources target)
set(output_name xlsxwriter_${target})
set(dependencies ${output_name})
add_executable(${output_name} ${${sources}})
target_link_libraries(${output_name} ${PROJECT_NAME})
target_compile_definitions(${output_name} PRIVATE TESTING COLOR_OK)
add_test(NAME ${output_name}
COMMAND ${output_name}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endmacro(CreateTest)
file(GLOB LXW_UTILITY_SOURCES test/unit/utility/test*.c)
file(GLOB LXW_XMLWRITER_SOURCES test/unit/xmlwriter/test*.c)
file(GLOB LXW_WORKSHEET_SOURCES test/unit/worksheet/test*.c)
file(GLOB LXW_SST_SOURCES test/unit/sst/test*.c)
file(GLOB LXW_WORKBOOK_SOURCES test/unit/workbook/test*.c)
file(GLOB LXW_APP_SOURCES test/unit/app/test*.c)
file(GLOB LXW_CONTENTTYPES_SOURCES test/unit/content_types/test*.c)
file(GLOB LXW_CORE_SOURCES test/unit/core/test*.c)
file(GLOB LXW_RELATIONSHIPS_SOURCES test/unit/relationships/test*.c)
file(GLOB LXW_FORMAT_SOURCES test/unit/format/test*.c)
file(GLOB LXW_STYLES_SOURCES test/unit/styles/test*.c)
file(GLOB LXW_DRAWING_SOURCES test/unit/drawing/test*.c)
file(GLOB LXW_CHART_SOURCES test/unit/chart/test*.c)
file(GLOB LXW_CUSTOM_SOURCES test/unit/custom/test*.c)
file(GLOB LXW_FUNCTIONAL_SOURCES test/functional/src/*.c)
set(LXW_UNIT_SOURCES
test/unit/test_all.c
${LXW_UTILITY_SOURCES}
${LXW_XMLWRITER_SOURCES}
${LXW_WORKSHEET_SOURCES}
${LXW_SST_SOURCES}
${LXW_WORKBOOK_SOURCES}
${LXW_APP_SOURCES}
${LXW_CONTENTTYPES_SOURCES}
${LXW_CORE_SOURCES}
${LXW_RELATIONSHIPS_SOURCES}
${LXW_FORMAT_SOURCES}
${LXW_STYLES_SOURCES}
${LXW_DRAWING_SOURCES}
${LXW_CHART_SOURCES}
${LXW_CUSTOM_SOURCES}
)
if(BUILD_TESTS)
# unit tests
CreateTest(LXW_UNIT_SOURCES unit)
# functional tests
find_package(Python COMPONENTS Interpreter REQUIRED)
find_program(Pytest_EXECUTABLE NAMES pytest)
if (NOT Pytest_EXECUTABLE)
message("Please install the Python pytest library to run functional tests:")
message(" pip install pytest\n")
endif()
foreach(source ${LXW_FUNCTIONAL_SOURCES})
get_filename_component(basename ${source} NAME_WE)
add_executable(${basename} ${source})
target_link_libraries(${basename} xlsxwriter)
set_target_properties(${basename} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "test/functional/src")
endforeach(source)
add_custom_command(TARGET xlsxwriter_unit POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/test/functional test/functional
)
if(USE_NO_MD5)
add_test(NAME functional
COMMAND pytest -v test/functional -m "not skipif"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
else()
add_test(NAME functional
COMMAND pytest -v test/functional
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
endif()
endif()
# EXAMPLES
# --------
file(GLOB LXW_EXAMPLE_SOURCES examples/*.c)
if(BUILD_EXAMPLES)
foreach(source ${LXW_EXAMPLE_SOURCES})
get_filename_component(basename ${source} NAME_WE)
add_executable(${basename} ${source})
target_link_libraries(${basename} ${PROJECT_NAME})
set_target_properties(${basename} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "examples")
endforeach(source)
endif()
# INSTALL
# -------
include(GNUInstallDirs)
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(FILES include/xlsxwriter.h DESTINATION include)
install(DIRECTORY include/xlsxwriter
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING PATTERN "*.h"
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/xlsxwriter.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
libxlsxwriter-RELEASE_1.1.5/CONTRIBUTING.md 0000664 0000000 0000000 00000013617 14353601326 0020044 0 ustar 00root root 0000000 0000000 # libxlsxwriter: Reporting Bugs and submitting Pull Requests
## Reporting Bugs
Here are some tips on reporting bugs in `libxlsxwriter`.
### Upgrade to the latest version of the library
Upgrade to the latest version of the library since the bug you are reporting
may already be fixed.
Check the [Changes][changes] section of the documentation to see what has
changed in the latest versions.
[changes]: http://libxlsxwriter.github.io/changes.html
You can check which version of `libxlsxwriter` that you are using by checking
the `xlsxwriter.h` header file or by adding the following to your program:
```C
#include
#include "xlsxwriter.h"
int main() {
printf("Libxlsxwriter version = %s\n", lxw_version());
return 0;
}
```
### Read the documentation
Read or search the `libxlsxwriter` [documentation][docs] to see if the issue
you are encountering is already explained.
[docs]: http://libxlsxwriter.github.io/index.html
### Look at the example programs
There are many [examples programs][examples] in the distribution. Try to
identify an example program that corresponds to your query and adapt it to use
as a bug report.
[examples]: http://libxlsxwriter.github.io/examples.html
### Use the xlsxwriter Issue Tracker
The [libxlsxwriter issue tracker][issues] is on GitHub.
[issues]: https://github.com/jmcnamara/libxlsxwriter/issues
### Tips for submitting a bug report
1. Describe the problem as clearly and as concisely as possible.
2. Include a sample program. This is probably the most important step.
It is generally easier to describe a problem in code than in written
prose.
3. The sample program should be as small as possible to demonstrate the
problem. Don't copy and paste large non-relevant sections of your
program.
A sample bug report is shown below. This format helps analyze and respond to
the bug report more quickly.
> Subject: Issue with SOMETHING
>
> Greetings,
>
> I am using libxlsxwriter to do SOMETHING but it appears to do SOMETHING ELSE.
>
> I am using CC version X.Y.Z, OS = uname and libxlsxwriter x.y.z.
>
> Here is some code that demonstrates the problem:
>
>
>```C
>#include "xlsxwriter.h"
>
>int main() {
>
> lxw_workbook *workbook = workbook_new("bug_report.xlsx");
> lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
>
> worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
> worksheet_write_number(worksheet, 1, 0, 123, NULL);
>
> return workbook_close(workbook);
>}
>```
>
# Pull Requests and Contributing to Libxlsxwriter
All patches and pull requests are welcome but in general you should start with
an issue tracker to describe what you intend to do before you do it.
### Getting Started
1. Pull requests and new feature proposals must start with an [issue
tracker][issues]. This serves as the focal point for the design discussion.
2. Describe what you plan to do. If there are API changes add some code
example to demonstrate them.
3. Fork the repository.
4. Run all the tests to make sure the current code works on your system using
`make test`. See the [Running the Test Suite][tests] section of the docs
for instructions.
5. Create a feature branch for your new feature.
[tests]: http://libxlsxwriter.github.io/running_the_tests.html
### Code Style
The code style is mainly K&R style with 4 space indents.
The author uses GNU indent (`gindent`) 2.2.10 with the following options:
```
--braces-on-if-line
--braces-on-struct-decl-line
--case-indentation 4
--continue-at-parentheses
--declaration-comment-column 0
--format-first-column-comments
--honour-newlines
--ignore-profile
--indent-label 0
--indent-level 4
--no-space-after-function-call-names
--no-tabs
--swallow-optional-blank-lines
```
The [indent configuration file][indentpro] is available in the repo. The code
can be indented automatically if the same version of `gindent` is used with
the following make command:
```shell
make indent
```
Note, make sure you have backed up your files or added them to the index
before running this command.
In general follow the existing style in the code.
[indentpro]: https://github.com/jmcnamara/libxlsxwriter/blob/master/.indent.pro
### Writing and Running Tests
Any significant features should be accompanied by a test. See the `test`
directory and the [Running the Test Suite][tests] section of the docs for
details of the test setup.
The tests can be run as follows:
```shell
make test
```
Same as:
```shell
make test_unit
make test_functional
```
The functional tests require the Python module [pytest][pytest] as a test runner.
If you have `valgrind` installed you can use the test suite to check for memory leaks:
```shell
make test_valgrind
```
When you push your changes they will also be tested automatically using
[GitHub Actions][actions].
[actions]: https://github.com/jmcnamara/libxlsxwriter/actions
[pytest]: http://pytest.org/
### Documentation
The `libxlsxwriter` documentation is written in Doxygen format in the header
files and in additional `.dox` files in the `docs/src` directory of the
repo. The documentation can be built as follows:
```shell
make docs
open docs/html/index.html
```
### Example programs
If applicable add an example program to the `examples` directory. Example
files can be built using:
```shell
make docs
```
### Copyright and License
Copyright remains with the original author. Do not include additional
copyright claims or Licensing requirements. GitHub and the `git` repository
will record your contribution and it will be acknowledged it in the Changes
file.
### Submitting the Pull Request
If your change involves several incremental `git` commits then `rebase` or
`squash` them onto another branch so that the Pull Request is a single commit
or a small number of logical commits.
Push your changes to GitHub and submit the Pull Request with a hash link to
the to the Issue tracker that was opened above.
libxlsxwriter-RELEASE_1.1.5/Changes.txt 0000664 0000000 0000000 00000071342 14353601326 0017723 0 ustar 00root root 0000000 0000000 /**
@page changes Changes
## 1.1.5 December 30 2022
- Added support for writing a workbook to a memory buffer instead of to a file
via the `output_buffer` parameter of @ref workbook_new_opt(). See also
@ref output_buffer.c.
- Add support for using in-memory data instead of temporary files on systems where
`fmemopen()` and `open_memstream()` are supported. This requires the `USE_MEM_FILE`
compilation option.
## 1.1.4 October 9 2021
- Added support for Worksheet tables. Tables in Excel are a way of grouping a
range of cells into a single entity that has common formatting or that can
be referenced from formulas. Tables can have column headers, autofilters,
total rows, column formulas and default formatting. See @ref
working_with_tables and @ref tables.c.
- Added support for adding a macro button to a worksheet. See @ref macro.c.
## 1.1.3 August 9 2021
- Changed worksheet_filter_column2() parameter name "operator" to "and_or" to
avoid a conflict with the C++ reserved keyword.
## 1.1.2 August 8 2021
- Added support for autofilter rules. See @ref working_with_autofilters and
@ref autofilter.c.
Feature request [#254][gh_254].
[gh_254]: https://github.com/jmcnamara/libxlsxwriter/issues/254
- Added Description/Alt Text and Decorative accessibility options for
charts. These options were already available for images.
## 1.1.1 July 12 2021
- Added optional third party library to handle sprintf handling of
doubles. This is to avoid issues with number formatting in some locales. The
optional library is the Milo Yip DTOA implementation. See @ref gsg_dtoa.
Issue [#272][gh_272].
[gh_272]: https://github.com/jmcnamara/libxlsxwriter/issues/272
- Added the #LXW_EXPLICIT_FALSE variable to allow the default bold property in
chart title fonts to be turned off.
Issue [#199][gh_199].
[gh_199]: https://github.com/jmcnamara/libxlsxwriter/issues/199
## 1.1.0 July 9 2021
- Fix for Cocoapod issue where local md5 files conflicted with BoringSSL headers.
Issue [#342][gh_342].
[gh_342]: https://github.com/jmcnamara/libxlsxwriter/issues/342
## 1.0.9 July 7 2021
- Added support for Excel 365 dynamic arrays. See
`worksheet_write_dynamic_array_formula()` `worksheet_write_dynamic_formula()`
and @ref ww_formulas_dynamic_arrays.
## 1.0.8 July 3 2021
- Fix for dynamic library soname on Linux.
## 1.0.7 July 1 2021
- Added support for writing Unix date/times via the
`worksheet_write_unixtime()` function.
- Added support for dynamic library soname version to help packagers and build
systems differentiate ABI versions.
## 1.0.6 May 28 2021
- Added support for using OpenSSL MD5 functions instead of built in third
party library. See @ref gsg_md5.
## 1.0.5 May 13 2021
- Added support for worksheet background images via
`worksheet_set_background()`.
## 1.0.4 May 8 2021
- Added support for GIF image files (and in Excel 365, animated GIF files).
## 1.0.3 April 20 2021
- Added some fixes to make the library compile more cleanly as an R library.
## 1.0.2 April 15 2021
- Added option to set row heights and column widths in pixels via the
`worksheet_set_row_pixels()` and `worksheet_set_column_pixels()` functions.
## 1.0.1 March 30 2021
- Added support for [pkg-config][pkg-config] to Make/Cmake installs. See the
@ref gsg_using section of the Getting Started guide.
[pkg-config]: https://www.freedesktop.org/wiki/Software/pkg-config/
- Added ability to add accessibility options "description" and "decorative" to
images via `worksheet_insert_image_opt()` and #lxw_image_options.
- Added the `workbook_read_only_recommended()` function to set the Excel
"Read-only Recommended" option that is available when saving a file.
- Fixed issue where pattern formats without colors were given a default black
fill color.
- Added option to set a chart crossing to 'min' via
`chart_axis_set_crossing_min()` as well as the existing 'max' option. The
'min' option isn't available in the Excel interface but can be enabled via
VBA.
- Added some additional information on using constant_memory mode with memory
mounted /tmp directories. See @ref ww_mem_temp.
Issue [#306][gh_306].
[gh_306]: https://github.com/jmcnamara/libxlsxwriter/issues/306
- Added build option to compile libxlsxwriter as a "universal binary" for both
Apple silicon and Intel-based Macs, i.e., arm64 and x86_64. See @ref
gsg_universal.
- Fixed issue where the limit for header/footer strings was
255 bytes instead of 255 characters and as a result UTF8
strings were being truncated.
Issue [#305][gh_305].
[gh_305]: https://github.com/jmcnamara/libxlsxwriter/issues/305
## 1.0.0 September 7 2020
- Added support for worksheet conditional formatting. See
`worksheet_conditional_format_range()` and @ref
working_with_conditional_formatting.
Feature request [#32][gh_32] and [#302][gh_302].
[gh_302]: https://github.com/jmcnamara/libxlsxwriter/issues/302
[gh_32]: https://github.com/jmcnamara/libxlsxwriter/issues/32
- Added performance optimization for search for control characters in strings
in `worksheet_write_string()`.
Issue [#298][gh_298].
[gh_298]: https://github.com/jmcnamara/libxlsxwriter/issues/298
- Made `lxw_datetime_to_excel_datetime()` a function public.
- There are now over 1000 test cases, including 650 tests that compare the
output from libxlsxwriter, byte for byte, against test files created in
Excel. This is also the 100th release of libxlsxwriter.
## 0.9.9 August 17 2020
- Added support for images in headers and footers. See `worksheet_set_header_opt()`.
- Added `worksheet_ignore_errors()` function to ignore Excel worksheet
errors/warnings in user defined ranges.
## 0.9.8 August 11 2020
- Added formatting for chart data labels and chart custom data labels. See
@ref chart_custom_labels and @ref chart_data_labels.c.
## 0.9.7 August 4 2020
- Changed #lxw_chart_data_label field from `.delete` to `.hide` in order to
avoid reserved word conflict with C++.
Issue [#300][gh_300].
[gh_300]: https://github.com/jmcnamara/libxlsxwriter/issues/300
## 0.9.6 August 3 2020
- Added support for chart custom data labels. See @ref chart_custom_labels and
@ref chart_data_labels.c.
- Fix for issue where array formulas weren't included in the output file for
certain ranges/conditions. Issue [#735][gh_735].
[gh_735]: https://github.com/jmcnamara/XlsxWriter/issues/735
## 0.9.5 May 31 2020
- Fix for issue where hyperlinks urls and tips were ignored for
`worksheet_insert_image_buffer_opt()` images.
Issue [#292][gh_292].
[gh_292]: https://github.com/jmcnamara/libxlsxwriter/issues/292
- Added #LXW_CHART_LINE_STACKED and #LXW_CHART_LINE_STACKED_PERCENT line
charts subtypes.
- Removed LXW_ERROR_SHEETNAME_RESERVED warning which was used with the
reserved worksheet name "History". However, this is an allowed worksheet
name in some Excel variants so the warning has been turned into a
documentation note instead.
## 0.9.4 January 19 2020
- Added option to specify worksheet "object positioning" for images and charts
to define how they move or size with underlying cells. See @ref
ww_object_position_options and @ref working_with_object_positioning.
## 0.9.3 January 13 2020
- Fix Xcode/Cocoapods build warnings.
## 0.9.2 January 13 2020
- Added support for writing cell comments, see @ref working_with_comments.
- Makefile now respects DESTDIR and PREFIX, including when setting rpath on
macOS.
- Changed function names in bundled MD5 code to avoid conflicts with OpenSSL.
## 0.9.1 December 26 2019
- Fix to missing MD5 linkage in Cocoapod file.
Issue [#259][gh_259].
[gh_259]: https://github.com/jmcnamara/libxlsxwriter/issues/259
## 0.9.0 December 26 2019
- Fix to avoid duplicate images being copied to an libxlsxwriter file. Excel
uses an optimization where it only stores one copy of a repeated/duplicate
image in a workbook. Libxlsxwriter didn't do this which meant that the file
size would increase when then was a large number of repeated images. This
release fixes that issue and replicates Excel's behavior.
Note, that this change adds a dependency on the [Openwall MD5] library,
which is now included with the libxlsxwriter third party source files. It is
possible to compile libxlsxwriter without this library, and thus getting the
older behavior, by passing `USE_NO_MD5=1` to make.
[Openwall MD5]: https://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
## 0.8.9 December 16 2019
- Added support for default hyperlink style in `worksheet_write_url()`.
- Added support for hyperlink in images, see `worksheet_insert_image_opt()`.
- Fixed several `worksheet_write_url()` edge cases.
## 0.8.8 November 17 2019
- Added option to allow a user defined, or overridden, image description used
with `worksheet_insert_image()`. By default it uses the filename as the
description.
Issue [#238][gh_238].
[gh_238]: https://github.com/jmcnamara/libxlsxwriter/issues/238
- Added Windows portable version of `fopen` to handle utf8 filenames when
working with images.
Issue [#238][gh_238].
[gh_238]: https://github.com/jmcnamara/libxlsxwriter/issues/238
- Added an option to allow chart fonts to be rotation to 270 deg to give a
stacked orientation. Also added support for East Asian vertical chart fonts.
- Refactored struct types used in pubic APIs to remove or document hidden
fields. @b Note: This change introduces backward incompatible API
changes. However, it should minimize any future changes of this nature.
See issue [#252][gh_252].
[gh_252]: https://github.com/jmcnamara/libxlsxwriter/issues/252
## 0.8.7 June 20 2019
- Added support for adding VBA macros to workbooks. These macros can be
extracted from existing xlsm files, created in Excel, and added to new xlsm
files. See @ref working_with_macros.
Feature request [#29][gh_29].
[gh_29]: https://github.com/jmcnamara/libxlsxwriter/issues/29
- Added support for ZIP64 extensions when writing very large xlsx files to
allow the zip container, or individual XML files within it, to be greater
than 4 GB. See @ref workbook_new_opt().
Feature request [#228][gh_228].
[gh_228]: https://github.com/jmcnamara/libxlsxwriter/issues/228
- Added extra validity checks on worksheet names.
Issues [#223][gh_223] and [#230][gh_230].
[gh_223]: https://github.com/jmcnamara/libxlsxwriter/issues/223
[gh_230]: https://github.com/jmcnamara/libxlsxwriter/issues/230
## 0.8.6 April 7 2019
- Fixed issue where images that started in hidden rows/columns weren't placed
correctly in the worksheet.
- Fixed the mime-type reported by system `file(1)`. The mime-type reported
by "file --mime-type"/magic was incorrect for XlsxWriter files since it
expected the `[Content_types]` to be the first file in the zip container.
## 0.8.5 February 10 2019
- Fix compile-time warnings with strict prototypes enabled.
Issue [#208][gh_208].
[gh_208]: https://github.com/jmcnamara/libxlsxwriter/issues/208
- Make py.test name configurable.
Pull request [#206][gh_206].
[gh_206]: https://github.com/jmcnamara/libxlsxwriter/pull/206
## 0.8.4 November 10 2018
- Fix for issue when hashing number formats.
Issue [#203][gh_203].
[gh_203]: https://github.com/jmcnamara/libxlsxwriter/issues/203
## 0.8.3 October 1 2018
- Added `worksheet_write_rich_string()` function to allow writing of
multi-format rich strings. See @ref rich_strings.c
Feature request [#37][gh_37].
[gh_37]: https://github.com/jmcnamara/libxlsxwriter/issues/37
## 0.8.2 September 16 2018
- Added new chartsheet functionality: `chartsheet_set_tab_color()`, and
`chartsheet_set_zoom()`.
## 0.8.1 September 15 2018
- Fix for chartsheet and worksheet ordering issue.
- Added new chartsheet functionality: `chartsheet_protect()`,
`chartsheet_hide()`, `chartsheet_select()` and
`chartsheet_set_first_sheet()`.
## 0.8.0 September 12 2018
- Added chartsheet support. A chartsheet is a type of worksheet that only
contains a chart. See the @ref chartsheet.h "Chartsheet" object and @ref
chartsheet.c.
## 0.7.9 September 1 2018
- Added `chart_axis_set_label_align()` function to set the alignment of chart
category axis labels.
Feature request [#186][gh_186].
[gh_186]: https://github.com/jmcnamara/libxlsxwriter/issues/186
- Added `lxw_version()` function to get the library version.
Feature request [#194][gh_194].
[gh_194]: https://github.com/jmcnamara/libxlsxwriter/pull/194
## 0.7.8 August 30 2018
- Added `worksheet_insert_image_buffer()` function to insert images from
memory buffers. See @ref image_buffer.c.
Feature request [#125][gh_125].
[gh_125]: https://github.com/jmcnamara/libxlsxwriter/issues/125
## 0.7.7 May 16 2018
- Fix to ensure the use of wide filenames on Windows with Microsoft Visual
C++.
Issue [#153][gh_153].
[gh_153]: https://github.com/jmcnamara/libxlsxwriter/issues/153
- Added docs on building an app with Cmake and Microsoft Visual C++ on
Windows.
## 0.7.6 January 11 2018
- Added support for worksheet Grouping and Outlines.
See @ref working_with_outlines.
Feature request [#30][gh_30].
[gh_30]: https://github.com/jmcnamara/libxlsxwriter/issues/30
- Fix include of libxlsxwriter as a Cocoapod on macOS.
Issue [#94][gh_94].
[gh_94]: https://github.com/jmcnamara/libxlsxwriter/issues/94
## 0.7.5 September 25 2017
- Added support for data validations and dropdown lists. See @ref
working_with_data_validation and @ref data_validate.c.
Feature request [#31][gh_31].
[gh_31]: https://github.com/jmcnamara/libxlsxwriter/issues/31
## 0.7.4 August 20 2017
- Fix make build system "install" target for compatibility with macOS
[brew/homebrew](https://brew.sh) installer. See @ref gsg_brew.
## 0.7.3 August 12 2017
- Build system fixes for Gentoo.
Issue [#116][gh_116].
[gh_116]: https://github.com/jmcnamara/libxlsxwriter/issues/116
## 0.7.2 July 26 2017
- Changed font sizes from integer to double to allow fractional font sizes.
Issue [#114][gh_114].
[gh_114]: https://github.com/jmcnamara/libxlsxwriter/issues/114
## 0.7.1 July 24 2017
- Fixed issue where internal file creation and modification dates were in the
local timezone instead of UTC.
Issue [#110][gh_110].
[gh_110]: https://github.com/jmcnamara/libxlsxwriter/issues/110
## 0.7.0 June 26 2017
- Added support for CMake build system.
Thanks to Alex Huszagh.
- Fixed issue where image filehandles weren't closed until the overall file
was closed causing the system to run out of filehandles.
Issue [#106][gh_106].
[gh_106]: https://github.com/jmcnamara/libxlsxwriter/issues/106
## 0.6.9 January 30 2017
- Added chart trendlines. See @ref chart_trendlines and
@ref chart_data_tools.c.
## 0.6.8 January 28 2017
- Added chart error bars. See @ref chart_error_bars and
@ref chart_data_tools.c.
## 0.6.7 January 24 2017
- Added chart data labels. See @ref chart_labels.
## 0.6.6 January 22 2017
- Added functions to set chart Up-Down bars: see `chart_set_up_down_bars()`
and `chart_set_up_down_bars_format()` and @ref chart_data_tools.c.
- Added functions to handle blank and hidden data in charts: see
`chart_show_blanks_as()` and `chart_show_hidden_data()`.
## 0.6.5 January 21 2017
- Added functions to set the overlap and gap between series: see
`chart_set_series_overlap()` and `chart_set_series_gap()`.
## 0.6.4 January 20 2017
- Added chart data table option, see `chart_set_table()` and
`chart_set_table_grid()`.
- Added Clustered Chart example, see @ref chart_clustered.c.
## 0.6.3 January 19 2017
- Added `chart_set_drop_lines()` and `chart_set_high_low_lines()` functions to
add chart Drop and High-Low lines to indicate category values.
See @ref chart_data_tools.c.
## 0.6.2 January 17 2017
- Added `chart_series_set_smooth()` function to set the line smoothing
property of a line or scatter chart series.
## 0.6.1 January 16 2017
- Added option to set formatting for points in a chart. This allow the colors
of Pie chart segments to be defined. See @ref chart_points.
## 0.6.0 January 15 2017
- Added option to set the number format for a chart axis, see
`chart_axis_set_num_format()`.
- Added "invert if negative" option for series fills, see
`chart_series_set_invert_if_negative()`.
## 0.5.9 January 14 2017
- Added support for chart axis crossing. See `chart_axis_set_crossing()` and
`chart_axis_set_crossing_max()`.
## 0.5.8 January 13 2017
- Added `chart_axis_set_major_tick_mark()` and
`chart_axis_set_minor_tick_mark()` functions to chart axis tick marks.
## 0.5.7 January 12 2017
- Added `chart_axis_set_display_units()` function to set chart axis display
units.
## 0.5.6 January 11 2017
- Added `chart_axis_set_interval_unit()` and `chart_axis_set_interval_tick()`
functions to adjust category axis intervals.
## 0.5.5 January 10 2017
- Added `chart_axis_set_major_unit()` and `chart_axis_set_minor_unit()` to set
the major and minor units of a category axis.
## 0.5.4 January 9 2017
- Added `chart_axis_set_label_position()` option to position the axis labels
(numbers).
- Improved documentation for @ref ww_charts_axes.
## 0.5.3 January 8 2017
- Added `chart_axis_set_position()` option to position a category axis
horizontally on, or between, the axis tick marks.
## 0.5.2 January 7 2017
- Added option to turn off chart axis: `chart_axis_off()`.
## 0.5.1 January 6 2017
- Added chart major and minor gridlines handling, see:
- `chart_axis_major_gridlines_set_visible()`
- `chart_axis_minor_gridlines_set_visible()`
- `chart_axis_major_gridlines_set_line()`
- `chart_axis_minor_gridlines_set_line()`
## 0.5.0 January 5 2017
- Added chart and plot area formatting. See `chart_chartarea_set_line()` and
`chart_plotarea_set_line()`.
## 0.4.9 January 4 2017
- Added support for chart patterns. See @ref chart_patterns.
## 0.4.8 January 3 2017
- Added support for chart markers. See @ref chart_markers.
## 0.4.7 January 2 2017
- Added `chart_axis_set_reverse()` function to reverse the order of a chart
axis.
- Added `chart_axis_set_min()`and `chart_axis_set_max()` functions to set the
minimum and maximum value for a chart axis.
- Added `chart_axis_set_log_base()` function to set the log base of a chart
axis.
Feature request [#70][gh_70].
[gh_70]: https://github.com/jmcnamara/libxlsxwriter/issues/70
## 0.4.6 January 1 2017
- Added functions to set chart line and fill properties, see:
- `chart_series_set_line()`. Feature request [#83][gh_83].
- `chart_series_set_fill()`.
- `chart_axis_set_line()`.
- `chart_axis_set_fill()`.
- @ref chart_lines.
- @ref chart_fills.
[gh_83]: https://github.com/jmcnamara/libxlsxwriter/issues/83
## 0.4.5 December 31 2016
- Added functions to set chart legend properties: see `chart_legend_set_position()`,
`chart_legend_set_font()` and `chart_legend_delete_series()`.
## 0.4.4 December 30 2016
- Added chart fonts. See `chart_axis_set_name_font()`, `chart_axis_set_num_font()`,
`chart_title_set_name_font()` and @ref chart_fonts.
## 0.4.3 December 26 2016
- Added `workbook_get_worksheet_by_name()` function to get a worksheet
object from its name.
- Added `workbook_validate_worksheet_name()` function to validate a worksheet
name.
- Fix for parameter length check when strings are UTF-8.
Issue [#84][gh_84].
[gh_84]: https://github.com/jmcnamara/libxlsxwriter/issues/84
## 0.4.2 July 14 2016
- Added support for OpenBSD and better support for FreeBSD. See @ref gsg_bsd.
## 0.4.1 July 11 2016
- Switched to using
[tmpfileplus](http://www.di-mgt.com.au/c_function_to_create_temp_file.html)
for temporary file handles to work around issue when the temp directory on
Windows isn't writeable. The temp file directory is now also configurable at
runtime, see @ref gsg_tmpdir.
Issue [#63][gh_63].
[gh_63]: https://github.com/jmcnamara/libxlsxwriter/issues/63
## 0.4.0 July 5 2016
- Added fixes for MSVC 2010.
- Refactored public APIs to return #lxw_error instead of int.
## 0.3.9 July 2 2016
- Added support for MinGW, MinGW-w64, Cygwin, MSYS and MSYS2.
See @ref gsg_ming.
## 0.3.8 June 11 2016
- Added workbook functions to set custom document properties. See
`workbook_set_custom_property_string()` and @ref doc_custom_properties.c.
## 0.3.7 June 2 2016
- Added updated Cocoapods file for Cocoapods 1.0.0. This also add support for
the "use_frameworks" directive. Thanks to Ludovico Rossi. See @ref
getting_started for instructions on how to use the cocoapod.
Pull request [#50][gh_50].
[gh_50]: https://github.com/jmcnamara/libxlsxwriter/issues/50
## 0.3.6 June 1 2016
- Fix for `worksheet_insert_image()` issue when handling images with zero dpi.
## 0.3.5 May 31 2016
- Refactored the error handling and reporting for when the file creation
subsystem fails due to file permissions or other issues. The new error codes
are in `#lxw_error` and the codes can be converted to strings, for reporting,
using the new `lxw_strerror()` function.
Issue [#49][gh_49].
[gh_49]: https://github.com/jmcnamara/libxlsxwriter/issues/49
## 0.3.4 May 28 2016
- Updated the @ref getting_started docs with instructions on how to build
libxlsxwriter for Windows using Microsoft Visual Studio and added links to
the example MSVC project:
[MSVCLibXlsxWriter](https://github.com/jmcnamara/MSVCLibXlsxWriter).
## 0.3.3 May 23 2016
- Added support for charts via the @ref chart.h "The Chart object". See the
examples of the supported chart types:
- @ref chart_area.c "Area chart"
- @ref chart_bar.c "Bar chart"
- @ref chart_column.c "Column chart"
- @ref chart_line.c "Line chart"
- @ref chart_scatter.c "Scatter chart"
- @ref chart_radar.c "Radar chart"
- @ref chart_pie.c "Pie chart"
- @ref chart_doughnut.c "Doughnut chart"
- @ref chart_styles.c "Built-in charts styles"
Feature request [#36][gh_36].
[gh_36]: https://github.com/jmcnamara/libxlsxwriter/issues/36
## 0.3.2 April 8 2016
- Added the `worksheet_write_boolean()` function to write Excel boolean
values.
Feature request [#47][gh_47].
[gh_47]: https://github.com/jmcnamara/libxlsxwriter/issues/47
## 0.3.1 January 9 2016
- Improved performance 20-30% for large data files.
## 0.3.0 January 4 2016
- Renamed `worksheet_set_row()` function to `worksheet_set_row_opt()` for
consistency with current and future APIs. The `worksheet_set_row()` function
is now used without the options parameter.
Note: This is a backward incompatible change.
- Renamed `worksheet_set_column()` function to `worksheet_set_column_opt()`
for consistency with current and future APIs. The `worksheet_set_column()`
function is now used without the options parameter.
Note: This is a backward incompatible change.
## 0.2.9 January 3 2016
- Added the `worksheet_insert_image()` function to add PNG and JPG images to
worksheets. See @ref demo.c and @ref images.c.
## 0.2.8 December 22 2015
- Added `worksheet_set_default_row()` function to allow setting of default row
height and hiding unused rows. See the @ref hide_row_col.c example.
## 0.2.7 December 21 2015
- Added support for escaping control characters in strings. This prevents
unreadable files if string data contains control characters.
Issue [#42][gh_42].
[gh_42]: https://github.com/jmcnamara/libxlsxwriter/issues/42
## 0.2.6 December 19 2015
- Added `worksheet_protect()` function to protect Excel worksheet elements
from modification. See the @ref worksheet_protection.c example.
## 0.2.5 December 14 2015
- Added `workbook_set_properties()` function to set Excel document properties
such as Author and Title. See the @ref doc_properties.c example.
## 0.2.4 December 13 2015
- Added `worksheet_hide()` function to hide a worksheet. See the @ref
hide_sheet.c example.
- Added `worksheet_set_first_sheet()` function to set the first visible
worksheet in a workbook with a large number of worksheets.
## 0.2.3 December 12 2015
- Added `worksheet_set_tab_color()` function to set the worksheet tab
color. See the @ref tab_colors.c example.
## 0.2.2 December 11 2015
- Replaced shared strings hash table with a Red/Black tree implementation for
better performance.
Thanks to Martin Renters. Pull Request [#41][gh_41].
[gh_41]: https://github.com/jmcnamara/libxlsxwriter/issues/41
## 0.2.1 December 11 2015
- Added `worksheet_right_to_left()` function. This can be used to change the
default direction of the worksheet from left-to-right when creating Arabic,
Hebrew or other near or far eastern worksheets that use right-to-left as the
default direction.
- Added `worksheet_hide_zero()` function to hide zero cell values.
- Added `worksheet_set_zoom()` method to set the worksheet zoom factor.
## 0.2.0 December 9 2015
- Added `worksheet_set_selection()` function to set the cell selected range on
a worksheet.
## 0.1.9 December 7 2015
- Replaced main worksheet data structure with a Red/Black tree implementation
for better performance when data isn't added in linear row-column order.
Thanks to Martin Renters. Pull Request [#14][gh_14] and [#16][gh_16].
[gh_14]: https://github.com/jmcnamara/libxlsxwriter/issues/14
[gh_16]: https://github.com/jmcnamara/libxlsxwriter/issues/16
## 0.1.8 December 7 2015
- Added `worksheet_freeze_panes()` and `worksheet_split_panes()` to allow
setting worksheet panes. See @ref panes.c example.
- Added link to [Xcode project][libxlsxwriterCocoaExamples] for iOS and OS X
with Objective-C and Swift, provided by Ludovico Rossi.
- Added improved support for Windows.
[libxlsxwriterCocoaExamples]: https://github.com/lrossi/libxlsxwriterCocoaExamples
## 0.1.7 September 27 2015
- Fixed Cocoapod spec file for iOS and OS X.
## 0.1.6 September 27 2015
- Added Cocoapod spec file to allow the library to be installed using
[CocoaPods](https://cocoapods.org).
Pull Request [#7](https://github.com/jmcnamara/libxlsxwriter/issues/7).
## 0.1.5 May 3 2015
- Added `worksheet_write_url()` function to write urls/hyperlinks to
worksheets. See also @ref hyperlinks.c.
## 0.1.4 March 18 2015
- Added `worksheet_autofilter()` function to add autofilters to worksheets.
See also @ref autofilter.c.
## 0.1.3 March 15 2015
- Added `worksheet_write_array_formula()` function to allow writing of
array formulas in worksheets.
## 0.1.2 March 14 2015
- Added `worksheet_set_h_pagebreaks()` and `worksheet_set_v_pagebreaks()`
functions to define worksheet page breaks.
- Added LXW_FOREACH_WORKSHEET() macro to allow iteration over all the
worksheets in a workbook.
- Added `worksheet_set_print_scale()` function to set the scale factor for
the printed page.
- Added `worksheet_set_start_page()` function to set the start page number
when printing.
## 0.1.1 March 13 2015
- Added `worksheet_print_area()` function to control the print area of a
worksheet.
- Added `worksheet_fit_to_pages()` function to fit the printed area to a
specific number of pages both vertically and horizontally.
## 0.1.0 March 12 2015
- Added `worksheet_repeat_rows()` and `worksheet_repeat_columns()` functions
to control the repeated rows/columns on printed worksheets.
## 0.0.9 March 9 2015
- Added `worksheet_gridlines()` function to show/hide screen and print
gridlines.
- Added `worksheet_center_horizontally()` and `worksheet_center_vertically()`
functions to center worksheet on the printed page.
- Added `worksheet_print_row_col_headers()` function to enable printing of row
and column headers.
## 0.0.8 March 8 2015
- Added support for worksheet headers and footers via the
`worksheet_set_header()` and `worksheet_set_footer()` functions. See also
@ref headers_footers.c.
## 0.0.7 March 7 2015
- Added the `worksheet_merge_range()` method to merge worksheet cells. See
also @ref merge_range.c.
## 0.0.6 March 5 2015
- Added the `workbook_define_name()` method to create defined names and ranges
in a workbook or worksheet.
## 0.0.5 March 6 2015
- Added `worksheet_select()` function to set worksheets as selected.
- Added `worksheet_activate()` to set the active worksheet.
- Several portability fixes to fix warnings with different compilers.
## 0.0.4 March 1 2015
- Added `worksheet_set_margins()` function to set top, bottom, left and right
margins in a worksheet.
- Fix for issue where format objects were written to the file in the order of
creation rather than the order of use. This issue caused incorrect formats
in cells.
Issue [#3](https://github.com/jmcnamara/libxlsxwriter/issues/3).
- Fix for issue where tmp files in `constant_memory` mode weren't closed
until application exited.
Issue [#1](https://github.com/jmcnamara/libxlsxwriter/issues/1).
## 0.0.3 January 7 2015
- Added worksheet page setup methods.
- `worksheet_set_landscape()`
- `worksheet_set_portrait()`
- `worksheet_set_page_view()`
- `worksheet_set_paper()`
- `worksheet_print_across()`
## 0.0.2 June 26 2014
- First public release.
## 0.0.1 June 8 2014
- First GitHub release.
*/
libxlsxwriter-RELEASE_1.1.5/License.txt 0000664 0000000 0000000 00000023600 14353601326 0017727 0 ustar 00root root 0000000 0000000 /**
@page license License
Libxlsxwriter is released under a FreeBSD license:
Copyright 2014-2022, John McNamara
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are
those of the authors and should not be interpreted as representing
official policies, either expressed or implied, of the FreeBSD Project.
Libxlsxwriter includes the `queue.h` and `tree.h` macros from FreeBSD. It also
includes and, unless overridden, uses the optional libraries `minizip`,
`tmpfileplus` and `md5`. It also includes the `emyg_dtoa` library but doesn't
use it by default. These components have the following licenses:
Queue.h from FreeBSD:
Copyright (c) 1991, 1993
The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
Tree.h from FreeBSD:
Copyright 2002 Niels Provos
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The `minizip` files used in the libxlsxwriter source tree are taken from the
`zlib` ` contrib/minizip` directory. [Zlib](http://www.zlib.net) has the
following License/Copyright:
(C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
The `minizip` files have the following additional copyright declarations:
Copyright (C) 1998-2010 Gilles Vollant
(minizip) ( http://www.winimage.com/zLibDll/minizip.html )
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
Note, it is possible to compile libxlsxwriter without statically linking the
`minizip` files and instead dynamically linking to `lminizip`, see
@ref gsg_minizip.
[Tmpfileplus](http://www.di-mgt.com.au/c_function_to_create_temp_file.html)
has the following license:
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
Copyright (c) 2012-16 David Ireland, DI Management Services Pty Ltd
.
See the [Mozilla Public License, v. 2.0](http://mozilla.org/MPL/2.0/).
Note, it is possible to compile libxlsxwriter using the standard library
`tmpfile()` function instead of `tmpfileplus`, see @ref gsg_tmpdir.
The [Milo Yip DTOA library](https://github.com/miloyip/dtoa-benchmark) for
converting doubles to strings. It has the following license:
Copyright (C) 2015 Doug Currie
based on dtoa_milo.h
Copyright (C) 2014 Milo Yip
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This Milo Yip DTOA library (emyg_dtoa) is used to avoid issues where the
standard sprintf() dtoa function changes output based on locale settings. It
is also 40-50% faster than the standard dtoa for raw numeric data. The use of
this library is optional. If you wish to use it you can pass
`USE_DTOA_LIBRARY=1` to make when compiling.
[Openwall MD5](https://openwall.info/wiki/people/solar/software/public-domain-source-code/md5)
has the following licence:
This software was written by Alexander Peslyak in 2001. No copyright is
claimed, and the software is hereby placed in the public domain.
In case this attempt to disclaim copyright and place the software in the
public domain is deemed null and void, then the software is
Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
general public under the following terms:
Redistribution and use in source and binary forms, with or without
modification, are permitted.
There's ABSOLUTELY NO WARRANTY, express or implied.
(This is a heavily cut-down "BSD license".)
Note, the MD5 library is used to avoid including duplicate image files in the
xlsx file. If you don't want to use this code, and the additional licence, you
can use OpenSSL's MD5 functions instead by passing `USE_OPENSSL_MD5=1` to
make. If this functionality isn't required it is possible to compile
libxlsxwriter without image deduplication by passing `USE_NO_MD5=1` to make.
See also @ref gsg_md5.
Next: @ref changes
*/
libxlsxwriter-RELEASE_1.1.5/Makefile 0000664 0000000 0000000 00000020573 14353601326 0017252 0 ustar 00root root 0000000 0000000 ###############################################################################
#
# Makefile for libxlsxwriter library.
#
# Copyright 2014-2022, John McNamara, jmcnamara@cpan.org
#
# Keep the output quiet by default.
Q=@
ifdef V
Q=
endif
DESTDIR ?=
PREFIX ?= /usr/local
PYTEST ?= py.test
PYTESTFILES ?= test
VERSION = $(shell sed -n -e 's/.*LXW_VERSION \"\(.*\)\"/\1/p' include/xlsxwriter.h)
SOVERSION = $(shell sed -n -e 's/.*LXW_SOVERSION \"\(.*\)\"/\1/p' include/xlsxwriter.h)
.PHONY: docs tags examples third_party
# Build libxlsxwriter.
all : third_party
$(Q)$(MAKE) -C src
# Build the third party libs.
third_party :
ifndef USE_SYSTEM_MINIZIP
$(Q)$(MAKE) -C third_party/minizip
endif
ifndef USE_STANDARD_TMPFILE
$(Q)$(MAKE) -C third_party/tmpfileplus
endif
ifndef USE_NO_MD5
ifndef USE_OPENSSL_MD5
$(Q)$(MAKE) -C third_party/md5
endif
endif
ifdef USE_DTOA_LIBRARY
$(Q)$(MAKE) -C third_party/dtoa
endif
# Build a macOS universal binary.
universal_binary :
$(Q)$(MAKE) clean
$(Q)TARGET_ARCH="-target x86_64-apple-macos10.12" $(MAKE) all
$(Q)mv lib/libxlsxwriter.a libxlsxwriter_x86_64.a
$(Q)mv lib/libxlsxwriter.$(SOVERSION).dylib libxlsxwriter_x86_64.dylib
$(Q)$(MAKE) clean
$(Q)TARGET_ARCH="-target arm64-apple-macos11" $(MAKE) all
$(Q)mv lib/libxlsxwriter.a lib/libxlsxwriter_arm64.a
$(Q)mv lib/libxlsxwriter.$(SOVERSION).dylib lib/libxlsxwriter_arm64.dylib
$(Q)mv libxlsxwriter_x86_64.a libxlsxwriter_x86_64.dylib lib
$(Q)lipo -create -output lib/libxlsxwriter.a lib/libxlsxwriter_x86_64.a lib/libxlsxwriter_arm64.a
$(Q)lipo -create -output lib/libxlsxwriter.$(SOVERSION).dylib lib/libxlsxwriter_x86_64.dylib lib/libxlsxwriter_arm64.dylib
$(Q)rm -f lib/libxlsxwriter_x86_64.* lib/libxlsxwriter_arm64.*
# Build the example programs.
examples : all
$(Q)$(MAKE) -C examples
# Clean src and test directories.
clean :
$(Q)$(MAKE) clean -C src
$(Q)$(MAKE) clean -C test/unit
$(Q)$(MAKE) clean -C test/functional/src
$(Q)$(MAKE) clean -C test/cpp
$(Q)$(MAKE) clean -C examples
$(Q)rm -rf docs/html
$(Q)rm -rf test/functional/__pycache__
$(Q)rm -f test/functional/*.pyc
$(Q)rm -f lib/*
$(Q)$(MAKE) clean -C third_party/minizip
$(Q)$(MAKE) clean -C third_party/tmpfileplus
$(Q)$(MAKE) clean -C third_party/md5
$(Q)$(MAKE) clean -C third_party/dtoa
# Clean src and lib dir only, as a precursor for static analysis.
clean_src :
$(Q)$(MAKE) clean -C src
$(Q)rm -f lib/*
# Run the unit tests.
test : all test_cpp test_unit test_functional
# Test for C++ const correctness on APIs.
test_const : all
$(Q)$(MAKE) clean -C test/functional/src
$(Q)! $(MAKE) -C test/functional/src CFLAGS=-Wwrite-strings 2>&1 | grep -A 1 "note:"
# Run the functional tests.
test_functional : all
$(Q)$(MAKE) -C test/functional/src
$(Q)$(PYTEST) test/functional -v -k $(PYTESTFILES)
# Run all tests.
test_unit : all
$(Q)$(MAKE) -C src test_lib
$(Q)$(MAKE) -C test/unit test
# Test C++ compilation.
test_cpp : all
$(Q)$(MAKE) -C test/cpp
# Test Cmake. This test should really be done with Cmake in the cmake dir but
# this is a workaround for now.
test_cmake :
ifneq ($(findstring m32,$(CFLAGS)),m32)
$(Q)$(MAKE) -C src clean
$(Q)cd cmake; cmake .. -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON; make clean; make; cp libxlsxwriter.a ../src/
$(Q)cmake/xlsxwriter_unit
$(Q)$(MAKE) -C test/functional/src
$(Q)$(PYTEST) test/functional -v -k $(PYTESTFILES)
else
@echo "Skipping Cmake tests on 32 bit target."
endif
# Test the functional test exes with valgrind (in 64bit mode only).
test_valgrind : all
ifndef NO_VALGRIND
$(Q)$(MAKE) -C test/functional/src test_valgrind
$(Q)$(MAKE) -C examples test_valgrind
endif
# Minimal target for quick compile without creating the libs.
test_compile :
$(Q)$(MAKE) -C src test_compile
# Indent the source files with the .indent.pro settings.
indent:
$(Q)gindent src/*.c include/*.h include/xlsxwriter/*.h
tags:
$(Q)rm -f TAGS
$(Q)etags src/*.c include/*.h include/xlsxwriter/*.h
# Build the doxygen docs.
doc: docs
docs:
$(Q)$(MAKE) -C docs
@echo "Docs built."
docs_doxygen_only:
$(Q)$(MAKE) -C docs docs_doxygen_only
docs_external:
$(Q)make -C ../libxlsxwriter.github.io release
# Simple install.
install: all
$(Q)mkdir -p $(DESTDIR)$(PREFIX)/include
$(Q)cp -R include/* $(DESTDIR)$(PREFIX)/include
$(Q)mkdir -p $(DESTDIR)$(PREFIX)/lib
$(Q)cp -R lib/* $(DESTDIR)$(PREFIX)/lib
$(Q)mkdir -p $(DESTDIR)$(PREFIX)/lib/pkgconfig
$(Q)sed -e 's|@PREFIX@|$(PREFIX)|g' -e 's|@VERSION@|$(VERSION)|g' dev/release/pkg-config.txt > $(DESTDIR)$(PREFIX)/lib/pkgconfig/xlsxwriter.pc
# Simpler uninstall.
uninstall:
$(Q)rm -rf $(DESTDIR)$(PREFIX)/include/xlsxwriter*
$(Q)rm $(DESTDIR)$(PREFIX)/lib/libxlsxwriter.*
$(Q)rm $(DESTDIR)$(PREFIX)/lib/pkgconfig/xlsxwriter.pc
# Strip the lib files.
strip:
$(Q)strip lib/*
# Run a coverity static analysis.
coverity: clean_src third_party
$(Q)rm -rf cov-int
$(Q)rm -f libxlsxwriter-coverity.tgz
$(Q)../../cov-analysis-linux64-2019.03/bin/cov-build --dir cov-int make -C src libxlsxwriter.a
$(Q)tar -czf libxlsxwriter-coverity.tgz cov-int
$(Q)$(MAKE) -C src clean
$(Q)rm -f lib/*
# Run gcov coverage analysis.
gcov: third_party
$(Q)$(MAKE) -C src clean
$(Q)$(MAKE) -C src GCOV="--coverage" OPT_LEVEL="-O0"
$(Q)$(MAKE) -C src test_lib GCOV="--coverage"
$(Q)$(MAKE) -C test/unit test GCOV="--coverage"
$(Q)$(MAKE) -C test/functional/src GCOV="--coverage"
$(Q)$(PYTEST) test/functional -v -k $(PYTESTFILES)
$(Q)mkdir -p build
$(Q)gcovr -r src --html-details -o build/libxlsxwriter_gcov.html
$(Q)gcovr -r . -f src --sonarqube build/coverage.xml
# Run sonarcloud analysis.
sonarcloud: gcov
ifndef SONAR_TOKEN
@echo "Please define SONAR_TOKEN to run this analysis."
@exit 1
endif
$(Q)$(MAKE) clean
$(Q)../sonar-scanner-4.6.1.2450-macosx/bin/build-wrapper-macosx-x86 --out-dir build make all
$(Q)../sonar-scanner-4.6.1.2450-macosx/bin/sonar-scanner \
-Dsonar.organization=jmcnamara-github \
-Dsonar.projectKey=jmcnamara_libxlsxwriter \
-Dsonar.projectName=libxlsxwriter \
-Dsonar.projectVersion=$(VERSION) \
-Dsonar.sources=src \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.cfamily.build-wrapper-output=build \
-Dsonar.working.directory=build/scannerwork \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.cfamily.threads=4 \
-Dsonar.coverageReportPaths=build/coverage.xml \
-Dsonar.cfamily.cache.enabled=false
sonarcloud_no_gcov:
ifndef SONAR_TOKEN
@echo "Please define SONAR_TOKEN to run this analysis."
@exit 1
endif
$(Q)$(MAKE) clean
$(Q)../sonar-scanner-4.6.1.2450-macosx/bin/build-wrapper-macosx-x86 --out-dir build make all
$(Q)../sonar-scanner-4.6.1.2450-macosx/bin/sonar-scanner \
-Dsonar.organization=jmcnamara-github \
-Dsonar.projectKey=jmcnamara_libxlsxwriter \
-Dsonar.projectName=libxlsxwriter \
-Dsonar.projectVersion=$(VERSION) \
-Dsonar.sources=src \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.cfamily.build-wrapper-output=build \
-Dsonar.working.directory=build/scannerwork \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.cfamily.threads=4 \
-Dsonar.cfamily.cache.enabled=false
# Run a scan-build static analysis.
scan_build: clean_src third_party
$(Q)scan-build make -C src libxlsxwriter.a
$(Q)$(MAKE) -C src clean
$(Q)rm -f lib/*
spellcheck:
$(Q)for f in docs/src/*.dox; do aspell --lang=en_US --check $$f; done
$(Q)for f in include/xlsxwriter/*.h; do aspell --lang=en_US --check $$f; done
$(Q)for f in src/*.c; do aspell --lang=en_US --check $$f; done
$(Q)for f in examples/*.c; do aspell --lang=en_US --check $$f; done
$(Q)aspell --lang=en_US --check Changes.txt
$(Q)aspell --lang=en_US --check Readme.md
$(Q)aspell --lang=en_US --check docs/src/examples.txt
releasecheck:
$(Q)dev/release/release_check.sh
release: releasecheck
@echo
@echo "Pushing to git main ..."
$(Q)git push origin main
$(Q)git push --tags
@echo
@echo "Pushing updated docs ..."
$(Q)make -C ../libxlsxwriter.github.io release
@echo
@echo "Pushing the cocoapod ..."
$(Q)pod trunk push libxlsxwriter.podspec --use-libraries
@echo
@echo "Finished. Opening files."
$(Q)open https://libxlsxwriter.github.io/changes.html
$(Q)open https://cocoadocs.org/docsets/libxlsxwriter
$(Q)open https://github.com/jmcnamara/libxlsxwriter
$(Q)open https://github.com/jmcnamara/libxlsxwriter/releases
libxlsxwriter-RELEASE_1.1.5/Readme.md 0000664 0000000 0000000 00000004307 14353601326 0017326 0 ustar 00root root 0000000 0000000 # libxlsxwriter
Libxlsxwriter: A C library for creating Excel XLSX files.

## The libxlsxwriter library
Libxlsxwriter is a C library that can be used to write text, numbers, formulas
and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.
It supports features such as:
- 100% compatible Excel XLSX files.
- Full Excel formatting.
- Merged cells.
- Defined names.
- Autofilters.
- Charts.
- Data validation and drop down lists.
- Conditional formatting.
- Worksheet PNG/JPEG/GIF images.
- Cell comments.
- Support for adding Macros.
- Memory optimization mode for writing large files.
- Source code available on [GitHub](https://github.com/jmcnamara/libxlsxwriter).
- FreeBSD license.
- ANSI C.
- Works with GCC, Clang, Xcode, MSVC 2015, ICC, TCC, MinGW, MingGW-w64/32.
- Works on Linux, FreeBSD, OpenBSD, OS X, iOS and Windows. Also works on MSYS/MSYS2 and Cygwin.
- Compiles for 32 and 64 bit.
- Compiles and works on big and little endian systems.
- The only dependency is on `zlib`.
Here is an example that was used to create the spreadsheet shown above:
```C
#include "xlsxwriter.h"
int main() {
/* Create a new workbook and add a worksheet. */
lxw_workbook *workbook = workbook_new("demo.xlsx");
lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL);
/* Add a format. */
lxw_format *format = workbook_add_format(workbook);
/* Set the bold property for the format */
format_set_bold(format);
/* Change the column width for clarity. */
worksheet_set_column(worksheet, 0, 0, 20, NULL);
/* Write some simple text. */
worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
/* Text with formatting. */
worksheet_write_string(worksheet, 1, 0, "World", format);
/* Write some numbers. */
worksheet_write_number(worksheet, 2, 0, 123, NULL);
worksheet_write_number(worksheet, 3, 0, 123.456, NULL);
/* Insert an image. */
worksheet_insert_image(worksheet, 1, 2, "logo.png");
workbook_close(workbook);
return 0;
}
```
See the [full documentation](http://libxlsxwriter.github.io) for the getting
started guide, a tutorial, the main API documentation and examples.
libxlsxwriter-RELEASE_1.1.5/cmake/ 0000775 0000000 0000000 00000000000 14353601326 0016663 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/cmake/FindMINIZIP.cmake 0000664 0000000 0000000 00000005447 14353601326 0021617 0 ustar 00root root 0000000 0000000 # :copyright: (c) 2017 Alex Huszagh.
# :license: FreeBSD, see LICENSE.txt for more details.
# FindMINIZIP
# -----------
#
# Find MINIZIP include dirs and libraries
#
# Use this module by invoking find_package with the form::
#
# find_package(MINIZIP
# [version] [EXACT] # Minimum or EXACT version e.g. 1.0.6
# [REQUIRED] # Fail with error if MINIZIP is not found
# )
#
# You may also set `MINIZIP_USE_STATIC_LIBS` to prefer static libraries
# to shared ones.
#
# If found, `MINIZIP_FOUND` will be set to true, and `MINIZIP_LIBRARIES`
# and `MINIZIP_INCLUDE_DIRS` will both be set.
#
# You may optionally set `MINIZIP_ROOT` to specify a custom root directory
# for the MINIZIP installation.
#
include(CheckCXXSourceCompiles)
include(FindPackage)
# PATHS
# -----
set(MINIZIP_SEARCH_PATHS)
if(MINIZIP_ROOT)
list(APPEND MINIZIP_SEARCH_PATHS ${MINIZIP_ROOT})
endif()
if(WIN32)
list(APPEND ZLIB_SEARCH_PATHS
"$ENV{PROGRAMFILES}/minizip"
)
endif()
unset(MINIZIP_SYSTEM_ROOT)
unset(MINIZIP_CUSTOM_ROOT)
unset(MINIZIP_SEARCH_HKEY)
# FIND
# ----
# INCLUDE DIRECTORY
SetSuffixes(MINIZIP)
foreach(search ${MINIZIP_SEARCH_PATHS})
FIND_PATH(MINIZIP_INCLUDE_DIR
NAMES minizip/zip.h
PATHS ${search}
PATH_SUFFIXES include
)
endforeach(search)
if(NOT MINIZIP_INCLUDE_DIR)
FIND_PATH(MINIZIP_INCLUDE_DIR minizip/zip.h PATH_SUFFIXES include)
endif()
# LIBRARY PATHS
set(MINIZIP_LIBRARY_NAMES minizip)
if(CMAKE_BUILD_TYPE MATCHES Debug)
list(APPEND MINIZIP_LIBRARY_NAMES minizipd)
endif()
foreach(search ${MINIZIP_SEARCH_PATHS})
FIND_LIBRARY(MINIZIP_LIBRARY
NAMES ${MINIZIP_LIBRARY_NAMES}
PATHS ${search}
PATH_SUFFIXES lib
)
endforeach(search)
if(NOT MINIZIP_LIBRARY)
FIND_LIBRARY(MINIZIP_LIBRARY NAMES ${MINIZIP_LIBRARY_NAMES} PATH_SUFFIXES lib)
endif()
set(MINIZIP_INCLUDE_DIRS ${MINIZIP_INCLUDE_DIR})
set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARY})
CheckFound(MINIZIP)
FindStaticLibs(MINIZIP)
# VERSION
# -------
if(MINIZIP_FOUND)
file(STRINGS "${MINIZIP_INCLUDE_DIRS}/zlib.h" MINIZIP_VERSION_CONTENTS REGEX "Version [0-9]+\\.[0-9]+(\\.[0-9]+)?")
string(REGEX REPLACE ".*Version ([0-9]+)\\.[0-9]+" "\\1" MINIZIP_VERSION_MAJOR "${MINIZIP_VERSION_CONTENTS}")
string(REGEX REPLACE ".*Version [0-9]+\\.([0-9]+)" "\\1" MINIZIP_VERSION_MINOR "${MINIZIP_VERSION_CONTENTS}")
set(MINIZIP_VERSION_PATCH 0)
set(MINIZIP_VERSION_STRING "${MINIZIP_VERSION_MAJOR}.${MINIZIP_VERSION_MINOR}.${MINIZIP_VERSION_PATCH}")
set(MINIZIP_VERSION ${MINIZIP_VERSION_STRING})
MatchVersion(MINIZIP)
endif()
# COMPILATION
# -----------
set(MINIZIP_CODE "
#include
int main(void)
{
zip_fileinfo zipfile_info;
return 0;
}
"
)
if(MINIZIP_FOUND)
CheckCompiles(MINIZIP)
endif()
RequiredPackageFound(MINIZIP)
libxlsxwriter-RELEASE_1.1.5/cmake/FindPackage.cmake 0000664 0000000 0000000 00000011527 14353601326 0022027 0 ustar 00root root 0000000 0000000 # :copyright: (c) 2017 Alex Huszagh.
# :license: FreeBSD, see LICENSE.txt for more details.
# FindPackage
# -----------
#
# Macros and functions to help find packages. Do not invoke this module
# directly, it merely provides library definitions to be invoked
# by other find utilities.
include(CheckCXXSourceCompiles)
# Return if the package name has previously been found
#
# Args:
# packageName Name of the package
#
# Example:
# ReturnFound(Iconv)
#
macro(ReturnFound packageName)
if(${packageName}_FOUND)
return()
endif()
endmacro(ReturnFound)
# Set the library extensions for a given package dependent on whether
# to search for static or dynamic libraries.
#
# Args:
# packageName Name of the package
#
# Example:
# SetSuffixes(IConv)
#
macro(SetSuffixes packageName)
if(${packageName}_USE_STATIC_LIBS)
if(MSVC)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
endif()
else()
if(WIN32)
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a" ".dll" ".lib" ".a")
else()
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
endif()
endif()
endmacro(SetSuffixes)
# Check if the package was found.
#
# Args:
# packageName Name of the package
#
# Example:
# CheckFound(IConv)
#
macro(CheckFound packageName)
if(${packageName}_INCLUDE_DIRS AND ${packageName}_LIBRARIES)
set(${packageName}_FOUND TRUE)
endif()
endmacro(CheckFound)
# Replace a dynamic library with a `.dll.a` extension with the corresponding
# library removing the `.dll`.
#
# Args:
# libraryName Variable name for path to found library
#
# Example:
# ReplaceDynamic(/mingw64/lib/libiconv.dll.a)
#
macro(ReplaceDynamic libraryName)
if(${libraryName} MATCHES ".dll.a")
string(REPLACE ".dll.a" ".a" static ${${libraryName}})
if(EXISTS ${static})
set(${libraryName} ${static})
endif()
endif()
endmacro(ReplaceDynamic)
# Replace a dynamic libraries with the static variants, with integrity
# checks for the package.
#
# Args:
# packageName Name of the package
#
# Example:
# FindStaticLibs(IConv)
#
macro(FindStaticLibs packageName)
if(${packageName}_USE_STATIC_LIBS AND MSYS)
# convert `.dll.a` to `.a`
set(${packageName}_LIBRARY_SOURCE ${${packageName}_LIBRARIES})
set(${packageName}_LIBRARIES "")
foreach(library ${${packageName}_LIBRARY_SOURCE})
# replace each dynamic library with a single one
set(static_library ${library})
ReplaceDynamic(static_library)
list(APPEND ${packageName}_LIBRARIES ${static_library})
endforeach(library)
endif()
endmacro(FindStaticLibs)
# Checks if a suitable version for the found library was identified,
# if provided. The library can either force exact or inexact matching.
#
# Args:
# packageName Name of the package
#
# Example:
# MatchVersion(ICU)
#
macro(MatchVersion packageName)
if(${packageName}_FOUND AND ${packageName}_FIND_VERSION)
# MATCH VERSION
if(${packageName}_FIND_VERSION_EXACT)
# EXACT VERSION
if(${packageName}_FIND_VERSION VERSION_EQUAL ${packageName}_VERSION)
else()
set(${packageName}_FOUND FALSE)
endif()
else()
# GREATER THAN VERSION
if(${packageName}_VERSION VERSION_LESS ${packageName}_FIND_VERSION)
set(${packageName}_FOUND FALSE)
endif()
endif()
endif()
endmacro(MatchVersion)
# Check if a sample program compiles, if not, set the library to not found.
#
# Args:
# packageName Name of the package
# code String of simple program depending on the library
#
# Example:
# set(IConv_CODE "int main(int argc, char **argv){ return 0; }")
# CheckCompiles(IConv)
#
macro(CheckCompiles packageName)
# FLAGS
set(CMAKE_REQUIRED_INCLUDES ${${packageName}_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${${packageName}_LIBRARIES})
# COMPILATION
check_cxx_source_compiles("${${packageName}_CODE}" ${packageName}_COMPILES)
if(NOT ${${packageName}_COMPILES})
set(${packageName}_FOUND FALSE)
message(SEND_ERROR "Cannot compile a simple ${packageName} program.")
endif()
endmacro(CheckCompiles)
# Send an error if a required package was not found. Otherwise, if the
# package is found, report to the user it was identified.
#
# Args:
# packageName Name of the package
#
# Example:
# RequiredPackageFound(ICU)
#
macro(RequiredPackageFound packageName)
if(${packageName}_FOUND)
message("Found ${packageName}.")
else()
if(${packageName}_FIND_REQUIRED)
message(SEND_ERROR "Unable to find requested ${packageName} libraries.")
endif()
endif()
endmacro(RequiredPackageFound)
libxlsxwriter-RELEASE_1.1.5/cmake/i686-toolchain.cmake 0000664 0000000 0000000 00000000461 14353601326 0022340 0 ustar 00root root 0000000 0000000 set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR "i686")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32" CACHE STRING "asm flags")
libxlsxwriter-RELEASE_1.1.5/cocoapods/ 0000775 0000000 0000000 00000000000 14353601326 0017555 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/cocoapods/libxlsxwriter-umbrella.h 0000664 0000000 0000000 00000001540 14353601326 0024451 0 ustar 00root root 0000000 0000000 #import
#import "../xlsxwriter.h"
#import "app.h"
#import "chart.h"
#import "chartsheet.h"
#import "comment.h"
#import "common.h"
#import "content_types.h"
#import "core.h"
#import "custom.h"
#import "drawing.h"
#import "format.h"
#import "hash_table.h"
#import "metadata.h"
#import "packager.h"
#import "relationships.h"
#import "shared_strings.h"
#import "styles.h"
#import "table.h"
#import "theme.h"
#import "third_party/emyg_dtoa.h"
#import "third_party/ioapi.h"
#import "third_party/md5.h"
#import "third_party/queue.h"
#import "third_party/tmpfileplus.h"
#import "third_party/tree.h"
#import "third_party/zip.h"
#import "utility.h"
#import "vml.h"
#import "workbook.h"
#import "worksheet.h"
#import "xmlwriter.h"
FOUNDATION_EXPORT double xlsxwriterVersionNumber;
FOUNDATION_EXPORT const unsigned char xlsxwriterVersionString[];
libxlsxwriter-RELEASE_1.1.5/cocoapods/libxlsxwriter.modulemap 0000664 0000000 0000000 00000000226 14353601326 0024404 0 ustar 00root root 0000000 0000000 framework module xlsxwriter {
umbrella header "xlsxwriter/libxlsxwriter-umbrella.h"
header "xlsxwriter.h"
export *
module * { export * }
}
libxlsxwriter-RELEASE_1.1.5/dev/ 0000775 0000000 0000000 00000000000 14353601326 0016361 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/dev/release/ 0000775 0000000 0000000 00000000000 14353601326 0020001 5 ustar 00root root 0000000 0000000 libxlsxwriter-RELEASE_1.1.5/dev/release/Readme.txt 0000664 0000000 0000000 00000000142 14353601326 0021734 0 ustar 00root root 0000000 0000000
This directory contains some release utilities that are mainly useful
to the library developer.
libxlsxwriter-RELEASE_1.1.5/dev/release/fix_dox.sh 0000775 0000000 0000000 00000000320 14353601326 0021773 0 ustar 00root root 0000000 0000000 #/bin/bash
# Perform some minor clean-ups/fixes to the docs.
perl -i -pe "s/_page/_8h/" html/pages.html
perl -i ../dev/release/fix_example_docs.pl html/examples.html
cp menudata.js html
libxlsxwriter-RELEASE_1.1.5/dev/release/fix_example_docs.pl 0000664 0000000 0000000 00000014220 14353601326 0023646 0 ustar 00root root 0000000 0000000 #!/usr/bin/perl
#
# Simple program to arrange the example programs in a user defined order
# instead of a sorted order. Also add a caption.
#
# Copyright 2014-2022, John McNamara, jmcnamara@cpan.org
#
use warnings;
use strict;
# The required example order and descriptions.
my @examples = (
[ 'hello.c', 'A simple hello world example' ],
[ 'anatomy.c', 'The anatomy of a libxlsxwriter program' ],
[ 'demo.c', 'Demo of some of the libxlsxwriter features' ],
[ 'tutorial1.c', 'Tutorial 1 from the documentation' ],
[ 'tutorial2.c', 'Tutorial 2 from the documentation' ],
[ 'tutorial3.c', 'Tutorial 3 from the documentation' ],
[ 'format_font.c', 'Example of writing data with font formatting' ],
[ 'format_num_format.c', 'Example of writing data with number formatting' ],
[ 'dates_and_times01.c', 'Writing dates and times with numbers' ],
[ 'dates_and_times02.c', 'Writing dates and times with datetime' ],
[ 'dates_and_times03.c', 'Writing dates and times with Unix datetimes' ],
[ 'dates_and_times04.c', 'Dates and times with different formats' ],
[ 'hyperlinks.c', 'A example of writing urls/hyperlinks' ],
[ 'rich_strings.c', 'A example of writing "rich" multi-format strings' ],
[ 'array_formula.c', 'A example of using array formulas' ],
[ 'dynamic_arrays.c', 'A example of using Excel 365 dynamic array formulas' ],
[ 'utf8.c', 'A example of some UTF-8 text' ],
[ 'constant_memory.c', 'Write a large file with constant memory usage' ],
[ 'output_buffer.c', 'Write a file to a memory buffer' ],
[ 'image_buffer.c', 'Example of adding an image from a memory buffer.' ],
[ 'merge_range.c', 'Create a merged range of cells' ],
[ 'merge_rich_string.c', 'Create a merged range with a rich string' ],
[ 'autofilter.c', 'An example of a worksheet autofilter' ],
[ 'data_validate.c', 'Examples of worksheet data validation and drop down lists' ],
[ 'conditional_format1.c', 'A simple conditional formatting example' ],
[ 'conditional_format2.c', 'An advanced conditional formatting example' ],
[ 'tables.c', 'Example of table to a worksheet.' ],
[ 'images.c', 'Example of adding images to a worksheet.' ],
[ 'headers_footers.c', 'Example of adding worksheet headers/footers' ],
[ 'defined_name.c', 'Example of how to create defined names' ],
[ 'outline.c', 'Example of grouping and outlines' ],
[ 'outline_collapsed.c', 'Example of grouping and collapsed outlines' ],
[ 'watermark.c', 'Example of how to set a watermark image for a worksheet' ],
[ 'background.c', 'Example of how to set the background image for a worksheet' ],
[ 'tab_colors.c', 'Example of how to set worksheet tab colors' ],
[ 'diagonal_border.c', 'Example of how to set a worksheet cell diagonal border.' ],
[ 'hide_sheet.c', 'Example of hiding a worksheet' ],
[ 'doc_properties.c', 'Example of setting workbook doc properties' ],
[ 'doc_custom_properties.c','Example of setting custom doc properties' ],
[ 'worksheet_protection.c', 'Example of enabling worksheet protection' ],
[ 'hide_row_col.c', 'Example of hiding worksheet rows and columns' ],
[ 'comments1.c', 'Example of adding cell comments to a worksheet' ],
[ 'comments2.c', 'Example of adding cell comments with options' ],
[ 'macro.c', 'Example of adding a VBA macro to a workbook' ],
[ 'panes.c', 'Example of how to create worksheet panes' ],
[ 'ignore_errors.c', 'Example of ignoring worksheet errors/warnings' ],
[ 'lambda.c', 'Example of using the EXCEL 365+ LAMBDA() function' ],
[ 'chart.c', 'Example of a simple column chart' ],
[ 'chart_area.c', 'Examples of area charts' ],
[ 'chart_bar.c', 'Examples of bar charts' ],
[ 'chart_column.c', 'Examples of column charts' ],
[ 'chart_line.c', 'Example of a line chart' ],
[ 'chart_scatter.c', 'Examples of scatter charts' ],
[ 'chart_radar.c', 'Examples of radar charts' ],
[ 'chart_pie.c', 'Examples of pie charts' ],
[ 'chart_doughnut.c', 'Examples of doughnut charts' ],
[ 'chart_clustered.c', 'Examples of clustered category chart' ],
[ 'chart_data_table.c', 'Examples of charts with data tables' ],
[ 'chart_data_tools.c', 'Examples of charts data tools' ],
[ 'chart_data_labels.c', 'Examples of charts data labels' ],
[ 'chart_fonts.c', 'Examples of using charts fonts' ],
[ 'chart_pattern.c', 'Examples of using charts patterns' ],
[ 'chart_styles.c', 'Examples of built-in charts styles' ],
[ 'chartsheet.c', 'Example of a chartsheet chart' ],
);
# Convert the array refs to a hash for lookups.
my %examples;
for my $example (@examples) {
$examples{$example->[0]} = 1;
}
my $in_list = 0;
while ( my $line = <> ) {
# Print all lines not in the list.
print $line if !$in_list;
# Check for