diff --git a/Changes.txt b/Changes.txt index 526b761f..e457587d 100644 --- a/Changes.txt +++ b/Changes.txt @@ -57,7 +57,7 @@ ## 0.0.7 March 7 2015 - Added the `worksheet_merge_range()` method to merge worksheet cells. See - also @ref merge1.c. + also @ref merge_range.c. ## 0.0.6 March 5 2015 diff --git a/dev/release/fix_example_docs.pl b/dev/release/fix_example_docs.pl index 09d3d369..e58bb0a3 100644 --- a/dev/release/fix_example_docs.pl +++ b/dev/release/fix_example_docs.pl @@ -24,7 +24,7 @@ my @examples = ( [ 'dates_and_times03.c', 'Dates and times with different formats' ], [ 'utf8.c', 'A example of some UTF-8 text' ], [ 'constant_memory.c', 'Write a large file with constant memory usage' ], - [ 'merge1.c', 'Create a merged range of cells' ], + [ 'merge_range.c', 'Create a merged range of cells' ], [ 'headers_footers.c', 'Example of adding worksheet headers/footers' ], [ 'defined_name.c', 'Example of how to create defined names' ], ); diff --git a/docs/images/merge.png b/docs/images/merge.png new file mode 100644 index 00000000..374097ce Binary files /dev/null and b/docs/images/merge.png differ diff --git a/docs/images/merge1.png b/docs/images/merge1.png deleted file mode 100644 index a4dadc6c..00000000 Binary files a/docs/images/merge1.png and /dev/null differ diff --git a/docs/images/merge_range.png b/docs/images/merge_range.png index 374097ce..e7ceb631 100644 Binary files a/docs/images/merge_range.png and b/docs/images/merge_range.png differ diff --git a/docs/src/examples.dox b/docs/src/examples.dox index 74df0eb2..3a20e534 100644 --- a/docs/src/examples.dox +++ b/docs/src/examples.dox @@ -12,7 +12,8 @@ Next example: @ref anatomy.c @example anatomy.c -Anatomy of a simple libxlsxwriter program. +Anatomy of a simple libxlsxwriter program where the program is +explained line by line with comments. Next example: @ref demo.c @image html anatomy.png @@ -97,15 +98,15 @@ Next example: @ref constant_memory.c Example of using libxlsxwriter for writing large files in constant memory mode. -Next example: @ref merge1.c +Next example: @ref merge_range.c @image html constant_memory.png -@example merge1.c +@example merge_range.c Example of merging cells in a worksheet. Next example: @ref headers_footers.c -@image html merge1.png +@image html merge_range.png @example headers_footers.c diff --git a/examples/merge2.c b/examples/merge2.c deleted file mode 100644 index 46eef4ec..00000000 --- a/examples/merge2.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * An example of merging cells using libxlsxwriter. - * - * Copyright 2014-2015, John McNamara, jmcnamara@cpan.org - * - */ - -#include "xlsxwriter.h" - -int main() { - - lxw_workbook *workbook = new_workbook("merge2.xlsx"); - lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); - lxw_format *merge_format = workbook_add_format(workbook); - - /* Configure a format for the merged range. */ - format_set_align(merge_format, LXW_ALIGN_CENTER); - format_set_align(merge_format, LXW_ALIGN_VERTICAL_CENTER); - format_set_bold(merge_format); - format_set_bg_color(merge_format, 0xD7E4BC); - format_set_border(merge_format, LXW_BORDER_DOUBLE); - - /* Increase the cell size of the merged cells to highlight the formatting. */ - worksheet_set_column(worksheet, 1, 3, 12, NULL, NULL); - worksheet_set_row(worksheet, 2, 30, NULL, NULL); - worksheet_set_row(worksheet, 3, 30, NULL, NULL); - - /* Merge 3 cells over two rows. */ - worksheet_merge_range(worksheet, 2, 1, 3, 3, "Merged Range", merge_format); - - workbook_close(workbook); - - return 0; -} diff --git a/examples/merge1.c b/examples/merge_range.c similarity index 94% rename from examples/merge1.c rename to examples/merge_range.c index 538a014d..4e8256b8 100644 --- a/examples/merge1.c +++ b/examples/merge_range.c @@ -9,7 +9,7 @@ int main() { - lxw_workbook *workbook = new_workbook("merge1.xlsx"); + lxw_workbook *workbook = new_workbook("merge_range.xlsx"); lxw_worksheet *worksheet = workbook_add_worksheet(workbook, NULL); lxw_format *merge_format = workbook_add_format(workbook); diff --git a/include/xlsxwriter/worksheet.h b/include/xlsxwriter/worksheet.h index 4a06e8f5..b7086a7d 100644 --- a/include/xlsxwriter/worksheet.h +++ b/include/xlsxwriter/worksheet.h @@ -814,7 +814,7 @@ int8_t worksheet_set_column(lxw_worksheet *worksheet, lxw_col_t first_col, * * @endcode * - * @image html merge_range.png + * @image html merge.png * * The `%worksheet_merge_range()` function writes a `char*` string using * `worksheet_write_string()`. In order to write other data types, such as a