fast_excel 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +3 -1
- data/Rakefile +4 -1
- data/fast_excel.gemspec +1 -1
- data/lib/fast_excel/binding/workbook.rb +9 -0
- data/lib/fast_excel/binding/worksheet.rb +2 -2
- data/lib/fast_excel/binding.rb +16 -13
- data/libxlsxwriter/.cirrus.yml +9 -0
- data/libxlsxwriter/.github/workflows/cmake_actions.yml +10 -6
- data/libxlsxwriter/.github/workflows/code_style.yml +2 -0
- data/libxlsxwriter/.github/workflows/make_32_actions.yml +43 -0
- data/libxlsxwriter/.github/workflows/windows_build.yml +7 -6
- data/libxlsxwriter/.github/workflows/zig_build.yml +1 -3
- data/libxlsxwriter/.gitignore +9 -7
- data/libxlsxwriter/.indent.pro +6 -0
- data/libxlsxwriter/CMakeLists.txt +377 -238
- data/libxlsxwriter/Changes.txt +189 -0
- data/libxlsxwriter/LICENSE.txt +1 -1
- data/libxlsxwriter/Makefile +36 -4
- data/libxlsxwriter/Readme.md +1 -1
- data/libxlsxwriter/build.zig +181 -92
- data/libxlsxwriter/build.zig.zon +15 -4
- data/libxlsxwriter/cocoapods/libxlsxwriter-umbrella.h +4 -0
- data/libxlsxwriter/include/xlsxwriter/app.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/chart.h +134 -1
- data/libxlsxwriter/include/xlsxwriter/chartsheet.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/comment.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/common.h +12 -8
- data/libxlsxwriter/include/xlsxwriter/content_types.h +3 -1
- data/libxlsxwriter/include/xlsxwriter/core.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/custom.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/drawing.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/format.h +34 -3
- data/libxlsxwriter/include/xlsxwriter/hash_table.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/metadata.h +5 -1
- data/libxlsxwriter/include/xlsxwriter/packager.h +6 -1
- data/libxlsxwriter/include/xlsxwriter/relationships.h +3 -1
- data/libxlsxwriter/include/xlsxwriter/rich_value.h +51 -0
- data/libxlsxwriter/include/xlsxwriter/rich_value_rel.h +50 -0
- data/libxlsxwriter/include/xlsxwriter/rich_value_structure.h +53 -0
- data/libxlsxwriter/include/xlsxwriter/rich_value_types.h +49 -0
- data/libxlsxwriter/include/xlsxwriter/shared_strings.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/styles.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/table.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/theme.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/third_party/ioapi.h +4 -4
- data/libxlsxwriter/include/xlsxwriter/third_party/zip.h +3 -3
- data/libxlsxwriter/include/xlsxwriter/utility.h +58 -7
- data/libxlsxwriter/include/xlsxwriter/vml.h +2 -1
- data/libxlsxwriter/include/xlsxwriter/workbook.h +59 -2
- data/libxlsxwriter/include/xlsxwriter/worksheet.h +159 -13
- data/libxlsxwriter/include/xlsxwriter/xmlwriter.h +11 -10
- data/libxlsxwriter/include/xlsxwriter.h +5 -4
- data/libxlsxwriter/libxlsxwriter.podspec +6 -6
- data/libxlsxwriter/src/Makefile +2 -1
- data/libxlsxwriter/src/app.c +2 -1
- data/libxlsxwriter/src/chart.c +360 -63
- data/libxlsxwriter/src/chartsheet.c +2 -1
- data/libxlsxwriter/src/comment.c +2 -1
- data/libxlsxwriter/src/content_types.c +22 -1
- data/libxlsxwriter/src/core.c +2 -1
- data/libxlsxwriter/src/custom.c +2 -1
- data/libxlsxwriter/src/drawing.c +7 -3
- data/libxlsxwriter/src/format.c +21 -1
- data/libxlsxwriter/src/hash_table.c +2 -1
- data/libxlsxwriter/src/metadata.c +176 -20
- data/libxlsxwriter/src/packager.c +306 -6
- data/libxlsxwriter/src/relationships.c +25 -1
- data/libxlsxwriter/src/rich_value.c +191 -0
- data/libxlsxwriter/src/rich_value_rel.c +142 -0
- data/libxlsxwriter/src/rich_value_structure.c +162 -0
- data/libxlsxwriter/src/rich_value_types.c +199 -0
- data/libxlsxwriter/src/shared_strings.c +2 -1
- data/libxlsxwriter/src/styles.c +31 -7
- data/libxlsxwriter/src/table.c +2 -1
- data/libxlsxwriter/src/theme.c +2 -1
- data/libxlsxwriter/src/utility.c +136 -46
- data/libxlsxwriter/src/vml.c +2 -1
- data/libxlsxwriter/src/workbook.c +191 -10
- data/libxlsxwriter/src/worksheet.c +514 -34
- data/libxlsxwriter/src/xmlwriter.c +17 -22
- data/libxlsxwriter/third_party/minizip/Makefile.orig +1 -1
- data/libxlsxwriter/third_party/minizip/configure.ac +1 -1
- data/libxlsxwriter/third_party/minizip/ioapi.h +6 -6
- data/libxlsxwriter/third_party/minizip/miniunz.c +16 -2
- data/libxlsxwriter/third_party/minizip/unzip.c +4 -4
- data/libxlsxwriter/third_party/minizip/unzip.h +1 -1
- data/libxlsxwriter/third_party/minizip/zip.c +5 -5
- data/libxlsxwriter/third_party/minizip/zip.h +3 -3
- data/libxlsxwriter/version.txt +1 -1
- data/test/validations_test.rb +3 -3
- data/test/worksheet_test.rb +10 -2
- metadata +11 -4
- data/libxlsxwriter/cmake/FindMINIZIP.cmake +0 -121
- data/libxlsxwriter/cmake/FindPackage.cmake +0 -183
- data/libxlsxwriter/cmake/i686-toolchain.cmake +0 -7
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* chart - A libxlsxwriter library for creating Excel XLSX chart files.
|
|
7
8
|
*
|
|
@@ -736,6 +737,70 @@ typedef struct lxw_chart_font {
|
|
|
736
737
|
|
|
737
738
|
} lxw_chart_font;
|
|
738
739
|
|
|
740
|
+
/**
|
|
741
|
+
* @brief Struct to represent Excel chart element layout dimensions.
|
|
742
|
+
*
|
|
743
|
+
* Excel supports manual positioning of elements such as the chart axis labels,
|
|
744
|
+
* the chart legend, the chart plot area and the chart title. The
|
|
745
|
+
* `lxw_chart_layout` struct represents the layout dimension for these elements.
|
|
746
|
+
*
|
|
747
|
+
* The layout units used by Excel are relative units expressed as a percentage
|
|
748
|
+
* of the chart dimensions and are double values in the range `0.0 < x <= 1.0`.
|
|
749
|
+
* Excel calculates these dimensions as shown below:
|
|
750
|
+
*
|
|
751
|
+
* @image html chart_layout.png
|
|
752
|
+
*
|
|
753
|
+
* With reference to the above figure the layout units are calculated as
|
|
754
|
+
* follows:
|
|
755
|
+
*
|
|
756
|
+
* ```text
|
|
757
|
+
* x = a / W
|
|
758
|
+
* y = b / H
|
|
759
|
+
* ```
|
|
760
|
+
*
|
|
761
|
+
* These units are cumbersome and can vary depending on other elements in the
|
|
762
|
+
* chart such as text lengths. However, these are the units that are required by
|
|
763
|
+
* Excel to allow relative positioning. Some trial and error is generally
|
|
764
|
+
* required.
|
|
765
|
+
*
|
|
766
|
+
* For the chart `chart_plotarea_set_layout()` and `chart_legend_set_layout()`
|
|
767
|
+
* functions you can also set the width and height based on the following
|
|
768
|
+
* calculation:
|
|
769
|
+
*
|
|
770
|
+
* ```text
|
|
771
|
+
* width = w / W
|
|
772
|
+
* height = h / H
|
|
773
|
+
* ```
|
|
774
|
+
*
|
|
775
|
+
* For other text based objects the width and height are changed by the font
|
|
776
|
+
* dimensions.
|
|
777
|
+
*
|
|
778
|
+
* The chart functions that support `lxw_chart_layout` are:
|
|
779
|
+
*
|
|
780
|
+
* - `chart_title_set_layout()`
|
|
781
|
+
* - `chart_legend_set_layout()`
|
|
782
|
+
* - `chart_plotarea_set_layout()`
|
|
783
|
+
* - `chart_axis_set_name_layout()`
|
|
784
|
+
*
|
|
785
|
+
*/
|
|
786
|
+
typedef struct lxw_chart_layout {
|
|
787
|
+
|
|
788
|
+
/** The x offset in the range `0.0 < x <= 1.0` */
|
|
789
|
+
double x;
|
|
790
|
+
|
|
791
|
+
/** The y offset in the range `0.0 < y <= 1.0` */
|
|
792
|
+
double y;
|
|
793
|
+
|
|
794
|
+
/** The width of the plotarea or legend in the range `0.0 < x <= 1.0` */
|
|
795
|
+
double width;
|
|
796
|
+
|
|
797
|
+
/** The height of the plotarea or legend in the range `0.0 < x <= 1.0` */
|
|
798
|
+
double height;
|
|
799
|
+
|
|
800
|
+
uint8_t has_inner;
|
|
801
|
+
|
|
802
|
+
} lxw_chart_layout;
|
|
803
|
+
|
|
739
804
|
typedef struct lxw_chart_marker {
|
|
740
805
|
|
|
741
806
|
uint8_t type;
|
|
@@ -750,6 +815,7 @@ typedef struct lxw_chart_legend {
|
|
|
750
815
|
|
|
751
816
|
lxw_chart_font *font;
|
|
752
817
|
uint8_t position;
|
|
818
|
+
lxw_chart_layout *layout;
|
|
753
819
|
|
|
754
820
|
} lxw_chart_legend;
|
|
755
821
|
|
|
@@ -762,12 +828,14 @@ typedef struct lxw_chart_title {
|
|
|
762
828
|
uint8_t off;
|
|
763
829
|
uint8_t is_horizontal;
|
|
764
830
|
uint8_t ignore_cache;
|
|
831
|
+
uint8_t has_overlay;
|
|
765
832
|
|
|
766
833
|
/* We use a range to hold the title formula properties even though it
|
|
767
834
|
* will only have 1 point in order to re-use similar functions.*/
|
|
768
835
|
lxw_series_range *range;
|
|
769
836
|
|
|
770
837
|
struct lxw_series_data_point data_point;
|
|
838
|
+
lxw_chart_layout *layout;
|
|
771
839
|
|
|
772
840
|
} lxw_chart_title;
|
|
773
841
|
|
|
@@ -860,6 +928,13 @@ enum lxw_chart_position {
|
|
|
860
928
|
LXW_CHART_AXIS_BOTTOM
|
|
861
929
|
};
|
|
862
930
|
|
|
931
|
+
enum lxw_chart_layout_type {
|
|
932
|
+
LXW_CHART_LAYOUT_TITLE,
|
|
933
|
+
LXW_CHART_LAYOUT_LEGEND,
|
|
934
|
+
LXW_CHART_LAYOUT_PLOTAREA,
|
|
935
|
+
LXW_CHART_LAYOUT_AXIS_NAME
|
|
936
|
+
};
|
|
937
|
+
|
|
863
938
|
/**
|
|
864
939
|
* @brief Type/amount of data series error bar.
|
|
865
940
|
*/
|
|
@@ -1148,8 +1223,10 @@ typedef struct lxw_chart {
|
|
|
1148
1223
|
lxw_chart_line *chartarea_line;
|
|
1149
1224
|
lxw_chart_fill *chartarea_fill;
|
|
1150
1225
|
lxw_chart_pattern *chartarea_pattern;
|
|
1226
|
+
|
|
1151
1227
|
lxw_chart_line *plotarea_line;
|
|
1152
1228
|
lxw_chart_fill *plotarea_fill;
|
|
1229
|
+
lxw_chart_layout *plotarea_layout;
|
|
1153
1230
|
lxw_chart_pattern *plotarea_pattern;
|
|
1154
1231
|
|
|
1155
1232
|
uint8_t has_drop_lines;
|
|
@@ -2502,6 +2579,18 @@ void chart_axis_set_name(lxw_chart_axis *axis, const char *name);
|
|
|
2502
2579
|
void chart_axis_set_name_range(lxw_chart_axis *axis, const char *sheetname,
|
|
2503
2580
|
lxw_row_t row, lxw_col_t col);
|
|
2504
2581
|
|
|
2582
|
+
/**
|
|
2583
|
+
* @brief Set the manual position of the chart axis name.
|
|
2584
|
+
*
|
|
2585
|
+
* @param axis A pointer to a chart #lxw_chart_axis object.
|
|
2586
|
+
* @param layout A pointer to a chart #lxw_chart_layout struct.
|
|
2587
|
+
*
|
|
2588
|
+
* This function is used to simulate setting the manual position of a chart
|
|
2589
|
+
* axis name. See @ref chart_layout for more information.
|
|
2590
|
+
*/
|
|
2591
|
+
void chart_axis_set_name_layout(lxw_chart_axis *axis,
|
|
2592
|
+
lxw_chart_layout *layout);
|
|
2593
|
+
|
|
2505
2594
|
/**
|
|
2506
2595
|
* @brief Set the font properties for a chart axis name.
|
|
2507
2596
|
*
|
|
@@ -3278,6 +3367,28 @@ void chart_title_set_name_font(lxw_chart *chart, lxw_chart_font *font);
|
|
|
3278
3367
|
*/
|
|
3279
3368
|
void chart_title_off(lxw_chart *chart);
|
|
3280
3369
|
|
|
3370
|
+
/**
|
|
3371
|
+
* @brief Set the manual position of the chart title.
|
|
3372
|
+
*
|
|
3373
|
+
* @param chart Pointer to a lxw_chart instance to be configured.
|
|
3374
|
+
* @param layout A pointer to a chart #lxw_chart_layout struct.
|
|
3375
|
+
*
|
|
3376
|
+
* This function is used to simulate setting the manual position of the chart
|
|
3377
|
+
* title. See @ref chart_layout for more information.
|
|
3378
|
+
*/
|
|
3379
|
+
void chart_title_set_layout(lxw_chart *chart, lxw_chart_layout *layout);
|
|
3380
|
+
|
|
3381
|
+
/**
|
|
3382
|
+
* @brief Allow the chart title to overlay the chart.
|
|
3383
|
+
*
|
|
3384
|
+
* @param chart Pointer to a lxw_chart instance to be configured.
|
|
3385
|
+
* @param overlay Turn off/on the overlay. (0/1)
|
|
3386
|
+
*
|
|
3387
|
+
* This option allows the chart title to overlay the chart when the
|
|
3388
|
+
* `chart_title_set_layout()` function.
|
|
3389
|
+
*/
|
|
3390
|
+
void chart_title_set_overlay(lxw_chart *chart, uint8_t overlay);
|
|
3391
|
+
|
|
3281
3392
|
/**
|
|
3282
3393
|
* @brief Set the position of the chart legend.
|
|
3283
3394
|
*
|
|
@@ -3316,6 +3427,17 @@ void chart_title_off(lxw_chart *chart);
|
|
|
3316
3427
|
*/
|
|
3317
3428
|
void chart_legend_set_position(lxw_chart *chart, uint8_t position);
|
|
3318
3429
|
|
|
3430
|
+
/**
|
|
3431
|
+
* @brief Set the manual layout of the chart legend.
|
|
3432
|
+
*
|
|
3433
|
+
* @param chart Pointer to a lxw_chart instance to be configured.
|
|
3434
|
+
* @param layout A pointer to a chart #lxw_chart_layout struct.
|
|
3435
|
+
*
|
|
3436
|
+
* This function is used to simulate setting the manual position of the chart
|
|
3437
|
+
* legend. See @ref chart_layout for more information.
|
|
3438
|
+
*/
|
|
3439
|
+
void chart_legend_set_layout(lxw_chart *chart, lxw_chart_layout *layout);
|
|
3440
|
+
|
|
3319
3441
|
/**
|
|
3320
3442
|
* @brief Set the font properties for a chart legend.
|
|
3321
3443
|
*
|
|
@@ -3483,6 +3605,17 @@ void chart_plotarea_set_fill(lxw_chart *chart, lxw_chart_fill *fill);
|
|
|
3483
3605
|
*/
|
|
3484
3606
|
void chart_plotarea_set_pattern(lxw_chart *chart, lxw_chart_pattern *pattern);
|
|
3485
3607
|
|
|
3608
|
+
/**
|
|
3609
|
+
* @brief Set the manual layout of the chart plotarea.
|
|
3610
|
+
*
|
|
3611
|
+
* @param chart Pointer to a lxw_chart instance to be configured.
|
|
3612
|
+
* @param layout A pointer to a chart #lxw_chart_layout struct.
|
|
3613
|
+
*
|
|
3614
|
+
* This function is used to simulate setting the manual position of the chart
|
|
3615
|
+
* plotarea. See @ref chart_layout for more information.
|
|
3616
|
+
*/
|
|
3617
|
+
void chart_plotarea_set_layout(lxw_chart *chart, lxw_chart_layout *layout);
|
|
3618
|
+
|
|
3486
3619
|
/**
|
|
3487
3620
|
* @brief Set the chart style type.
|
|
3488
3621
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* chartsheet - A libxlsxwriter library for creating Excel XLSX chartsheet files.
|
|
7
8
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* comment - A libxlsxwriter library for creating Excel XLSX comment files.
|
|
7
8
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
*
|
|
10
11
|
* @brief Common functions and defines for the libxlsxwriter library.
|
|
11
12
|
*
|
|
12
|
-
* <!-- Copyright 2014-
|
|
13
|
+
* <!-- Copyright 2014-2026, John McNamara, jmcnamara@cpan.org -->
|
|
13
14
|
*
|
|
14
15
|
*/
|
|
15
16
|
#ifndef __LXW_COMMON_H__
|
|
@@ -106,6 +107,12 @@ typedef enum lxw_error {
|
|
|
106
107
|
/** Function parameter validation error. */
|
|
107
108
|
LXW_ERROR_PARAMETER_VALIDATION,
|
|
108
109
|
|
|
110
|
+
/** Function string parameter is empty. */
|
|
111
|
+
LXW_ERROR_PARAMETER_IS_EMPTY,
|
|
112
|
+
|
|
113
|
+
/** A #lxw_datetime parameter has a validation error. */
|
|
114
|
+
LXW_ERROR_DATETIME_VALIDATION,
|
|
115
|
+
|
|
109
116
|
/** Worksheet name exceeds Excel's limit of 31 characters. */
|
|
110
117
|
LXW_ERROR_SHEETNAME_LENGTH_EXCEEDED,
|
|
111
118
|
|
|
@@ -208,9 +215,6 @@ enum lxw_custom_property_types {
|
|
|
208
215
|
/* GUID string length. */
|
|
209
216
|
#define LXW_GUID_LENGTH sizeof("{12345678-1234-1234-1234-1234567890AB}\0")
|
|
210
217
|
|
|
211
|
-
#define LXW_EPOCH_1900 0
|
|
212
|
-
#define LXW_EPOCH_1904 1
|
|
213
|
-
|
|
214
218
|
#define LXW_UINT32_T_LENGTH sizeof("4294967296")
|
|
215
219
|
#define LXW_FILENAME_LENGTH 128
|
|
216
220
|
#define LXW_IGNORE 1
|
|
@@ -344,7 +348,7 @@ enum lxw_custom_property_types {
|
|
|
344
348
|
|
|
345
349
|
#ifndef LXW_BIG_ENDIAN
|
|
346
350
|
#define LXW_UINT16_HOST(n) (n)
|
|
347
|
-
#define
|
|
351
|
+
#define LXW_INT32_HOST(n) ((int32_t)(n))
|
|
348
352
|
#define LXW_UINT16_NETWORK(n) ((((n) & 0x00FF) << 8) | (((n) & 0xFF00) >> 8))
|
|
349
353
|
#define LXW_UINT32_NETWORK(n) ((((n) & 0xFF) << 24) | \
|
|
350
354
|
(((n) & 0xFF00) << 8) | \
|
|
@@ -354,10 +358,10 @@ enum lxw_custom_property_types {
|
|
|
354
358
|
#define LXW_UINT16_NETWORK(n) (n)
|
|
355
359
|
#define LXW_UINT32_NETWORK(n) (n)
|
|
356
360
|
#define LXW_UINT16_HOST(n) ((((n) & 0x00FF) << 8) | (((n) & 0xFF00) >> 8))
|
|
357
|
-
#define
|
|
361
|
+
#define LXW_INT32_HOST(n) ((int32_t)((((n) & 0xFF) << 24) | \
|
|
358
362
|
(((n) & 0xFF00) << 8) | \
|
|
359
363
|
(((n) & 0xFF0000) >> 8) | \
|
|
360
|
-
(((n) & 0xFF000000) >> 24))
|
|
364
|
+
(((n) & 0xFF000000) >> 24)))
|
|
361
365
|
#endif
|
|
362
366
|
|
|
363
367
|
/* *INDENT-OFF* */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* content_types - A libxlsxwriter library for creating Excel XLSX
|
|
7
8
|
* content_types files.
|
|
@@ -63,6 +64,7 @@ void lxw_ct_add_shared_strings(lxw_content_types *content_types);
|
|
|
63
64
|
void lxw_ct_add_calc_chain(lxw_content_types *content_types);
|
|
64
65
|
void lxw_ct_add_custom_properties(lxw_content_types *content_types);
|
|
65
66
|
void lxw_ct_add_metadata(lxw_content_types *content_types);
|
|
67
|
+
void lxw_ct_add_rich_value(lxw_content_types *content_types);
|
|
66
68
|
|
|
67
69
|
/* Declarations required for unit testing. */
|
|
68
70
|
#ifdef TESTING
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* core - A libxlsxwriter library for creating Excel XLSX core files.
|
|
7
8
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* custom - A libxlsxwriter library for creating Excel custom property files.
|
|
7
8
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* drawing - A libxlsxwriter library for creating Excel XLSX drawing files.
|
|
7
8
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -664,6 +665,38 @@ void format_set_font_strikeout(lxw_format *format);
|
|
|
664
665
|
*/
|
|
665
666
|
void format_set_font_script(lxw_format *format, uint8_t style);
|
|
666
667
|
|
|
668
|
+
/**
|
|
669
|
+
* @brief Set the Format font family property.
|
|
670
|
+
*
|
|
671
|
+
* @param format Pointer to a Format instance.
|
|
672
|
+
* @param value The font family index.
|
|
673
|
+
*
|
|
674
|
+
* Set the font family. This is usually an integer in the range 1-4. This
|
|
675
|
+
* function is implemented for completeness but is rarely used in practice.
|
|
676
|
+
*
|
|
677
|
+
* @code
|
|
678
|
+
* format_set_font_family(format, 178);
|
|
679
|
+
* @endcode
|
|
680
|
+
*
|
|
681
|
+
*/
|
|
682
|
+
void format_set_font_family(lxw_format *format, uint8_t value);
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* @brief Set the Format font character set property.
|
|
686
|
+
*
|
|
687
|
+
* @param format Pointer to a Format instance.
|
|
688
|
+
* @param value The font character set.
|
|
689
|
+
*
|
|
690
|
+
* Set the font character set property. This function is implemented for
|
|
691
|
+
* completeness but is rarely used in practice.
|
|
692
|
+
*
|
|
693
|
+
* @code
|
|
694
|
+
* format_set_font_charset(format, 178);
|
|
695
|
+
* @endcode
|
|
696
|
+
*
|
|
697
|
+
*/
|
|
698
|
+
void format_set_font_charset(lxw_format *format, uint8_t value);
|
|
699
|
+
|
|
667
700
|
/**
|
|
668
701
|
* @brief Set the number format for a cell.
|
|
669
702
|
*
|
|
@@ -1302,8 +1335,6 @@ void format_set_quote_prefix(lxw_format *format);
|
|
|
1302
1335
|
|
|
1303
1336
|
void format_set_font_outline(lxw_format *format);
|
|
1304
1337
|
void format_set_font_shadow(lxw_format *format);
|
|
1305
|
-
void format_set_font_family(lxw_format *format, uint8_t value);
|
|
1306
|
-
void format_set_font_charset(lxw_format *format, uint8_t value);
|
|
1307
1338
|
void format_set_font_scheme(lxw_format *format, const char *font_scheme);
|
|
1308
1339
|
void format_set_font_condense(lxw_format *format);
|
|
1309
1340
|
void format_set_font_extend(lxw_format *format);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* hash_table - Hash table functions for libxlsxwriter.
|
|
7
8
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* metadata - A libxlsxwriter library for creating Excel XLSX metadata files.
|
|
7
8
|
*
|
|
@@ -19,6 +20,9 @@
|
|
|
19
20
|
typedef struct lxw_metadata {
|
|
20
21
|
|
|
21
22
|
FILE *file;
|
|
23
|
+
uint8_t has_dynamic_functions;
|
|
24
|
+
uint8_t has_embedded_images;
|
|
25
|
+
uint32_t num_embedded_images;
|
|
22
26
|
|
|
23
27
|
} lxw_metadata;
|
|
24
28
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* packager - A libxlsxwriter library for creating Excel XLSX packager files.
|
|
7
8
|
*
|
|
@@ -36,6 +37,10 @@
|
|
|
36
37
|
#include "vml.h"
|
|
37
38
|
#include "comment.h"
|
|
38
39
|
#include "metadata.h"
|
|
40
|
+
#include "rich_value.h"
|
|
41
|
+
#include "rich_value_rel.h"
|
|
42
|
+
#include "rich_value_types.h"
|
|
43
|
+
#include "rich_value_structure.h"
|
|
39
44
|
|
|
40
45
|
#define LXW_ZIP_BUFFER_SIZE (16384)
|
|
41
46
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* relationships - A libxlsxwriter library for creating Excel XLSX
|
|
7
8
|
* relationships files.
|
|
@@ -60,6 +61,7 @@ void lxw_add_ms_package_relationship(lxw_relationships *self,
|
|
|
60
61
|
void lxw_add_worksheet_relationship(lxw_relationships *self, const char *type,
|
|
61
62
|
const char *target,
|
|
62
63
|
const char *target_mode);
|
|
64
|
+
void lxw_add_rich_value_relationship(lxw_relationships *self);
|
|
63
65
|
|
|
64
66
|
/* Declarations required for unit testing. */
|
|
65
67
|
#ifdef TESTING
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* libxlsxwriter
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
|
|
5
|
+
*
|
|
6
|
+
* rich_value - A libxlsxwriter library for creating Excel XLSX rich_value files.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
#ifndef __LXW_RICH_VALUE_H__
|
|
10
|
+
#define __LXW_RICH_VALUE_H__
|
|
11
|
+
|
|
12
|
+
#include <stdint.h>
|
|
13
|
+
|
|
14
|
+
#include "common.h"
|
|
15
|
+
#include "workbook.h"
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* Struct to represent a rich_value object.
|
|
19
|
+
*/
|
|
20
|
+
typedef struct lxw_rich_value {
|
|
21
|
+
|
|
22
|
+
FILE *file;
|
|
23
|
+
lxw_workbook *workbook;
|
|
24
|
+
|
|
25
|
+
} lxw_rich_value;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/* *INDENT-OFF* */
|
|
29
|
+
#ifdef __cplusplus
|
|
30
|
+
extern "C" {
|
|
31
|
+
#endif
|
|
32
|
+
/* *INDENT-ON* */
|
|
33
|
+
|
|
34
|
+
lxw_rich_value *lxw_rich_value_new(void);
|
|
35
|
+
void lxw_rich_value_free(lxw_rich_value *rich_value);
|
|
36
|
+
void lxw_rich_value_assemble_xml_file(lxw_rich_value *self);
|
|
37
|
+
|
|
38
|
+
/* Declarations required for unit testing. */
|
|
39
|
+
#ifdef TESTING
|
|
40
|
+
|
|
41
|
+
STATIC void _rich_value_xml_declaration(lxw_rich_value *self);
|
|
42
|
+
|
|
43
|
+
#endif /* TESTING */
|
|
44
|
+
|
|
45
|
+
/* *INDENT-OFF* */
|
|
46
|
+
#ifdef __cplusplus
|
|
47
|
+
}
|
|
48
|
+
#endif
|
|
49
|
+
/* *INDENT-ON* */
|
|
50
|
+
|
|
51
|
+
#endif /* __LXW_RICH_VALUE_H__ */
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* libxlsxwriter
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
|
|
5
|
+
*
|
|
6
|
+
* rich_value_rel - A libxlsxwriter library for creating Excel XLSX rich_value_rel files.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
#ifndef __LXW_RICH_VALUE_REL_H__
|
|
10
|
+
#define __LXW_RICH_VALUE_REL_H__
|
|
11
|
+
|
|
12
|
+
#include <stdint.h>
|
|
13
|
+
|
|
14
|
+
#include "common.h"
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Struct to represent a rich_value_rel object.
|
|
18
|
+
*/
|
|
19
|
+
typedef struct lxw_rich_value_rel {
|
|
20
|
+
|
|
21
|
+
FILE *file;
|
|
22
|
+
uint32_t num_embedded_images;
|
|
23
|
+
|
|
24
|
+
} lxw_rich_value_rel;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* *INDENT-OFF* */
|
|
28
|
+
#ifdef __cplusplus
|
|
29
|
+
extern "C" {
|
|
30
|
+
#endif
|
|
31
|
+
/* *INDENT-ON* */
|
|
32
|
+
|
|
33
|
+
lxw_rich_value_rel *lxw_rich_value_rel_new(void);
|
|
34
|
+
void lxw_rich_value_rel_free(lxw_rich_value_rel *rich_value_rel);
|
|
35
|
+
void lxw_rich_value_rel_assemble_xml_file(lxw_rich_value_rel *self);
|
|
36
|
+
|
|
37
|
+
/* Declarations required for unit testing. */
|
|
38
|
+
#ifdef TESTING
|
|
39
|
+
|
|
40
|
+
STATIC void _rich_value_rel_xml_declaration(lxw_rich_value_rel *self);
|
|
41
|
+
|
|
42
|
+
#endif /* TESTING */
|
|
43
|
+
|
|
44
|
+
/* *INDENT-OFF* */
|
|
45
|
+
#ifdef __cplusplus
|
|
46
|
+
}
|
|
47
|
+
#endif
|
|
48
|
+
/* *INDENT-ON* */
|
|
49
|
+
|
|
50
|
+
#endif /* __LXW_RICH_VALUE_REL_H__ */
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* libxlsxwriter
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
|
|
5
|
+
*
|
|
6
|
+
* rich_value_structure - A libxlsxwriter library for creating Excel XLSX rich_value_structure files.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
#ifndef __LXW_RICH_VALUE_STRUCTURE_H__
|
|
10
|
+
#define __LXW_RICH_VALUE_STRUCTURE_H__
|
|
11
|
+
|
|
12
|
+
#include <stdint.h>
|
|
13
|
+
|
|
14
|
+
#include "common.h"
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Struct to represent a rich_value_structure object.
|
|
18
|
+
*/
|
|
19
|
+
typedef struct lxw_rich_value_structure {
|
|
20
|
+
|
|
21
|
+
FILE *file;
|
|
22
|
+
uint8_t has_embedded_image_descriptions;
|
|
23
|
+
|
|
24
|
+
} lxw_rich_value_structure;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/* *INDENT-OFF* */
|
|
28
|
+
#ifdef __cplusplus
|
|
29
|
+
extern "C" {
|
|
30
|
+
#endif
|
|
31
|
+
/* *INDENT-ON* */
|
|
32
|
+
|
|
33
|
+
lxw_rich_value_structure *lxw_rich_value_structure_new(void);
|
|
34
|
+
void lxw_rich_value_structure_free(lxw_rich_value_structure
|
|
35
|
+
*rich_value_structure);
|
|
36
|
+
void lxw_rich_value_structure_assemble_xml_file(lxw_rich_value_structure
|
|
37
|
+
*self);
|
|
38
|
+
|
|
39
|
+
/* Declarations required for unit testing. */
|
|
40
|
+
#ifdef TESTING
|
|
41
|
+
|
|
42
|
+
STATIC void _rich_value_structure_xml_declaration(lxw_rich_value_structure
|
|
43
|
+
*self);
|
|
44
|
+
|
|
45
|
+
#endif /* TESTING */
|
|
46
|
+
|
|
47
|
+
/* *INDENT-OFF* */
|
|
48
|
+
#ifdef __cplusplus
|
|
49
|
+
}
|
|
50
|
+
#endif
|
|
51
|
+
/* *INDENT-ON* */
|
|
52
|
+
|
|
53
|
+
#endif /* __LXW_RICH_VALUE_STRUCTURE_H__ */
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* libxlsxwriter
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org. See LICENSE.txt.
|
|
5
|
+
*
|
|
6
|
+
* rich_value_types - A libxlsxwriter library for creating Excel XLSX rich_value_types files.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
#ifndef __LXW_RICH_VALUE_TYPES_H__
|
|
10
|
+
#define __LXW_RICH_VALUE_TYPES_H__
|
|
11
|
+
|
|
12
|
+
#include <stdint.h>
|
|
13
|
+
|
|
14
|
+
#include "common.h"
|
|
15
|
+
|
|
16
|
+
/*
|
|
17
|
+
* Struct to represent a rich_value_types object.
|
|
18
|
+
*/
|
|
19
|
+
typedef struct lxw_rich_value_types {
|
|
20
|
+
|
|
21
|
+
FILE *file;
|
|
22
|
+
|
|
23
|
+
} lxw_rich_value_types;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/* *INDENT-OFF* */
|
|
27
|
+
#ifdef __cplusplus
|
|
28
|
+
extern "C" {
|
|
29
|
+
#endif
|
|
30
|
+
/* *INDENT-ON* */
|
|
31
|
+
|
|
32
|
+
lxw_rich_value_types *lxw_rich_value_types_new(void);
|
|
33
|
+
void lxw_rich_value_types_free(lxw_rich_value_types *rich_value_types);
|
|
34
|
+
void lxw_rich_value_types_assemble_xml_file(lxw_rich_value_types *self);
|
|
35
|
+
|
|
36
|
+
/* Declarations required for unit testing. */
|
|
37
|
+
#ifdef TESTING
|
|
38
|
+
|
|
39
|
+
STATIC void _rich_value_types_xml_declaration(lxw_rich_value_types *self);
|
|
40
|
+
|
|
41
|
+
#endif /* TESTING */
|
|
42
|
+
|
|
43
|
+
/* *INDENT-OFF* */
|
|
44
|
+
#ifdef __cplusplus
|
|
45
|
+
}
|
|
46
|
+
#endif
|
|
47
|
+
/* *INDENT-ON* */
|
|
48
|
+
|
|
49
|
+
#endif /* __LXW_RICH_VALUE_TYPES_H__ */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* libxlsxwriter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* SPDX-License-Identifier: BSD-2-Clause
|
|
5
|
+
* Copyright 2014-2026, John McNamara, jmcnamara@cpan.org.
|
|
5
6
|
*
|
|
6
7
|
* shared_strings - A libxlsxwriter library for creating Excel XLSX
|
|
7
8
|
* sst files.
|