write_xlsx 0.85.9 → 1.09.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +53 -1
- data/Changes +242 -0
- data/LICENSE.txt +1 -1
- data/README.md +5 -5
- data/examples/a_simple.rb +2 -7
- data/examples/add_vba_project.rb +1 -1
- data/examples/array_formula.rb +1 -1
- data/examples/background.rb +19 -0
- data/examples/chart_area.rb +5 -2
- data/examples/chart_bar.rb +5 -2
- data/examples/chart_clustered.rb +1 -1
- data/examples/chart_column.rb +5 -2
- data/examples/chart_combined.rb +4 -2
- data/examples/chart_data_labels.rb +320 -0
- data/examples/chart_data_table.rb +9 -3
- data/examples/chart_data_tools.rb +25 -7
- data/examples/chart_doughnut.rb +17 -5
- data/examples/chart_gauge.rb +73 -0
- data/examples/chart_line.rb +90 -12
- data/examples/chart_pareto.rb +1 -1
- data/examples/chart_pie.rb +9 -3
- data/examples/chart_radar.rb +13 -4
- data/examples/chart_scatter.rb +5 -2
- data/examples/chart_secondary_axis.rb +5 -2
- data/examples/chart_stock.rb +1 -1
- data/examples/chart_styles.rb +1 -1
- data/examples/colors.rb +48 -1
- data/examples/comments2.rb +1 -1
- data/examples/conditional_format.rb +79 -1
- data/examples/data_validate.rb +8 -8
- data/examples/date_time.rb +1 -1
- data/examples/demo.rb +5 -8
- data/examples/formats.rb +1 -1
- data/examples/headers.rb +1 -1
- data/examples/hide_row_col.rb +1 -1
- data/examples/hide_sheet.rb +1 -1
- data/examples/hyperlink1.rb +5 -12
- data/examples/ignore_errors.rb +39 -0
- data/examples/indent.rb +1 -1
- data/examples/keep_leading_zeros.rb +17 -0
- data/examples/macros.rb +1 -1
- data/examples/merge1.rb +1 -1
- data/examples/merge2.rb +1 -1
- data/examples/merge3.rb +1 -1
- data/examples/merge4.rb +1 -1
- data/examples/merge5.rb +1 -1
- data/examples/merge6.rb +1 -1
- data/examples/outline.rb +1 -1
- data/examples/outline_collapsed.rb +1 -1
- data/examples/panes.rb +2 -2
- data/examples/properties.rb +1 -1
- data/examples/regions.rb +1 -1
- data/examples/rich_strings.rb +1 -1
- data/examples/right_to_left.rb +1 -1
- data/examples/shape1.rb +1 -1
- data/examples/shape2.rb +1 -1
- data/examples/shape3.rb +1 -1
- data/examples/shape4.rb +1 -1
- data/examples/shape5.rb +1 -1
- data/examples/shape6.rb +1 -1
- data/examples/shape7.rb +1 -1
- data/examples/shape8.rb +1 -1
- data/examples/shape_all.rb +1 -1
- data/examples/sparklines1.rb +1 -1
- data/examples/sparklines2.rb +1 -1
- data/examples/stats.rb +1 -1
- data/examples/stats_ext.rb +1 -1
- data/examples/stocks.rb +1 -1
- data/examples/tab_colors.rb +2 -2
- data/examples/tables.rb +78 -43
- data/examples/update_range_format_with_params.rb +33 -0
- data/lib/write_xlsx/chart/area.rb +1 -1
- data/lib/write_xlsx/chart/axis.rb +37 -12
- data/lib/write_xlsx/chart/bar.rb +1 -1
- data/lib/write_xlsx/chart/caption.rb +3 -1
- data/lib/write_xlsx/chart/column.rb +1 -1
- data/lib/write_xlsx/chart/doughnut.rb +1 -1
- data/lib/write_xlsx/chart/legend.rb +14 -0
- data/lib/write_xlsx/chart/line.rb +16 -2
- data/lib/write_xlsx/chart/pie.rb +32 -15
- data/lib/write_xlsx/chart/radar.rb +1 -1
- data/lib/write_xlsx/chart/scatter.rb +1 -16
- data/lib/write_xlsx/chart/series.rb +138 -18
- data/lib/write_xlsx/chart/stock.rb +1 -1
- data/lib/write_xlsx/chart.rb +365 -277
- data/lib/write_xlsx/chartsheet.rb +38 -10
- data/lib/write_xlsx/drawing.rb +190 -71
- data/lib/write_xlsx/format.rb +41 -201
- data/lib/write_xlsx/package/app.rb +17 -5
- data/lib/write_xlsx/package/button.rb +8 -8
- data/lib/write_xlsx/package/comments.rb +73 -68
- data/lib/write_xlsx/package/conditional_format.rb +367 -46
- data/lib/write_xlsx/package/content_types.rb +28 -9
- data/lib/write_xlsx/package/core.rb +13 -11
- data/lib/write_xlsx/package/custom.rb +125 -0
- data/lib/write_xlsx/package/metadata.rb +159 -0
- data/lib/write_xlsx/package/packager.rb +48 -0
- data/lib/write_xlsx/package/relationships.rb +4 -4
- data/lib/write_xlsx/package/shared_strings.rb +6 -6
- data/lib/write_xlsx/package/styles.rb +102 -39
- data/lib/write_xlsx/package/table.rb +83 -36
- data/lib/write_xlsx/package/theme.rb +1 -1
- data/lib/write_xlsx/package/vml.rb +63 -62
- data/lib/write_xlsx/package/xml_writer_simple.rb +3 -2
- data/lib/write_xlsx/shape.rb +21 -18
- data/lib/write_xlsx/sheets.rb +18 -16
- data/lib/write_xlsx/sparkline.rb +341 -341
- data/lib/write_xlsx/utility.rb +414 -53
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +396 -699
- data/lib/write_xlsx/worksheet/cell_data.rb +46 -3
- data/lib/write_xlsx/worksheet/data_validation.rb +53 -50
- data/lib/write_xlsx/worksheet/hyperlink.rb +29 -50
- data/lib/write_xlsx/worksheet/page_setup.rb +12 -12
- data/lib/write_xlsx/worksheet.rb +1043 -4366
- data/test/chart/test_add_series.rb +11 -1
- data/test/chart/test_process_names.rb +1 -1
- data/test/chart/test_write_a_latin.rb +1 -1
- data/test/chart/test_write_auto.rb +1 -1
- data/test/chart/test_write_ax_id.rb +1 -1
- data/test/chart/test_write_ax_pos.rb +1 -1
- data/test/chart/test_write_cross_ax.rb +1 -1
- data/test/chart/test_write_crosses.rb +1 -1
- data/test/chart/test_write_d_lbls.rb +1 -1
- data/test/chart/test_write_format_code.rb +1 -1
- data/test/chart/test_write_idx.rb +1 -1
- data/test/chart/test_write_label_align.rb +1 -1
- data/test/chart/test_write_label_offset.rb +1 -1
- data/test/chart/test_write_lang.rb +1 -1
- data/test/chart/test_write_layout.rb +1 -1
- data/test/chart/test_write_legend.rb +1 -1
- data/test/chart/test_write_legend_pos.rb +10 -2
- data/test/chart/test_write_major_gridlines.rb +1 -1
- data/test/chart/test_write_marker.rb +1 -1
- data/test/chart/test_write_marker_size.rb +1 -1
- data/test/chart/test_write_marker_value.rb +1 -1
- data/test/chart/test_write_num_cache.rb +1 -1
- data/test/chart/test_write_number_format.rb +2 -3
- data/test/chart/test_write_order.rb +1 -1
- data/test/chart/test_write_orientation.rb +1 -1
- data/test/chart/test_write_page_margins.rb +1 -1
- data/test/chart/test_write_page_setup.rb +1 -1
- data/test/chart/test_write_plot_vis_only.rb +1 -1
- data/test/chart/test_write_pt.rb +1 -1
- data/test/chart/test_write_pt_count.rb +1 -1
- data/test/chart/test_write_series_formula.rb +1 -1
- data/test/chart/test_write_style.rb +1 -1
- data/test/chart/test_write_symbol.rb +1 -1
- data/test/chart/test_write_tick_lbl_pos.rb +1 -1
- data/test/chart/test_write_v.rb +1 -1
- data/test/chartsheet/test_chartsheet01.rb +1 -1
- data/test/chartsheet/test_write_sheet_protection.rb +91 -0
- data/test/drawing/test_drawing_chart_01.rb +7 -3
- data/test/drawing/test_drawing_image_01.rb +13 -4
- data/test/drawing/test_drawing_shape_01.rb +9 -6
- data/test/drawing/test_drawing_shape_02.rb +13 -6
- data/test/drawing/test_drawing_shape_03.rb +9 -6
- data/test/drawing/test_drawing_shape_04.rb +9 -25
- data/test/drawing/test_drawing_shape_05.rb +9 -6
- data/test/drawing/test_drawing_shape_06.rb +12 -7
- data/test/drawing/test_drawing_shape_07.rb +12 -7
- data/test/drawing/test_write_a_graphic_frame_locks.rb +2 -2
- data/test/drawing/test_write_c_chart.rb +2 -2
- data/test/drawing/test_write_c_nv_graphic_frame_pr.rb +2 -2
- data/test/drawing/test_write_c_nv_pr.rb +2 -2
- data/test/drawing/test_write_col.rb +2 -2
- data/test/drawing/test_write_col_off.rb +2 -2
- data/test/drawing/test_write_pos.rb +2 -2
- data/test/drawing/test_write_row.rb +2 -2
- data/test/drawing/test_write_row_off.rb +2 -2
- data/test/drawing/{test_write_ext.rb → test_write_xdr_ext.rb} +3 -3
- data/test/drawing/test_write_xfrm_extension.rb +2 -2
- data/test/drawing/test_write_xfrm_offset.rb +2 -2
- data/test/helper.rb +8 -3
- data/test/package/app/test_app01.rb +1 -1
- data/test/package/app/test_app02.rb +1 -1
- data/test/package/app/test_app03.rb +1 -1
- data/test/package/comments/test_comments_01.rb +54 -0
- data/test/package/comments/test_comments_02.rb +54 -0
- data/test/package/content_types/test_content_types.rb +1 -1
- data/test/package/content_types/test_write_default.rb +1 -1
- data/test/package/content_types/test_write_override.rb +1 -1
- data/test/package/core/test_core01.rb +1 -1
- data/test/package/core/test_core02.rb +1 -1
- data/test/package/relationships/test_relationships.rb +1 -1
- data/test/package/relationships/test_sheet_rels.rb +1 -1
- data/test/package/shared_strings/test_shared_strings01.rb +1 -1
- data/test/package/shared_strings/test_shared_strings02.rb +1 -1
- data/test/package/shared_strings/test_write_si.rb +1 -7
- data/test/package/styles/test_styles_01.rb +1 -1
- data/test/package/styles/test_styles_02.rb +1 -1
- data/test/package/styles/test_styles_03.rb +1 -1
- data/test/package/styles/test_styles_04.rb +1 -1
- data/test/package/styles/test_styles_05.rb +1 -1
- data/test/package/styles/test_styles_06.rb +1 -1
- data/test/package/styles/test_styles_07.rb +1 -1
- data/test/package/styles/test_styles_08.rb +1 -1
- data/test/package/styles/test_styles_09.rb +1 -1
- data/test/package/table/test_table01.rb +3 -3
- data/test/package/table/test_table02.rb +2 -2
- data/test/package/table/test_table03.rb +2 -2
- data/test/package/table/test_table04.rb +2 -2
- data/test/package/table/test_table05.rb +2 -2
- data/test/package/table/test_table06.rb +2 -2
- data/test/package/table/test_table07.rb +2 -2
- data/test/package/table/test_table08.rb +2 -2
- data/test/package/table/test_table09.rb +2 -2
- data/test/package/table/test_table10.rb +2 -2
- data/test/package/table/test_table11.rb +2 -2
- data/test/package/table/test_table12.rb +2 -2
- data/test/package/table/test_table13.rb +1 -1
- data/test/package/table/test_write_auto_filter.rb +1 -1
- data/test/package/table/test_write_table_column.rb +1 -1
- data/test/package/table/test_write_table_style_info.rb +1 -1
- data/test/package/vml/test_write_auto_fill.rb +1 -1
- data/test/package/vml/test_write_div.rb +1 -1
- data/test/package/vml/test_write_idmap.rb +1 -1
- data/test/package/vml/test_write_path.rb +1 -1
- data/test/package/vml/test_write_shapelayout.rb +1 -1
- data/test/package/vml/test_write_shapetype.rb +1 -1
- data/test/package/vml/test_write_stroke.rb +1 -1
- data/test/perl_output/background.xlsx +0 -0
- data/test/perl_output/chart_data_labels.xlsx +0 -0
- data/test/perl_output/chart_gauge.xlsx +0 -0
- data/test/perl_output/chart_line.xlsx +0 -0
- data/test/perl_output/comments2.xlsx +0 -0
- data/test/perl_output/formats.xlsx +0 -0
- data/test/perl_output/ignore_errors.xlsx +0 -0
- data/test/perl_output/keep_leading_zeros.xlsx +0 -0
- data/test/perl_output/multi_line.xlsx +0 -0
- data/test/perl_output/tables.xlsx +0 -0
- data/test/regression/_test_hyperlink31.rb +26 -0
- data/test/regression/disabled_test_vml04.rb +1 -1
- data/test/regression/images/happy.jpg +0 -0
- data/test/regression/images/logo.gif +0 -0
- data/test/regression/images/logo.jpg +0 -0
- data/test/regression/images/red.gif +0 -0
- data/test/regression/images/red2.png +0 -0
- data/test/regression/images/red_208.png +0 -0
- data/test/regression/images/zero_dpi.jpg +0 -0
- data/test/regression/test_array_formula01.rb +1 -1
- data/test/regression/test_array_formula02.rb +1 -1
- data/test/regression/test_array_formula03.rb +36 -0
- data/test/regression/test_array_formula04.rb +31 -0
- data/test/regression/test_autofilter00.rb +1 -1
- data/test/regression/test_autofilter01.rb +1 -1
- data/test/regression/test_autofilter02.rb +1 -1
- data/test/regression/test_autofilter03.rb +1 -1
- data/test/regression/test_autofilter04.rb +1 -1
- data/test/regression/test_autofilter05.rb +1 -1
- data/test/regression/test_autofilter06.rb +1 -1
- data/test/regression/test_autofilter07.rb +1 -1
- data/test/regression/test_autofilter08.rb +110 -0
- data/test/regression/test_autofilter09.rb +110 -0
- data/test/regression/test_autofilter10.rb +110 -0
- data/test/regression/test_background01.rb +23 -0
- data/test/regression/test_background02.rb +23 -0
- data/test/regression/test_background03.rb +24 -0
- data/test/regression/test_background04.rb +25 -0
- data/test/regression/test_background05.rb +25 -0
- data/test/regression/test_background06.rb +31 -0
- data/test/regression/test_background07.rb +37 -0
- data/test/regression/test_button01.rb +1 -1
- data/test/regression/test_button02.rb +1 -1
- data/test/regression/test_button03.rb +1 -1
- data/test/regression/test_button04.rb +1 -1
- data/test/regression/test_button05.rb +1 -1
- data/test/regression/test_button06.rb +1 -1
- data/test/regression/test_button07.rb +1 -1
- data/test/regression/test_button08.rb +1 -1
- data/test/regression/test_button13.rb +1 -1
- data/test/regression/test_button14.rb +1 -1
- data/test/regression/test_chart_area01.rb +1 -1
- data/test/regression/test_chart_area02.rb +1 -1
- data/test/regression/test_chart_area03.rb +1 -1
- data/test/regression/test_chart_area04.rb +1 -1
- data/test/regression/test_chart_axis01.rb +1 -1
- data/test/regression/test_chart_axis02.rb +1 -1
- data/test/regression/test_chart_axis03.rb +1 -1
- data/test/regression/test_chart_axis04.rb +1 -1
- data/test/regression/test_chart_axis05.rb +1 -1
- data/test/regression/test_chart_axis06.rb +1 -1
- data/test/regression/test_chart_axis07.rb +1 -1
- data/test/regression/test_chart_axis08.rb +1 -1
- data/test/regression/test_chart_axis09.rb +1 -1
- data/test/regression/test_chart_axis10.rb +1 -1
- data/test/regression/test_chart_axis11.rb +1 -1
- data/test/regression/test_chart_axis12.rb +1 -1
- data/test/regression/test_chart_axis13.rb +1 -1
- data/test/regression/test_chart_axis14.rb +1 -1
- data/test/regression/test_chart_axis15.rb +1 -1
- data/test/regression/test_chart_axis16.rb +1 -1
- data/test/regression/test_chart_axis17.rb +1 -1
- data/test/regression/test_chart_axis18.rb +1 -1
- data/test/regression/test_chart_axis19.rb +1 -1
- data/test/regression/test_chart_axis20.rb +1 -1
- data/test/regression/test_chart_axis21.rb +1 -1
- data/test/regression/test_chart_axis22.rb +1 -1
- data/test/regression/test_chart_axis23.rb +1 -1
- data/test/regression/test_chart_axis24.rb +1 -1
- data/test/regression/test_chart_axis25.rb +1 -1
- data/test/regression/test_chart_axis26.rb +11 -9
- data/test/regression/test_chart_axis27.rb +2 -2
- data/test/regression/test_chart_axis28.rb +2 -2
- data/test/regression/test_chart_axis29.rb +2 -2
- data/test/regression/test_chart_axis30.rb +1 -1
- data/test/regression/test_chart_axis31.rb +1 -1
- data/test/regression/test_chart_axis32.rb +1 -1
- data/test/regression/test_chart_axis33.rb +2 -2
- data/test/regression/test_chart_axis34.rb +1 -1
- data/test/regression/test_chart_axis35.rb +1 -1
- data/test/regression/test_chart_axis36.rb +1 -1
- data/test/regression/test_chart_axis37.rb +1 -1
- data/test/regression/test_chart_axis38.rb +1 -1
- data/test/regression/test_chart_axis39.rb +1 -1
- data/test/regression/test_chart_axis40.rb +44 -0
- data/test/regression/test_chart_axis41.rb +48 -0
- data/test/regression/test_chart_axis42.rb +44 -0
- data/test/regression/test_chart_axis43.rb +44 -0
- data/test/regression/test_chart_axis44.rb +54 -0
- data/test/regression/test_chart_axis45.rb +54 -0
- data/test/regression/test_chart_axis46.rb +54 -0
- data/test/regression/test_chart_axis47.rb +52 -0
- data/test/regression/test_chart_axis48.rb +53 -0
- data/test/regression/test_chart_bar01.rb +1 -1
- data/test/regression/test_chart_bar02.rb +1 -1
- data/test/regression/test_chart_bar03.rb +1 -1
- data/test/regression/test_chart_bar04.rb +1 -1
- data/test/regression/test_chart_bar05.rb +1 -1
- data/test/regression/test_chart_bar06.rb +1 -1
- data/test/regression/test_chart_bar07.rb +1 -1
- data/test/regression/test_chart_bar08.rb +4 -1
- data/test/regression/test_chart_bar09.rb +1 -1
- data/test/regression/test_chart_bar10.rb +1 -1
- data/test/regression/test_chart_bar11.rb +4 -1
- data/test/regression/test_chart_bar12.rb +1 -1
- data/test/regression/test_chart_bar13.rb +1 -1
- data/test/regression/test_chart_bar14.rb +4 -1
- data/test/regression/test_chart_bar15.rb +1 -1
- data/test/regression/test_chart_bar16.rb +1 -1
- data/test/regression/test_chart_bar17.rb +1 -1
- data/test/regression/test_chart_bar18.rb +1 -1
- data/test/regression/test_chart_bar19.rb +1 -1
- data/test/regression/test_chart_bar20.rb +1 -1
- data/test/regression/test_chart_bar21.rb +1 -1
- data/test/regression/test_chart_bar22.rb +1 -1
- data/test/regression/test_chart_bar23.rb +1 -1
- data/test/regression/test_chart_bar24.rb +1 -1
- data/test/regression/test_chart_blank01.rb +1 -1
- data/test/regression/test_chart_blank02.rb +1 -1
- data/test/regression/test_chart_blank03.rb +1 -1
- data/test/regression/test_chart_blank04.rb +1 -1
- data/test/regression/test_chart_blank05.rb +1 -1
- data/test/regression/test_chart_blank06.rb +1 -1
- data/test/regression/test_chart_chartarea01.rb +1 -1
- data/test/regression/test_chart_chartarea02.rb +1 -1
- data/test/regression/test_chart_chartarea03.rb +1 -1
- data/test/regression/test_chart_chartarea04.rb +1 -1
- data/test/regression/test_chart_chartarea05.rb +17 -18
- data/test/regression/test_chart_chartarea06.rb +49 -0
- data/test/regression/test_chart_clustered01.rb +1 -1
- data/test/regression/test_chart_column01.rb +1 -1
- data/test/regression/test_chart_column02.rb +1 -1
- data/test/regression/test_chart_column03.rb +1 -1
- data/test/regression/test_chart_column04.rb +1 -1
- data/test/regression/test_chart_column05.rb +1 -1
- data/test/regression/test_chart_column06.rb +1 -1
- data/test/regression/test_chart_column07.rb +1 -1
- data/test/regression/test_chart_column08.rb +1 -1
- data/test/regression/test_chart_column09.rb +1 -1
- data/test/regression/test_chart_column10.rb +1 -1
- data/test/regression/test_chart_column11.rb +1 -1
- data/test/regression/test_chart_column12.rb +1 -1
- data/test/regression/test_chart_combined01.rb +1 -1
- data/test/regression/test_chart_combined02.rb +1 -1
- data/test/regression/test_chart_combined03.rb +1 -1
- data/test/regression/test_chart_combined04.rb +1 -1
- data/test/regression/test_chart_combined05.rb +1 -1
- data/test/regression/test_chart_combined06.rb +1 -1
- data/test/regression/test_chart_combined07.rb +1 -1
- data/test/regression/test_chart_combined08.rb +1 -1
- data/test/regression/test_chart_combined09.rb +50 -0
- data/test/regression/test_chart_combined10.rb +43 -0
- data/test/regression/test_chart_combined11.rb +63 -0
- data/test/regression/test_chart_crossing01.rb +2 -2
- data/test/regression/test_chart_crossing02.rb +1 -1
- data/test/regression/test_chart_crossing03.rb +1 -1
- data/test/regression/test_chart_crossing04.rb +1 -1
- data/test/regression/test_chart_crossing05.rb +46 -0
- data/test/regression/test_chart_crossing06.rb +46 -0
- data/test/regression/test_chart_data_labels01.rb +1 -1
- data/test/regression/test_chart_data_labels02.rb +1 -1
- data/test/regression/test_chart_data_labels03.rb +1 -1
- data/test/regression/test_chart_data_labels04.rb +1 -1
- data/test/regression/test_chart_data_labels05.rb +1 -1
- data/test/regression/test_chart_data_labels06.rb +1 -1
- data/test/regression/test_chart_data_labels07.rb +1 -1
- data/test/regression/test_chart_data_labels08.rb +1 -1
- data/test/regression/test_chart_data_labels09.rb +1 -1
- data/test/regression/test_chart_data_labels10.rb +1 -1
- data/test/regression/test_chart_data_labels11.rb +1 -1
- data/test/regression/test_chart_data_labels12.rb +1 -1
- data/test/regression/test_chart_data_labels13.rb +1 -1
- data/test/regression/test_chart_data_labels14.rb +1 -1
- data/test/regression/test_chart_data_labels15.rb +1 -1
- data/test/regression/test_chart_data_labels16.rb +1 -1
- data/test/regression/test_chart_data_labels17.rb +1 -1
- data/test/regression/test_chart_data_labels18.rb +1 -1
- data/test/regression/test_chart_data_labels19.rb +1 -1
- data/test/regression/test_chart_data_labels20.rb +1 -1
- data/test/regression/test_chart_data_labels21.rb +1 -1
- data/test/regression/test_chart_data_labels22.rb +1 -1
- data/test/regression/test_chart_data_labels23.rb +1 -1
- data/test/regression/test_chart_data_labels24.rb +1 -1
- data/test/regression/test_chart_data_labels25.rb +61 -0
- data/test/regression/test_chart_data_labels26.rb +44 -0
- data/test/regression/test_chart_data_labels27.rb +44 -0
- data/test/regression/test_chart_data_labels28.rb +52 -0
- data/test/regression/test_chart_data_labels29.rb +43 -0
- data/test/regression/test_chart_data_labels30.rb +46 -0
- data/test/regression/test_chart_data_labels31.rb +49 -0
- data/test/regression/test_chart_data_labels32.rb +54 -0
- data/test/regression/test_chart_data_labels33.rb +52 -0
- data/test/regression/test_chart_data_labels34.rb +54 -0
- data/test/regression/test_chart_data_labels35.rb +46 -0
- data/test/regression/test_chart_data_labels36.rb +54 -0
- data/test/regression/test_chart_data_labels37.rb +51 -0
- data/test/regression/test_chart_data_labels38.rb +54 -0
- data/test/regression/test_chart_data_labels39.rb +53 -0
- data/test/regression/test_chart_data_labels40.rb +53 -0
- data/test/regression/test_chart_data_labels41.rb +54 -0
- data/test/regression/test_chart_data_labels42.rb +58 -0
- data/test/regression/test_chart_data_labels43.rb +58 -0
- data/test/regression/test_chart_data_labels44.rb +56 -0
- data/test/regression/test_chart_data_labels45.rb +57 -0
- data/test/regression/test_chart_data_labels46.rb +61 -0
- data/test/regression/test_chart_data_labels47.rb +61 -0
- data/test/regression/test_chart_data_labels48.rb +55 -0
- data/test/regression/test_chart_data_labels49.rb +55 -0
- data/test/regression/test_chart_data_labels50.rb +57 -0
- data/test/regression/test_chart_date01.rb +1 -1
- data/test/regression/test_chart_date02.rb +1 -1
- data/test/regression/test_chart_date03.rb +1 -1
- data/test/regression/test_chart_date04.rb +1 -1
- data/test/regression/test_chart_date05.rb +1 -1
- data/test/regression/test_chart_display_units01.rb +1 -1
- data/test/regression/test_chart_display_units02.rb +1 -1
- data/test/regression/test_chart_display_units03.rb +1 -1
- data/test/regression/test_chart_display_units04.rb +1 -1
- data/test/regression/test_chart_display_units05.rb +1 -1
- data/test/regression/test_chart_display_units06.rb +1 -1
- data/test/regression/test_chart_display_units07.rb +1 -1
- data/test/regression/test_chart_display_units08.rb +1 -1
- data/test/regression/test_chart_display_units09.rb +1 -1
- data/test/regression/test_chart_display_units10.rb +1 -1
- data/test/regression/test_chart_display_units11.rb +1 -1
- data/test/regression/test_chart_display_units12.rb +1 -1
- data/test/regression/test_chart_doughnut01.rb +1 -1
- data/test/regression/test_chart_doughnut02.rb +1 -1
- data/test/regression/test_chart_doughnut03.rb +1 -1
- data/test/regression/test_chart_doughnut04.rb +1 -1
- data/test/regression/test_chart_doughnut05.rb +1 -1
- data/test/regression/test_chart_doughnut06.rb +1 -1
- data/test/regression/test_chart_doughnut07.rb +37 -0
- data/test/regression/test_chart_drop_lines01.rb +1 -1
- data/test/regression/test_chart_drop_lines02.rb +1 -1
- data/test/regression/test_chart_drop_lines03.rb +1 -1
- data/test/regression/test_chart_drop_lines04.rb +1 -1
- data/test/regression/test_chart_errorbars01.rb +1 -1
- data/test/regression/test_chart_errorbars02.rb +1 -1
- data/test/regression/test_chart_errorbars03.rb +1 -1
- data/test/regression/test_chart_errorbars04.rb +1 -1
- data/test/regression/test_chart_errorbars05.rb +1 -1
- data/test/regression/test_chart_errorbars06.rb +1 -1
- data/test/regression/test_chart_errorbars07.rb +1 -1
- data/test/regression/test_chart_errorbars08.rb +1 -1
- data/test/regression/test_chart_errorbars09.rb +1 -1
- data/test/regression/test_chart_errorbars10.rb +1 -1
- data/test/regression/test_chart_font01.rb +1 -1
- data/test/regression/test_chart_font02.rb +1 -1
- data/test/regression/test_chart_font03.rb +1 -1
- data/test/regression/test_chart_font04.rb +1 -1
- data/test/regression/test_chart_font05.rb +1 -1
- data/test/regression/test_chart_font06.rb +1 -1
- data/test/regression/test_chart_font07.rb +1 -1
- data/test/regression/test_chart_font08.rb +1 -1
- data/test/regression/test_chart_font09.rb +2 -2
- data/test/regression/test_chart_format01.rb +1 -1
- data/test/regression/test_chart_format02.rb +1 -1
- data/test/regression/test_chart_format03.rb +1 -1
- data/test/regression/test_chart_format04.rb +1 -1
- data/test/regression/test_chart_format05.rb +1 -1
- data/test/regression/test_chart_format06.rb +1 -1
- data/test/regression/test_chart_format07.rb +1 -1
- data/test/regression/test_chart_format08.rb +1 -1
- data/test/regression/test_chart_format09.rb +1 -1
- data/test/regression/test_chart_format10.rb +1 -1
- data/test/regression/test_chart_format11.rb +1 -1
- data/test/regression/test_chart_format12.rb +1 -1
- data/test/regression/test_chart_format13.rb +1 -1
- data/test/regression/test_chart_format14.rb +1 -1
- data/test/regression/test_chart_format15.rb +1 -1
- data/test/regression/test_chart_format16.rb +1 -1
- data/test/regression/test_chart_format17.rb +1 -1
- data/test/regression/test_chart_format18.rb +1 -1
- data/test/regression/test_chart_format19.rb +1 -1
- data/test/regression/test_chart_format20.rb +1 -1
- data/test/regression/test_chart_format21.rb +47 -0
- data/test/regression/test_chart_format22.rb +47 -0
- data/test/regression/test_chart_format23.rb +47 -0
- data/test/regression/test_chart_format24.rb +52 -0
- data/test/regression/test_chart_format25.rb +46 -0
- data/test/regression/test_chart_format26.rb +48 -0
- data/test/regression/test_chart_format27.rb +58 -0
- data/test/regression/test_chart_format28.rb +52 -0
- data/test/regression/test_chart_format29.rb +59 -0
- data/test/regression/test_chart_format30.rb +53 -0
- data/test/regression/test_chart_format31.rb +60 -0
- data/test/regression/test_chart_gap01.rb +1 -1
- data/test/regression/test_chart_gap02.rb +1 -1
- data/test/regression/test_chart_gap03.rb +1 -1
- data/test/regression/test_chart_gap04.rb +1 -1
- data/test/regression/test_chart_gap05.rb +1 -1
- data/test/regression/test_chart_gradient01.rb +1 -1
- data/test/regression/test_chart_gradient02.rb +1 -1
- data/test/regression/test_chart_gradient03.rb +1 -1
- data/test/regression/test_chart_gradient04.rb +1 -1
- data/test/regression/test_chart_gradient05.rb +1 -1
- data/test/regression/test_chart_gradient06.rb +1 -1
- data/test/regression/test_chart_gradient07.rb +1 -1
- data/test/regression/test_chart_gradient08.rb +1 -1
- data/test/regression/test_chart_gradient09.rb +1 -1
- data/test/regression/test_chart_gradient10.rb +1 -1
- data/test/regression/test_chart_gradient11.rb +1 -1
- data/test/regression/test_chart_gradient12.rb +1 -1
- data/test/regression/test_chart_gradient13.rb +1 -1
- data/test/regression/test_chart_gridlines01.rb +1 -1
- data/test/regression/test_chart_gridlines02.rb +1 -1
- data/test/regression/test_chart_gridlines03.rb +1 -1
- data/test/regression/test_chart_gridlines04.rb +5 -4
- data/test/regression/test_chart_gridlines05.rb +1 -1
- data/test/regression/test_chart_gridlines06.rb +1 -1
- data/test/regression/test_chart_gridlines07.rb +1 -1
- data/test/regression/test_chart_gridlines08.rb +9 -12
- data/test/regression/test_chart_gridlines09.rb +1 -1
- data/test/regression/test_chart_layout01.rb +1 -1
- data/test/regression/test_chart_layout02.rb +1 -1
- data/test/regression/test_chart_layout03.rb +1 -1
- data/test/regression/test_chart_layout04.rb +1 -1
- data/test/regression/test_chart_layout05.rb +1 -1
- data/test/regression/test_chart_layout06.rb +1 -1
- data/test/regression/test_chart_layout07.rb +1 -1
- data/test/regression/test_chart_layout08.rb +1 -1
- data/test/regression/test_chart_legend01.rb +1 -1
- data/test/regression/test_chart_legend02.rb +1 -1
- data/test/regression/test_chart_legend03.rb +41 -0
- data/test/regression/test_chart_legend04.rb +41 -0
- data/test/regression/test_chart_legend05.rb +41 -0
- data/test/regression/test_chart_legend06.rb +41 -0
- data/test/regression/test_chart_legend07.rb +38 -0
- data/test/regression/test_chart_line01.rb +1 -1
- data/test/regression/test_chart_line02.rb +1 -1
- data/test/regression/test_chart_line03.rb +1 -1
- data/test/regression/test_chart_line04.rb +1 -1
- data/test/regression/test_chart_line05.rb +43 -0
- data/test/regression/test_chart_line06.rb +43 -0
- data/test/regression/test_chart_name01.rb +1 -1
- data/test/regression/test_chart_name02.rb +1 -1
- data/test/regression/test_chart_name03.rb +1 -1
- data/test/regression/test_chart_order01.rb +1 -1
- data/test/regression/test_chart_order02.rb +1 -1
- data/test/regression/test_chart_order03.rb +1 -1
- data/test/regression/test_chart_pattern01.rb +49 -0
- data/test/regression/test_chart_pattern02.rb +106 -0
- data/test/regression/test_chart_pattern03.rb +105 -0
- data/test/regression/test_chart_pattern04.rb +105 -0
- data/test/regression/test_chart_pattern05.rb +105 -0
- data/test/regression/test_chart_pattern06.rb +105 -0
- data/test/regression/test_chart_pattern07.rb +105 -0
- data/test/regression/test_chart_pattern08.rb +105 -0
- data/test/regression/test_chart_pattern09.rb +57 -0
- data/test/regression/test_chart_pattern10.rb +57 -0
- data/test/regression/test_chart_pie01.rb +1 -1
- data/test/regression/test_chart_pie02.rb +1 -1
- data/test/regression/test_chart_pie03.rb +1 -1
- data/test/regression/test_chart_pie04.rb +1 -1
- data/test/regression/test_chart_pie05.rb +1 -1
- data/test/regression/test_chart_points01.rb +1 -1
- data/test/regression/test_chart_points02.rb +1 -1
- data/test/regression/test_chart_points03.rb +1 -1
- data/test/regression/test_chart_points04.rb +1 -1
- data/test/regression/test_chart_points05.rb +1 -1
- data/test/regression/test_chart_points06.rb +1 -1
- data/test/regression/test_chart_radar01.rb +1 -1
- data/test/regression/test_chart_radar02.rb +1 -1
- data/test/regression/test_chart_radar03.rb +1 -1
- data/test/regression/test_chart_scatter01.rb +1 -1
- data/test/regression/test_chart_scatter02.rb +1 -1
- data/test/regression/test_chart_scatter03.rb +1 -1
- data/test/regression/test_chart_scatter04.rb +1 -1
- data/test/regression/test_chart_scatter05.rb +1 -1
- data/test/regression/test_chart_scatter06.rb +1 -1
- data/test/regression/test_chart_scatter07.rb +1 -1
- data/test/regression/test_chart_scatter08.rb +1 -1
- data/test/regression/test_chart_scatter09.rb +1 -1
- data/test/regression/test_chart_scatter10.rb +1 -1
- data/test/regression/test_chart_scatter11.rb +1 -1
- data/test/regression/test_chart_scatter12.rb +1 -1
- data/test/regression/test_chart_scatter13.rb +1 -1
- data/test/regression/test_chart_scatter14.rb +1 -1
- data/test/regression/test_chart_scatter15.rb +1 -1
- data/test/regression/test_chart_size01.rb +1 -1
- data/test/regression/test_chart_size02.rb +1 -1
- data/test/regression/test_chart_size03.rb +5 -2
- data/test/regression/test_chart_size04.rb +1 -1
- data/test/regression/test_chart_size05.rb +1 -1
- data/test/regression/test_chart_sparse01.rb +1 -1
- data/test/regression/test_chart_stock01.rb +1 -1
- data/test/regression/test_chart_stock02.rb +1 -1
- data/test/regression/test_chart_str01.rb +1 -1
- data/test/regression/test_chart_str02.rb +1 -1
- data/test/regression/test_chart_table01.rb +1 -1
- data/test/regression/test_chart_table02.rb +1 -1
- data/test/regression/test_chart_table03.rb +56 -0
- data/test/regression/test_chart_title01.rb +1 -1
- data/test/regression/test_chart_title02.rb +1 -1
- data/test/regression/test_chartsheet01.rb +1 -1
- data/test/regression/test_chartsheet02.rb +1 -1
- data/test/regression/test_chartsheet03.rb +1 -1
- data/test/regression/test_chartsheet04.rb +1 -1
- data/test/regression/test_chartsheet05.rb +1 -1
- data/test/regression/test_chartsheet06.rb +1 -1
- data/test/regression/test_chartsheet07.rb +1 -1
- data/test/regression/test_chartsheet08.rb +1 -1
- data/test/regression/test_chartsheet09.rb +1 -1
- data/test/regression/test_comment01.rb +1 -1
- data/test/regression/test_comment02.rb +1 -1
- data/test/regression/test_comment03.rb +1 -1
- data/test/regression/test_comment04.rb +1 -1
- data/test/regression/test_comment06.rb +1 -1
- data/test/regression/test_comment07.rb +1 -1
- data/test/regression/test_comment08.rb +1 -1
- data/test/regression/test_comment09.rb +1 -1
- data/test/regression/test_comment10.rb +1 -1
- data/test/regression/test_comment11.rb +1 -1
- data/test/regression/test_comment12.rb +1 -1
- data/test/regression/test_comment13.rb +36 -0
- data/test/regression/test_comment14.rb +29 -0
- data/test/regression/test_comment15.rb +28 -0
- data/test/regression/test_comment16.rb +34 -0
- data/test/regression/test_cond_format01.rb +1 -1
- data/test/regression/test_cond_format02.rb +1 -1
- data/test/regression/test_cond_format03.rb +1 -1
- data/test/regression/test_cond_format04.rb +1 -1
- data/test/regression/test_cond_format05.rb +1 -1
- data/test/regression/test_cond_format06.rb +1 -1
- data/test/regression/test_cond_format07.rb +1 -1
- data/test/regression/test_cond_format08.rb +1 -1
- data/test/regression/test_cond_format10.rb +1 -1
- data/test/regression/test_cond_format11.rb +1 -1
- data/test/regression/test_cond_format12.rb +1 -1
- data/test/regression/test_cond_format13.rb +1 -1
- data/test/regression/test_cond_format14.rb +42 -0
- data/test/regression/test_cond_format15.rb +53 -0
- data/test/regression/test_cond_format16.rb +53 -0
- data/test/regression/test_cond_format17.rb +37 -0
- data/test/regression/test_cond_format18.rb +136 -0
- data/test/regression/test_cond_format19.rb +64 -0
- data/test/regression/test_cond_format20.rb +43 -0
- data/test/regression/test_custom_colors01.rb +1 -1
- data/test/regression/test_data_validation01.rb +1 -1
- data/test/regression/test_data_validation02.rb +1 -1
- data/test/regression/test_data_validation03.rb +1 -1
- data/test/regression/test_data_validation04.rb +2 -2
- data/test/regression/test_data_validation05.rb +2 -2
- data/test/regression/test_data_validation08.rb +24 -0
- data/test/regression/test_date_1904_01.rb +2 -2
- data/test/regression/test_date_1904_02.rb +1 -1
- data/test/regression/test_date_examples01.rb +1 -1
- data/test/regression/test_default_format01.rb +1 -1
- data/test/regression/test_default_row01.rb +1 -1
- data/test/regression/test_default_row02.rb +1 -1
- data/test/regression/test_default_row03.rb +1 -1
- data/test/regression/test_default_row04.rb +1 -1
- data/test/regression/test_default_row05.rb +32 -0
- data/test/regression/test_defined_name01.rb +1 -1
- data/test/regression/test_defined_name02.rb +1 -1
- data/test/regression/test_defined_name03.rb +1 -1
- data/test/regression/test_defined_name04.rb +15 -15
- data/test/regression/test_dynamic_array01.rb +25 -0
- data/test/regression/test_escapes01.rb +1 -1
- data/test/regression/test_escapes02.rb +1 -1
- data/test/regression/test_escapes03.rb +1 -1
- data/test/regression/test_escapes04.rb +4 -1
- data/test/regression/test_escapes05.rb +4 -1
- data/test/regression/test_escapes06.rb +1 -1
- data/test/regression/test_escapes07.rb +4 -1
- data/test/regression/test_escapes08.rb +4 -1
- data/test/regression/test_excel2003_style01.rb +1 -1
- data/test/regression/test_excel2003_style02.rb +1 -1
- data/test/regression/test_excel2003_style03.rb +1 -1
- data/test/regression/test_excel2003_style04.rb +1 -1
- data/test/regression/test_excel2003_style05.rb +1 -1
- data/test/regression/test_excel2003_style06.rb +1 -1
- data/test/regression/test_excel2003_style07.rb +1 -1
- data/test/regression/test_excel2003_style08.rb +1 -1
- data/test/regression/test_firstsheet01.rb +1 -1
- data/test/regression/test_fit_to_pages01.rb +1 -1
- data/test/regression/test_fit_to_pages02.rb +1 -1
- data/test/regression/test_fit_to_pages03.rb +1 -1
- data/test/regression/test_fit_to_pages04.rb +1 -1
- data/test/regression/test_fit_to_pages05.rb +1 -1
- data/test/regression/test_format01.rb +1 -1
- data/test/regression/test_format02.rb +1 -1
- data/test/regression/test_format03.rb +1 -1
- data/test/regression/test_format04.rb +1 -1
- data/test/regression/test_format05.rb +1 -1
- data/test/regression/test_format11.rb +1 -1
- data/test/regression/test_format12.rb +1 -1
- data/test/regression/test_format13.rb +31 -0
- data/test/regression/test_format14.rb +26 -0
- data/test/regression/test_format15.rb +26 -0
- data/test/regression/test_format16.rb +24 -0
- data/test/regression/test_format17.rb +24 -0
- data/test/regression/test_formula_results01.rb +1 -1
- data/test/regression/test_gridlines01.rb +1 -1
- data/test/regression/test_header01.rb +1 -1
- data/test/regression/test_header02.rb +1 -1
- data/test/regression/test_header03.rb +1 -1
- data/test/regression/test_header04.rb +30 -0
- data/test/regression/test_header_image01.rb +1 -1
- data/test/regression/test_header_image02.rb +1 -1
- data/test/regression/test_header_image03.rb +1 -1
- data/test/regression/test_header_image04.rb +1 -1
- data/test/regression/test_header_image05.rb +1 -1
- data/test/regression/test_header_image06.rb +1 -1
- data/test/regression/test_header_image07.rb +1 -1
- data/test/regression/test_header_image08.rb +1 -1
- data/test/regression/test_header_image09.rb +1 -1
- data/test/regression/test_header_image10.rb +1 -1
- data/test/regression/test_header_image11.rb +1 -1
- data/test/regression/test_header_image12.rb +1 -1
- data/test/regression/test_header_image13.rb +1 -1
- data/test/regression/test_header_image14.rb +1 -1
- data/test/regression/test_header_image15.rb +36 -0
- data/test/regression/test_header_image16.rb +42 -0
- data/test/regression/test_header_image17.rb +46 -0
- data/test/regression/test_header_image18.rb +48 -0
- data/test/regression/test_header_image19.rb +36 -0
- data/test/regression/test_hide01.rb +1 -1
- data/test/regression/test_hyperlink01.rb +4 -1
- data/test/regression/test_hyperlink02.rb +4 -1
- data/test/regression/test_hyperlink03.rb +5 -1
- data/test/regression/test_hyperlink04.rb +4 -1
- data/test/regression/test_hyperlink05.rb +4 -1
- data/test/regression/test_hyperlink06.rb +4 -1
- data/test/regression/test_hyperlink07.rb +4 -1
- data/test/regression/test_hyperlink08.rb +4 -1
- data/test/regression/test_hyperlink09.rb +4 -1
- data/test/regression/test_hyperlink10.rb +4 -1
- data/test/regression/test_hyperlink11.rb +4 -1
- data/test/regression/test_hyperlink12.rb +4 -1
- data/test/regression/test_hyperlink13.rb +4 -1
- data/test/regression/test_hyperlink14.rb +4 -1
- data/test/regression/test_hyperlink15.rb +4 -1
- data/test/regression/test_hyperlink16.rb +4 -1
- data/test/regression/test_hyperlink17.rb +4 -1
- data/test/regression/test_hyperlink18.rb +4 -1
- data/test/regression/test_hyperlink20.rb +4 -1
- data/test/regression/test_hyperlink21.rb +4 -1
- data/test/regression/test_hyperlink22.rb +27 -0
- data/test/regression/test_hyperlink23.rb +27 -0
- data/test/regression/test_hyperlink24.rb +27 -0
- data/test/regression/test_hyperlink25.rb +30 -0
- data/test/regression/test_hyperlink26.rb +30 -0
- data/test/regression/test_hyperlink27.rb +27 -0
- data/test/regression/test_hyperlink28.rb +50 -0
- data/test/regression/test_hyperlink29.rb +27 -0
- data/test/regression/test_hyperlink30.rb +36 -0
- data/test/regression/test_hyperlink32.rb +27 -0
- data/test/regression/test_hyperlink33.rb +28 -0
- data/test/regression/test_hyperlink34.rb +33 -0
- data/test/regression/test_hyperlink35.rb +39 -0
- data/test/regression/test_hyperlink36.rb +34 -0
- data/test/regression/test_hyperlink37.rb +33 -0
- data/test/regression/test_hyperlink38.rb +27 -0
- data/test/regression/test_hyperlink39.rb +27 -0
- data/test/regression/test_hyperlink40.rb +27 -0
- data/test/regression/test_hyperlink41.rb +27 -0
- data/test/regression/test_hyperlink42.rb +27 -0
- data/test/regression/test_hyperlink43.rb +27 -0
- data/test/regression/test_hyperlink44.rb +27 -0
- data/test/regression/test_hyperlink45.rb +27 -0
- data/test/regression/test_hyperlink47.rb +27 -0
- data/test/regression/test_hyperlink48.rb +31 -0
- data/test/regression/test_hyperlink49.rb +29 -0
- data/test/regression/test_hyperlink50.rb +27 -0
- data/test/regression/test_hyperlink51.rb +27 -0
- data/test/regression/test_ignore_error01.rb +23 -0
- data/test/regression/test_ignore_error02.rb +24 -0
- data/test/regression/test_ignore_error03.rb +26 -0
- data/test/regression/test_ignore_error04.rb +26 -0
- data/test/regression/test_ignore_error05.rb +32 -0
- data/test/regression/test_ignore_error06.rb +32 -0
- data/test/regression/test_image01.rb +1 -1
- data/test/regression/test_image02.rb +1 -1
- data/test/regression/test_image03.rb +1 -1
- data/test/regression/test_image04.rb +1 -1
- data/test/regression/test_image05.rb +1 -1
- data/test/regression/test_image06.rb +6 -6
- data/test/regression/test_image07.rb +1 -1
- data/test/regression/test_image08.rb +6 -5
- data/test/regression/test_image09.rb +1 -1
- data/test/regression/test_image10.rb +1 -1
- data/test/regression/test_image11.rb +1 -1
- data/test/regression/test_image12.rb +1 -1
- data/test/regression/test_image13.rb +1 -1
- data/test/regression/test_image14.rb +1 -1
- data/test/regression/test_image15.rb +5 -3
- data/test/regression/test_image16.rb +1 -1
- data/test/regression/test_image17.rb +1 -1
- data/test/regression/test_image18.rb +1 -1
- data/test/regression/test_image19.rb +1 -1
- data/test/regression/test_image22.rb +1 -1
- data/test/regression/test_image23.rb +1 -1
- data/test/regression/test_image24.rb +1 -1
- data/test/regression/test_image25.rb +1 -1
- data/test/regression/test_image26.rb +1 -1
- data/test/regression/test_image27.rb +1 -1
- data/test/regression/test_image28.rb +27 -0
- data/test/regression/test_image29.rb +27 -0
- data/test/regression/test_image30.rb +27 -0
- data/test/regression/test_image31.rb +30 -0
- data/test/regression/test_image32.rb +28 -0
- data/test/regression/test_image33.rb +32 -0
- data/test/regression/test_image35.rb +26 -0
- data/test/regression/test_image36.rb +26 -0
- data/test/regression/test_image44.rb +28 -0
- data/test/regression/test_image45.rb +29 -0
- data/test/regression/test_image46.rb +29 -0
- data/test/regression/test_image47.rb +28 -0
- data/test/regression/test_image48.rb +32 -0
- data/test/regression/test_image49.rb +38 -0
- data/test/regression/test_image50.rb +24 -0
- data/test/regression/test_image51.rb +30 -0
- data/test/regression/test_image52.rb +26 -0
- data/test/regression/test_image53.rb +26 -0
- data/test/regression/test_image54.rb +26 -0
- data/test/regression/test_image55.rb +27 -0
- data/test/regression/test_image56.rb +23 -0
- data/test/regression/test_image57.rb +23 -0
- data/test/regression/test_landscape01.rb +1 -1
- data/test/regression/test_macro01.rb +1 -1
- data/test/regression/test_merge_cells01.rb +1 -1
- data/test/regression/test_merge_range01.rb +1 -1
- data/test/regression/test_merge_range02.rb +1 -1
- data/test/regression/test_merge_range03.rb +1 -1
- data/test/regression/test_merge_range04.rb +1 -1
- data/test/regression/test_merge_range05.rb +1 -1
- data/test/regression/test_object_position01.rb +26 -0
- data/test/regression/test_object_position02.rb +26 -0
- data/test/regression/test_object_position03.rb +26 -0
- data/test/regression/test_object_position04.rb +44 -0
- data/test/regression/test_object_position06.rb +28 -0
- data/test/regression/test_object_position07.rb +28 -0
- data/test/regression/test_object_position08.rb +47 -0
- data/test/regression/test_object_position09.rb +50 -0
- data/test/regression/test_object_position10.rb +28 -0
- data/test/regression/test_object_position12.rb +25 -0
- data/test/regression/test_object_position13.rb +25 -0
- data/test/regression/test_object_position14.rb +25 -0
- data/test/regression/test_object_position15.rb +29 -0
- data/test/regression/test_object_position16.rb +29 -0
- data/test/regression/test_object_position17.rb +29 -0
- data/test/regression/test_object_position18.rb +29 -0
- data/test/regression/test_object_position19.rb +29 -0
- data/test/regression/test_object_position20.rb +29 -0
- data/test/regression/test_outline01.rb +1 -1
- data/test/regression/test_outline02.rb +1 -1
- data/test/regression/test_outline03.rb +1 -1
- data/test/regression/test_outline04.rb +1 -1
- data/test/regression/test_outline05.rb +1 -1
- data/test/regression/test_outline06.rb +1 -1
- data/test/regression/test_page_breaks01.rb +1 -1
- data/test/regression/test_page_breaks02.rb +1 -1
- data/test/regression/test_page_breaks03.rb +1 -1
- data/test/regression/test_page_breaks04.rb +1 -1
- data/test/regression/test_page_breaks05.rb +1 -1
- data/test/regression/test_page_breaks06.rb +1 -1
- data/test/regression/test_page_view01.rb +1 -1
- data/test/regression/test_panes01.rb +1 -1
- data/test/regression/test_print_across01.rb +1 -1
- data/test/regression/test_print_area01.rb +1 -1
- data/test/regression/test_print_area02.rb +1 -1
- data/test/regression/test_print_area03.rb +1 -1
- data/test/regression/test_print_area04.rb +1 -1
- data/test/regression/test_print_area05.rb +1 -1
- data/test/regression/test_print_area06.rb +1 -1
- data/test/regression/test_print_area07.rb +1 -1
- data/test/regression/test_print_options01.rb +1 -1
- data/test/regression/test_print_options02.rb +1 -1
- data/test/regression/test_print_options03.rb +1 -1
- data/test/regression/test_print_options04.rb +1 -1
- data/test/regression/test_print_options05.rb +1 -1
- data/test/regression/test_print_options06.rb +1 -1
- data/test/regression/test_print_options07.rb +1 -1
- data/test/regression/test_print_scale01.rb +1 -1
- data/test/regression/test_print_scale02.rb +1 -1
- data/test/regression/test_properties01.rb +2 -5
- data/test/regression/test_properties02.rb +25 -0
- data/test/regression/test_properties03.rb +26 -0
- data/test/regression/test_properties04.rb +61 -0
- data/test/regression/test_properties05.rb +30 -0
- data/test/regression/test_protect01.rb +1 -1
- data/test/regression/test_protect02.rb +1 -1
- data/test/regression/test_protect03.rb +1 -1
- data/test/regression/test_protect04.rb +32 -0
- data/test/regression/test_protect05.rb +35 -0
- data/test/regression/test_protect06.rb +35 -0
- data/test/regression/test_protect07.rb +23 -0
- data/test/regression/test_quote_name01.rb +1 -1
- data/test/regression/test_quote_name03.rb +1 -1
- data/test/regression/test_quote_name04.rb +1 -1
- data/test/regression/test_repeat01.rb +1 -1
- data/test/regression/test_repeat02.rb +1 -1
- data/test/regression/test_repeat03.rb +1 -1
- data/test/regression/test_repeat04.rb +1 -1
- data/test/regression/test_repeat05.rb +1 -1
- data/test/regression/test_rich_string01.rb +1 -1
- data/test/regression/test_rich_string02.rb +1 -1
- data/test/regression/test_rich_string03.rb +1 -1
- data/test/regression/test_rich_string04.rb +1 -1
- data/test/regression/test_rich_string05.rb +1 -1
- data/test/regression/test_rich_string06.rb +1 -1
- data/test/regression/test_rich_string07.rb +1 -1
- data/test/regression/test_rich_string08.rb +1 -1
- data/test/regression/test_rich_string09.rb +1 -1
- data/test/regression/test_rich_string10.rb +1 -1
- data/test/regression/test_rich_string11.rb +1 -1
- data/test/regression/test_rich_string12.rb +1 -1
- data/test/regression/test_row_col_format01.rb +1 -1
- data/test/regression/test_row_col_format02.rb +1 -1
- data/test/regression/test_row_col_format03.rb +1 -1
- data/test/regression/test_row_col_format04.rb +1 -1
- data/test/regression/test_row_col_format05.rb +1 -1
- data/test/regression/test_row_col_format06.rb +1 -1
- data/test/regression/test_row_col_format07.rb +1 -1
- data/test/regression/test_row_col_format08.rb +1 -1
- data/test/regression/test_row_col_format09.rb +1 -1
- data/test/regression/test_row_col_format10.rb +1 -1
- data/test/regression/test_row_col_format11.rb +1 -1
- data/test/regression/test_row_col_format12.rb +1 -1
- data/test/regression/test_row_col_format13.rb +1 -1
- data/test/regression/test_row_col_format14.rb +1 -1
- data/test/regression/test_selection01.rb +1 -1
- data/test/regression/test_selection02.rb +1 -1
- data/test/regression/test_set_column01.rb +1 -1
- data/test/regression/test_set_column02.rb +1 -1
- data/test/regression/test_set_column03.rb +1 -1
- data/test/regression/test_set_column04.rb +1 -1
- data/test/regression/test_set_column05.rb +1 -1
- data/test/regression/test_set_column06.rb +1 -1
- data/test/regression/test_set_column07.rb +1 -1
- data/test/regression/test_set_column08.rb +1 -1
- data/test/regression/test_set_column09.rb +1 -1
- data/test/regression/test_set_column10.rb +55 -0
- data/test/regression/test_set_column11.rb +48 -0
- data/test/regression/test_set_print_scale01.rb +1 -1
- data/test/regression/test_set_row01.rb +35 -0
- data/test/regression/test_set_row02.rb +35 -0
- data/test/regression/test_set_row03.rb +35 -0
- data/test/regression/test_set_row04.rb +35 -0
- data/test/regression/test_set_start_page01.rb +1 -1
- data/test/regression/test_set_start_page02.rb +1 -1
- data/test/regression/test_set_start_page03.rb +1 -1
- data/test/regression/test_shape01.rb +1 -1
- data/test/regression/test_shape02.rb +1 -1
- data/test/regression/test_shape03.rb +1 -1
- data/test/regression/test_shape04.rb +1 -1
- data/test/regression/test_shape_connect01.rb +5 -3
- data/test/regression/test_shape_connect02.rb +1 -1
- data/test/regression/test_shape_connect03.rb +1 -1
- data/test/regression/test_shape_connect04.rb +1 -1
- data/test/regression/test_shape_scale01.rb +1 -1
- data/test/regression/test_shape_stencil01.rb +1 -1
- data/test/regression/test_shared_strings01.rb +1 -1
- data/test/regression/test_shared_strings02.rb +1 -1
- data/test/regression/test_simple01.rb +1 -1
- data/test/regression/test_simple02.rb +1 -1
- data/test/regression/test_simple03.rb +1 -1
- data/test/regression/test_simple04.rb +1 -1
- data/test/regression/test_simple05.rb +1 -1
- data/test/regression/test_tab_color01.rb +1 -1
- data/test/regression/test_table01.rb +1 -1
- data/test/regression/test_table02.rb +1 -1
- data/test/regression/test_table03.rb +4 -1
- data/test/regression/test_table04.rb +4 -1
- data/test/regression/test_table05.rb +4 -1
- data/test/regression/test_table06.rb +4 -1
- data/test/regression/test_table07.rb +1 -1
- data/test/regression/test_table08.rb +1 -1
- data/test/regression/test_table09.rb +1 -1
- data/test/regression/test_table10.rb +1 -1
- data/test/regression/test_table11.rb +1 -1
- data/test/regression/test_table12.rb +1 -1
- data/test/regression/test_table13.rb +1 -1
- data/test/regression/test_table14.rb +1 -1
- data/test/regression/test_table15.rb +1 -1
- data/test/regression/test_table16.rb +1 -1
- data/test/regression/test_table17.rb +1 -1
- data/test/regression/test_table20.rb +34 -0
- data/test/regression/test_table21.rb +36 -0
- data/test/regression/test_table22.rb +32 -0
- data/test/regression/test_table23.rb +56 -0
- data/test/regression/test_table24.rb +27 -0
- data/test/regression/test_table25.rb +27 -0
- data/test/regression/test_table26.rb +38 -0
- data/test/regression/test_tutorial01.rb +1 -1
- data/test/regression/test_tutorial02.rb +1 -1
- data/test/regression/test_tutorial03.rb +1 -1
- data/test/regression/test_types02.rb +25 -0
- data/test/regression/test_types08.rb +31 -0
- data/test/regression/test_update_range_format_with_params.rb +42 -0
- data/test/regression/test_urls_as_strings.rb +1 -1
- data/test/regression/test_utf8_01.rb +1 -1
- data/test/regression/test_utf8_03.rb +1 -1
- data/test/regression/test_utf8_04.rb +1 -1
- data/test/regression/test_utf8_05.rb +1 -1
- data/test/regression/test_utf8_06.rb +1 -1
- data/test/regression/test_utf8_07.rb +1 -1
- data/test/regression/test_utf8_08.rb +1 -1
- data/test/regression/test_utf8_09.rb +1 -1
- data/test/regression/test_utf8_10.rb +1 -1
- data/test/regression/test_utf8_11.rb +23 -0
- data/test/regression/test_vml01.rb +1 -1
- data/test/regression/test_vml02.rb +1 -1
- data/test/regression/test_vml03.rb +1 -1
- data/test/regression/xlsx_files/array_formula03.xlsx +0 -0
- data/test/regression/xlsx_files/array_formula04.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter08.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter09.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter10.xlsx +0 -0
- data/test/regression/xlsx_files/background01.xlsx +0 -0
- data/test/regression/xlsx_files/background02.xlsx +0 -0
- data/test/regression/xlsx_files/background03.xlsx +0 -0
- data/test/regression/xlsx_files/background04.xlsx +0 -0
- data/test/regression/xlsx_files/background05.xlsx +0 -0
- data/test/regression/xlsx_files/background06.xlsx +0 -0
- data/test/regression/xlsx_files/background07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis26.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis27.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis28.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis29.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis33.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis40.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis41.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis42.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis43.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis44.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis45.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis46.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis47.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis48.xlsx +0 -0
- data/test/regression/xlsx_files/chart_chartarea05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_chartarea06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_combined09.xlsx +0 -0
- data/test/regression/xlsx_files/chart_combined10.xlsx +0 -0
- data/test/regression/xlsx_files/chart_combined11.xlsx +0 -0
- data/test/regression/xlsx_files/chart_crossing05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_crossing06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels25.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels26.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels27.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels28.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels29.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels30.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels31.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels32.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels33.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels34.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels35.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels36.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels37.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels38.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels39.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels40.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels41.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels42.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels43.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels44.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels45.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels46.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels47.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels48.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels49.xlsx +0 -0
- data/test/regression/xlsx_files/chart_data_labels50.xlsx +0 -0
- data/test/regression/xlsx_files/chart_doughnut07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_font09.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format21.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format22.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format23.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format24.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format25.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format26.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format27.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format28.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format29.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format30.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format31.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_legend07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_line05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_line06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern08.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern09.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pattern10.xlsx +0 -0
- data/test/regression/xlsx_files/chart_table03.xlsx +0 -0
- data/test/regression/xlsx_files/comment13.xlsx +0 -0
- data/test/regression/xlsx_files/comment14.xlsx +0 -0
- data/test/regression/xlsx_files/comment15.xlsx +0 -0
- data/test/regression/xlsx_files/comment16.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format14.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format15.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format16.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format17.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format18.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format19.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format20.xlsx +0 -0
- data/test/regression/xlsx_files/data_validation08.xlsx +0 -0
- data/test/regression/xlsx_files/date_1904_01.xlsx +0 -0
- data/test/regression/xlsx_files/default_row05.xlsx +0 -0
- data/test/regression/xlsx_files/dynamic_array01.xlsx +0 -0
- data/test/regression/xlsx_files/format13.xlsx +0 -0
- data/test/regression/xlsx_files/format14.xlsx +0 -0
- data/test/regression/xlsx_files/format15.xlsx +0 -0
- data/test/regression/xlsx_files/format16.xlsx +0 -0
- data/test/regression/xlsx_files/format17.xlsx +0 -0
- data/test/regression/xlsx_files/header04.xlsx +0 -0
- data/test/regression/xlsx_files/header_image15.xlsx +0 -0
- data/test/regression/xlsx_files/header_image16.xlsx +0 -0
- data/test/regression/xlsx_files/header_image17.xlsx +0 -0
- data/test/regression/xlsx_files/header_image18.xlsx +0 -0
- data/test/regression/xlsx_files/header_image19.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink22.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink23.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink24.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink25.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink26.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink27.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink28.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink29.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink30.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink31.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink32.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink33.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink34.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink35.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink36.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink37.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink38.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink39.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink40.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink41.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink42.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink43.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink44.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink45.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink46.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink47.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink48.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink49.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink50.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink51.xlsx +0 -0
- data/test/regression/xlsx_files/ignore_error01.xlsx +0 -0
- data/test/regression/xlsx_files/ignore_error02.xlsx +0 -0
- data/test/regression/xlsx_files/ignore_error03.xlsx +0 -0
- data/test/regression/xlsx_files/ignore_error04.xlsx +0 -0
- data/test/regression/xlsx_files/ignore_error05.xlsx +0 -0
- data/test/regression/xlsx_files/ignore_error06.xlsx +0 -0
- data/test/regression/xlsx_files/image06.xlsx +0 -0
- data/test/regression/xlsx_files/image28.xlsx +0 -0
- data/test/regression/xlsx_files/image29.xlsx +0 -0
- data/test/regression/xlsx_files/image30.xlsx +0 -0
- data/test/regression/xlsx_files/image31.xlsx +0 -0
- data/test/regression/xlsx_files/image32.xlsx +0 -0
- data/test/regression/xlsx_files/image33.xlsx +0 -0
- data/test/regression/xlsx_files/image35.xlsx +0 -0
- data/test/regression/xlsx_files/image36.xlsx +0 -0
- data/test/regression/xlsx_files/image44.xlsx +0 -0
- data/test/regression/xlsx_files/image45.xlsx +0 -0
- data/test/regression/xlsx_files/image46.xlsx +0 -0
- data/test/regression/xlsx_files/image47.xlsx +0 -0
- data/test/regression/xlsx_files/image48.xlsx +0 -0
- data/test/regression/xlsx_files/image49.xlsx +0 -0
- data/test/regression/xlsx_files/image50.xlsx +0 -0
- data/test/regression/xlsx_files/image51.xlsx +0 -0
- data/test/regression/xlsx_files/image52.xlsx +0 -0
- data/test/regression/xlsx_files/image53.xlsx +0 -0
- data/test/regression/xlsx_files/image54.xlsx +0 -0
- data/test/regression/xlsx_files/image55.xlsx +0 -0
- data/test/regression/xlsx_files/image56.xlsx +0 -0
- data/test/regression/xlsx_files/image57.xlsx +0 -0
- data/test/regression/xlsx_files/object_position01.xlsx +0 -0
- data/test/regression/xlsx_files/object_position02.xlsx +0 -0
- data/test/regression/xlsx_files/object_position03.xlsx +0 -0
- data/test/regression/xlsx_files/object_position04.xlsx +0 -0
- data/test/regression/xlsx_files/object_position06.xlsx +0 -0
- data/test/regression/xlsx_files/object_position07.xlsx +0 -0
- data/test/regression/xlsx_files/object_position08.xlsx +0 -0
- data/test/regression/xlsx_files/object_position09.xlsx +0 -0
- data/test/regression/xlsx_files/object_position10.xlsx +0 -0
- data/test/regression/xlsx_files/object_position12.xlsx +0 -0
- data/test/regression/xlsx_files/object_position13.xlsx +0 -0
- data/test/regression/xlsx_files/object_position14.xlsx +0 -0
- data/test/regression/xlsx_files/object_position15.xlsx +0 -0
- data/test/regression/xlsx_files/object_position16.xlsx +0 -0
- data/test/regression/xlsx_files/object_position17.xlsx +0 -0
- data/test/regression/xlsx_files/object_position18.xlsx +0 -0
- data/test/regression/xlsx_files/object_position19.xlsx +0 -0
- data/test/regression/xlsx_files/object_position20.xlsx +0 -0
- data/test/regression/xlsx_files/properties02.xlsx +0 -0
- data/test/regression/xlsx_files/properties03.xlsx +0 -0
- data/test/regression/xlsx_files/properties04.xlsx +0 -0
- data/test/regression/xlsx_files/properties05.xlsx +0 -0
- data/test/regression/xlsx_files/protect04.xlsx +0 -0
- data/test/regression/xlsx_files/protect05.xlsx +0 -0
- data/test/regression/xlsx_files/protect06.xlsx +0 -0
- data/test/regression/xlsx_files/protect07.xlsx +0 -0
- data/test/regression/xlsx_files/set_row01.xlsx +0 -0
- data/test/regression/xlsx_files/set_row03.xlsx +0 -0
- data/test/regression/xlsx_files/table18.xlsx +0 -0
- data/test/regression/xlsx_files/table19.xlsx +0 -0
- data/test/regression/xlsx_files/table21.xlsx +0 -0
- data/test/regression/xlsx_files/table22.xlsx +0 -0
- data/test/regression/xlsx_files/table23.xlsx +0 -0
- data/test/regression/xlsx_files/table24.xlsx +0 -0
- data/test/regression/xlsx_files/table25.xlsx +0 -0
- data/test/regression/xlsx_files/table26.xlsx +0 -0
- data/test/regression/xlsx_files/types02.xlsx +0 -0
- data/test/regression/xlsx_files/types08.xlsx +0 -0
- data/test/regression/xlsx_files/update_range_format_with_params.xlsx +0 -0
- data/test/regression/xlsx_files/utf8_11.xlsx +0 -0
- data/test/test_delete_files.rb +3 -3
- data/test/test_example_match.rb +1342 -781
- data/test/test_option_hash_for_workbook.rb +1 -1
- data/test/test_xml_writer_simple.rb +1 -1
- data/test/utility/test_range.rb +20 -0
- data/test/workbook/test_check_sheetname.rb +51 -0
- data/test/workbook/test_define_name.rb +1 -1
- data/test/workbook/test_get_chart_range.rb +3 -5
- data/test/workbook/test_sort_defined_names.rb +1 -1
- data/test/workbook/test_workbook_01.rb +1 -1
- data/test/workbook/test_workbook_02.rb +1 -1
- data/test/workbook/test_workbook_03.rb +1 -1
- data/test/workbook/test_worksheet_by_name.rb +35 -0
- data/test/workbook/test_write_calc_pr.rb +1 -1
- data/test/workbook/test_write_defined_name.rb +1 -1
- data/test/workbook/test_write_defined_names.rb +1 -1
- data/test/workbook/test_write_workbook_view.rb +117 -0
- data/test/worksheet/test_calculate_spans.rb +1 -1
- data/test/worksheet/test_cond_format_01.rb +1 -1
- data/test/worksheet/test_cond_format_02.rb +1 -1
- data/test/worksheet/test_cond_format_03.rb +1 -1
- data/test/worksheet/test_cond_format_04.rb +1 -1
- data/test/worksheet/test_cond_format_05.rb +1 -1
- data/test/worksheet/test_cond_format_06.rb +1 -1
- data/test/worksheet/test_cond_format_07.rb +1 -1
- data/test/worksheet/test_cond_format_08.rb +1 -1
- data/test/worksheet/test_cond_format_09.rb +1 -1
- data/test/worksheet/test_cond_format_10.rb +1 -1
- data/test/worksheet/test_cond_format_11.rb +1 -1
- data/test/worksheet/test_cond_format_12.rb +1 -1
- data/test/worksheet/test_cond_format_13.rb +1 -1
- data/test/worksheet/test_cond_format_14.rb +1 -1
- data/test/worksheet/test_cond_format_15.rb +1 -1
- data/test/worksheet/test_cond_format_16.rb +1 -1
- data/test/worksheet/test_cond_format_17.rb +1 -1
- data/test/worksheet/test_cond_format_18.rb +1 -1
- data/test/worksheet/test_cond_format_19.rb +1 -1
- data/test/worksheet/test_cond_format_20.rb +1 -1
- data/test/worksheet/test_cond_format_21.rb +90 -0
- data/test/worksheet/test_cond_format_22.rb +266 -0
- data/test/worksheet/test_cond_format_23.rb +242 -0
- data/test/worksheet/test_cond_format_24.rb +303 -0
- data/test/worksheet/test_convert_date_time_01.rb +1 -1
- data/test/worksheet/test_convert_date_time_02.rb +1 -1
- data/test/worksheet/test_convert_date_time_03.rb +1 -1
- data/test/worksheet/test_convert_date_time_04.rb +1 -1
- data/test/worksheet/test_data_bar_01.rb +53 -0
- data/test/worksheet/test_data_bar_02.rb +79 -0
- data/test/worksheet/test_data_bar_03.rb +147 -0
- data/test/worksheet/test_data_bar_04.rb +145 -0
- data/test/worksheet/test_data_bar_05.rb +147 -0
- data/test/worksheet/test_data_bar_06.rb +145 -0
- data/test/worksheet/test_data_bar_07.rb +146 -0
- data/test/worksheet/test_data_bar_08.rb +54 -0
- data/test/worksheet/test_data_bar_09.rb +80 -0
- data/test/worksheet/test_data_bar_10.rb +165 -0
- data/test/worksheet/test_data_bar_11.rb +167 -0
- data/test/worksheet/test_data_bar_12.rb +104 -0
- data/test/worksheet/test_extract_filter_tokens.rb +1 -1
- data/test/worksheet/test_parse_filter_expression.rb +1 -1
- data/test/worksheet/test_pixels_to_row_col.rb +46 -0
- data/test/worksheet/test_position_object.rb +1 -1
- data/test/worksheet/test_repeat_formula.rb +1 -1
- data/test/worksheet/test_sparkline_01.rb +1 -1
- data/test/worksheet/test_sparkline_02.rb +1 -1
- data/test/worksheet/test_sparkline_03.rb +1 -1
- data/test/worksheet/test_sparkline_04.rb +1 -1
- data/test/worksheet/test_sparkline_05.rb +1 -1
- data/test/worksheet/test_sparkline_06.rb +1 -1
- data/test/worksheet/test_sparkline_07.rb +1 -1
- data/test/worksheet/test_sparkline_08.rb +1 -1
- data/test/worksheet/test_sparkline_09.rb +1 -1
- data/test/worksheet/test_sparkline_10.rb +1 -1
- data/test/worksheet/test_sparkline_11.rb +1 -1
- data/test/worksheet/test_sparkline_12.rb +94 -0
- data/test/worksheet/test_update_format_methods.rb +91 -0
- data/test/worksheet/test_worksheet_01.rb +1 -1
- data/test/worksheet/test_worksheet_02.rb +1 -1
- data/test/worksheet/test_worksheet_03.rb +1 -1
- data/test/worksheet/test_worksheet_04.rb +1 -1
- data/test/worksheet/test_write_array_formula_01.rb +1 -8
- data/test/worksheet/test_write_autofilter.rb +1 -1
- data/test/worksheet/test_write_brk.rb +1 -1
- data/test/worksheet/test_write_cell.rb +1 -1
- data/test/worksheet/test_write_cell_value.rb +1 -1
- data/test/worksheet/test_write_col_breaks.rb +1 -1
- data/test/worksheet/test_write_col_info.rb +1 -1
- data/test/worksheet/test_write_conditional_formatting.rb +1 -1
- data/test/worksheet/test_write_custom_filter.rb +1 -1
- data/test/worksheet/test_write_custom_filters.rb +1 -1
- data/test/worksheet/test_write_data_validation_01.rb +1 -1
- data/test/worksheet/test_write_data_validation_02.rb +59 -2
- data/test/worksheet/test_write_dimension.rb +1 -1
- data/test/worksheet/test_write_filter.rb +1 -1
- data/test/worksheet/test_write_filter_column.rb +1 -1
- data/test/worksheet/test_write_filters.rb +1 -1
- data/test/worksheet/test_write_formula_does_not_change_formula_string.rb +1 -1
- data/test/worksheet/test_write_header_footer.rb +1 -1
- data/test/worksheet/test_write_hyperlink.rb +1 -8
- data/test/worksheet/test_write_legacy_drawing.rb +1 -1
- data/test/worksheet/test_write_merge_cell.rb +1 -1
- data/test/worksheet/test_write_merge_cells.rb +1 -1
- data/test/worksheet/test_write_methods.rb +68 -177
- data/test/worksheet/test_write_page_margins.rb +1 -1
- data/test/worksheet/test_write_page_set_up_pr.rb +1 -1
- data/test/worksheet/test_write_page_setup.rb +1 -1
- data/test/worksheet/test_write_pane.rb +1 -1
- data/test/worksheet/test_write_phonetic_pr.rb +1 -1
- data/test/worksheet/test_write_print_options.rb +1 -1
- data/test/worksheet/test_write_row_breaks.rb +1 -1
- data/test/worksheet/test_write_row_element.rb +1 -1
- data/test/worksheet/test_write_selection.rb +1 -1
- data/test/worksheet/test_write_sheet_calc_pr.rb +1 -1
- data/test/worksheet/test_write_sheet_data.rb +1 -1
- data/test/worksheet/test_write_sheet_format_pr.rb +1 -1
- data/test/worksheet/test_write_sheet_pr.rb +1 -1
- data/test/worksheet/test_write_sheet_protection.rb +1 -1
- data/test/worksheet/test_write_sheet_view.rb +20 -2
- data/test/worksheet/test_write_sheet_view1.rb +1 -1
- data/test/worksheet/test_write_sheet_view2.rb +1 -1
- data/test/worksheet/test_write_sheet_view3.rb +1 -1
- data/test/worksheet/test_write_sheet_view4.rb +1 -1
- data/test/worksheet/test_write_sheet_view5.rb +1 -1
- data/test/worksheet/test_write_sheet_view6.rb +1 -1
- data/test/worksheet/test_write_sheet_view7.rb +1 -1
- data/test/worksheet/test_write_sheet_view8.rb +1 -1
- data/test/worksheet/test_write_sheet_view9.rb +1 -1
- data/test/worksheet/test_write_tab_color.rb +1 -1
- data/test/worksheet/test_write_worksheet_attributes.rb +1 -1
- data/write_xlsx.gemspec +4 -3
- metadata +937 -18
- data/test/package/comments/test_write_text_t.rb +0 -44
- data/test/test_col_name.rb +0 -13
- data/test/workbook/test_workbook_new.rb +0 -18
- data/test/worksheet/test_write_multiline_string_with_url.rb +0 -30
- data/test/worksheet/test_write_url.rb +0 -19
data/test/test_example_match.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require 'helper'
|
3
3
|
require 'write_xlsx'
|
4
4
|
|
5
|
-
class TestExampleMatch < Test
|
5
|
+
class TestExampleMatch < Minitest::Test
|
6
6
|
def setup
|
7
7
|
setup_dir_var
|
8
8
|
end
|
@@ -11,6 +11,18 @@ class TestExampleMatch < Test::Unit::TestCase
|
|
11
11
|
@tempfile.close
|
12
12
|
end
|
13
13
|
|
14
|
+
def test_multi_line
|
15
|
+
@xlsx = 'multi_line.xlsx'
|
16
|
+
workbook = WriteXLSX.new(@io)
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
worksheet.write(0, 0, "Hi Excel!\n1234\nHi, again!")
|
20
|
+
|
21
|
+
workbook.close
|
22
|
+
store_to_tempfile
|
23
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
24
|
+
end
|
25
|
+
|
14
26
|
def test_a_simple
|
15
27
|
@xlsx = 'a_simple.xlsx'
|
16
28
|
# Create a new workbook called simple.xls and add a worksheet
|
@@ -36,9 +48,9 @@ class TestExampleMatch < Test::Unit::TestCase
|
|
36
48
|
|
37
49
|
# Write a hyperlink
|
38
50
|
hyperlink_format = workbook.add_format(
|
39
|
-
|
40
|
-
|
41
|
-
|
51
|
+
:color => 'blue',
|
52
|
+
:underline => 1
|
53
|
+
)
|
42
54
|
|
43
55
|
worksheet.write(10, 0, 'http://www.ruby-lang.org/', hyperlink_format)
|
44
56
|
|
@@ -242,6 +254,393 @@ class TestExampleMatch < Test::Unit::TestCase
|
|
242
254
|
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
243
255
|
end
|
244
256
|
|
257
|
+
def teset_background
|
258
|
+
@xlsx = 'background.xlsx'
|
259
|
+
workbook = WriteXLSX.new(@io)
|
260
|
+
|
261
|
+
worksheet = workbook.add_worksheet
|
262
|
+
worksheet.set_background(File.join(@test_dir, 'republic.png'))
|
263
|
+
|
264
|
+
workbook.close
|
265
|
+
store_to_tempfile
|
266
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
267
|
+
end
|
268
|
+
|
269
|
+
def test_chart_data_labels
|
270
|
+
@xlsx = 'chart_data_labels.xlsx'
|
271
|
+
workbook = WriteXLSX.new(@io)
|
272
|
+
|
273
|
+
worksheet = workbook.add_worksheet
|
274
|
+
bold = workbook.add_format(:bold => 1)
|
275
|
+
|
276
|
+
# Add the worksheet data that the charts will refer to.
|
277
|
+
headings = ['Number', 'Data', 'Text']
|
278
|
+
data = [
|
279
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
280
|
+
[20, 10, 20, 30, 40, 30 ],
|
281
|
+
['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']
|
282
|
+
]
|
283
|
+
|
284
|
+
worksheet.write('A1', headings, bold)
|
285
|
+
worksheet.write('A2', data)
|
286
|
+
|
287
|
+
|
288
|
+
#######################################################################
|
289
|
+
#
|
290
|
+
# Example with standard data labels.
|
291
|
+
#
|
292
|
+
|
293
|
+
# Create a Column chart.
|
294
|
+
chart1 = workbook.add_chart(:type => 'column', :embedded => 1)
|
295
|
+
|
296
|
+
# Configure the data series and add the data labels.
|
297
|
+
chart1.add_series(
|
298
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
299
|
+
:values => '=Sheet1!$B$2:$B$7',
|
300
|
+
:data_labels => { :value => 1 }
|
301
|
+
)
|
302
|
+
|
303
|
+
# Add a chart title.
|
304
|
+
chart1.set_title(:name => 'Chart with standard data labels')
|
305
|
+
|
306
|
+
# Turn off the chart legend.
|
307
|
+
chart1.set_legend(:none => 1)
|
308
|
+
|
309
|
+
# Insert the chart into the worksheet (with an offset).
|
310
|
+
worksheet.insert_chart('D2', chart1, { :x_offset => 25, :y_offset => 10 })
|
311
|
+
|
312
|
+
|
313
|
+
#######################################################################
|
314
|
+
#
|
315
|
+
# Example with value and category data labels.
|
316
|
+
#
|
317
|
+
|
318
|
+
# Create a Column chart.
|
319
|
+
chart2 = workbook.add_chart(:type => 'column', :embedded => 1)
|
320
|
+
|
321
|
+
# Configure the data series and add the data labels.
|
322
|
+
chart2.add_series(
|
323
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
324
|
+
:values => '=Sheet1!$B$2:$B$7',
|
325
|
+
:data_labels => { :value => 1, :category => 1 }
|
326
|
+
)
|
327
|
+
|
328
|
+
# Add a chart title.
|
329
|
+
chart2.set_title(:name => 'Category and Value data labels')
|
330
|
+
|
331
|
+
# Turn off the chart legend.
|
332
|
+
chart2.set_legend(:none => 1)
|
333
|
+
|
334
|
+
# Insert the chart into the worksheet (with an offset).
|
335
|
+
worksheet.insert_chart('D18', chart2, { :x_offset => 25, :y_offset => 10 })
|
336
|
+
|
337
|
+
|
338
|
+
#######################################################################
|
339
|
+
#
|
340
|
+
# Example with standard data labels with different font.
|
341
|
+
#
|
342
|
+
|
343
|
+
# Create a Column chart.
|
344
|
+
chart3 = workbook.add_chart(:type => 'column', :embedded => 1)
|
345
|
+
|
346
|
+
# Configure the data series and add the data labels.
|
347
|
+
chart3.add_series(
|
348
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
349
|
+
:values => '=Sheet1!$B$2:$B$7',
|
350
|
+
:data_labels => { :value => 1,
|
351
|
+
:font => {:bold => 1,
|
352
|
+
:color => 'red',
|
353
|
+
:rotation => -30}
|
354
|
+
}
|
355
|
+
)
|
356
|
+
|
357
|
+
# Add a chart title.
|
358
|
+
chart3.set_title(:name => 'Data labels with user defined font')
|
359
|
+
|
360
|
+
# Turn off the chart legend.
|
361
|
+
chart3.set_legend(:none => 1)
|
362
|
+
|
363
|
+
# Insert the chart into the worksheet (with an offset).
|
364
|
+
worksheet.insert_chart('D34', chart3, { :x_offset => 25, :y_offset => 10 })
|
365
|
+
|
366
|
+
|
367
|
+
#######################################################################
|
368
|
+
#
|
369
|
+
# Example with custom string data labels.
|
370
|
+
#
|
371
|
+
|
372
|
+
# Create a Column chart.
|
373
|
+
chart4 = workbook.add_chart(:type => 'column', :embedded => 1)
|
374
|
+
|
375
|
+
# Configure the data series and add the data labels.
|
376
|
+
chart4.add_series(
|
377
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
378
|
+
:values => '=Sheet1!$B$2:$B$7',
|
379
|
+
:data_labels => {
|
380
|
+
:value => 1,
|
381
|
+
:border => {:color => 'red'},
|
382
|
+
:fill => {:color => 'yellow'}
|
383
|
+
}
|
384
|
+
)
|
385
|
+
|
386
|
+
# Add a chart title.
|
387
|
+
chart4.set_title(:name => 'Data labels with formatting')
|
388
|
+
|
389
|
+
# Turn off the chart legend.
|
390
|
+
chart4.set_legend(:none => 1)
|
391
|
+
|
392
|
+
# Insert the chart into the worksheet (with an offset).
|
393
|
+
worksheet.insert_chart('D50', chart4, { :x_offset => 25, :y_offset => 10 })
|
394
|
+
|
395
|
+
|
396
|
+
#######################################################################
|
397
|
+
#
|
398
|
+
# Example with custom string data labels.
|
399
|
+
#
|
400
|
+
|
401
|
+
# Create a Column chart.
|
402
|
+
chart5 = workbook.add_chart( :type => 'column', :embedded => 1 )
|
403
|
+
|
404
|
+
# Some custom labels.
|
405
|
+
custom_labels = [
|
406
|
+
{ :value => 'Amy' },
|
407
|
+
{ :value => 'Bea' },
|
408
|
+
{ :value => 'Eva' },
|
409
|
+
{ :value => 'Fay' },
|
410
|
+
{ :value => 'Liv' },
|
411
|
+
{ :value => 'Una' }
|
412
|
+
]
|
413
|
+
|
414
|
+
# Configure the data series and add the data labels.
|
415
|
+
chart5.add_series(
|
416
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
417
|
+
:values => '=Sheet1!$B$2:$B$7',
|
418
|
+
:data_labels => { :value => 1, :custom => custom_labels }
|
419
|
+
)
|
420
|
+
|
421
|
+
# Add a chart title.
|
422
|
+
chart5.set_title(:name => 'Chart with custom string data labels')
|
423
|
+
|
424
|
+
# Turn off the chart legend.
|
425
|
+
chart5.set_legend(:none => 1)
|
426
|
+
|
427
|
+
# Insert the chart into the worksheet (with an offset).
|
428
|
+
worksheet.insert_chart('D66', chart5, { :x_offset => 25, :y_offset => 10 })
|
429
|
+
|
430
|
+
|
431
|
+
#######################################################################
|
432
|
+
#
|
433
|
+
# Example with custom data labels from cells.
|
434
|
+
#
|
435
|
+
|
436
|
+
# Create a Column chart.
|
437
|
+
chart6 = workbook.add_chart(:type => 'column', :embedded => 1)
|
438
|
+
|
439
|
+
# Some custom labels.
|
440
|
+
custom_labels = [
|
441
|
+
{ :value => '=Sheet1!$C$2' },
|
442
|
+
{ :value => '=Sheet1!$C$3' },
|
443
|
+
{ :value => '=Sheet1!$C$4' },
|
444
|
+
{ :value => '=Sheet1!$C$5' },
|
445
|
+
{ :value => '=Sheet1!$C$6' },
|
446
|
+
{ :value => '=Sheet1!$C$7' }
|
447
|
+
]
|
448
|
+
|
449
|
+
|
450
|
+
# Configure the data series and add the data labels.
|
451
|
+
chart6.add_series(
|
452
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
453
|
+
:values => '=Sheet1!$B$2:$B$7',
|
454
|
+
:data_labels => { :value => 1, :custom => custom_labels }
|
455
|
+
)
|
456
|
+
|
457
|
+
# Add a chart title.
|
458
|
+
chart6.set_title(:name => 'Chart with custom data labels from cells')
|
459
|
+
|
460
|
+
# Turn off the chart legend.
|
461
|
+
chart6.set_legend(:none => 1)
|
462
|
+
|
463
|
+
# Insert the chart into the worksheet (with an offset).
|
464
|
+
worksheet.insert_chart('D82', chart6, { :x_offset => 25, :y_offset => 10 })
|
465
|
+
|
466
|
+
|
467
|
+
#######################################################################
|
468
|
+
#
|
469
|
+
# Example with custom and default data labels.
|
470
|
+
#
|
471
|
+
|
472
|
+
# Create a Column chart.
|
473
|
+
chart7 = workbook.add_chart(:type => 'column', :embedded => 1)
|
474
|
+
|
475
|
+
# Some custom labels. The nil items will get the default value.
|
476
|
+
# We also set a font for the custom items as an extra example.
|
477
|
+
custom_labels = [
|
478
|
+
{ :value => '=Sheet1!$C$2', :font => { :color => 'red' } },
|
479
|
+
nil,
|
480
|
+
{ :value => '=Sheet1!$C$4', :font => { :color => 'red' } },
|
481
|
+
{ :value => '=Sheet1!$C$5', :font => { :color => 'red' } }
|
482
|
+
]
|
483
|
+
|
484
|
+
|
485
|
+
# Configure the data series and add the data labels.
|
486
|
+
chart7.add_series(
|
487
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
488
|
+
:values => '=Sheet1!$B$2:$B$7',
|
489
|
+
:data_labels => { :value => 1, :custom => custom_labels }
|
490
|
+
)
|
491
|
+
|
492
|
+
# Add a chart title.
|
493
|
+
chart7.set_title(:name => 'Mixed custom and default data labels')
|
494
|
+
|
495
|
+
# Turn off the chart legend.
|
496
|
+
chart7.set_legend(:none => 1)
|
497
|
+
|
498
|
+
# Insert the chart into the worksheet (with an offset).
|
499
|
+
worksheet.insert_chart('D98', chart7, { :x_offset => 25, :y_offset => 10 })
|
500
|
+
|
501
|
+
|
502
|
+
#######################################################################
|
503
|
+
#
|
504
|
+
# Example with deleted custom data labels.
|
505
|
+
#
|
506
|
+
|
507
|
+
# Create a Column chart.
|
508
|
+
chart8 = workbook.add_chart(:type => 'column', :embedded => 1)
|
509
|
+
|
510
|
+
# Some deleted custom labels and defaults (nil). This allows us to
|
511
|
+
# highlight certain values such as the minimum and maximum.
|
512
|
+
custom_labels = [
|
513
|
+
{ :delete => 1 },
|
514
|
+
nil,
|
515
|
+
{ :delete => 1 },
|
516
|
+
{ :delete => 1 },
|
517
|
+
nil,
|
518
|
+
{ :delete => 1 }
|
519
|
+
]
|
520
|
+
|
521
|
+
# Configure the data series and add the data labels.
|
522
|
+
chart8.add_series(
|
523
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
524
|
+
:values => '=Sheet1!$B$2:$B$7',
|
525
|
+
:data_labels => { :value => 1, :custom => custom_labels }
|
526
|
+
)
|
527
|
+
|
528
|
+
# Add a chart title.
|
529
|
+
chart8.set_title(:name => 'Chart with deleted data labels')
|
530
|
+
|
531
|
+
# Turn off the chart legend.
|
532
|
+
chart8.set_legend(:none => 1)
|
533
|
+
|
534
|
+
# Insert the chart into the worksheet (with an offset).
|
535
|
+
worksheet.insert_chart('D114', chart8, { :x_offset => 25, :y_offset => 10 })
|
536
|
+
|
537
|
+
#######################################################################
|
538
|
+
#
|
539
|
+
# Example with custom string data labels and formatting.
|
540
|
+
#
|
541
|
+
|
542
|
+
# Create a Column chart.
|
543
|
+
chart9 = workbook.add_chart( :type => 'column', :embedded => 1 )
|
544
|
+
|
545
|
+
# Some custom labels.
|
546
|
+
custom_labels = [
|
547
|
+
{ :value => 'Amy', :border => {:color => 'blue'} },
|
548
|
+
{ :value => 'Bea' },
|
549
|
+
{ :value => 'Eva' },
|
550
|
+
{ :value => 'Fay' },
|
551
|
+
{ :value => 'Liv' },
|
552
|
+
{ :value => 'Una', :fill => {:color => 'green'} }
|
553
|
+
]
|
554
|
+
|
555
|
+
|
556
|
+
# Configure the data series and add the data labels.
|
557
|
+
chart9.add_series(
|
558
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
559
|
+
:values => '=Sheet1!$B$2:$B$7',
|
560
|
+
:data_labels => {
|
561
|
+
:value => 1,
|
562
|
+
:custom => custom_labels,
|
563
|
+
:border => {:color => 'red'},
|
564
|
+
:fill => {:color => 'yellow'}
|
565
|
+
}
|
566
|
+
)
|
567
|
+
|
568
|
+
# Add a chart title.
|
569
|
+
chart9.set_title( :name => 'Chart with custom labels and formatting' )
|
570
|
+
|
571
|
+
# Turn off the chart legend.
|
572
|
+
chart9.set_legend( :none => 1 )
|
573
|
+
|
574
|
+
# Insert the chart into the worksheet (with an offset).
|
575
|
+
worksheet.insert_chart( 'D130', chart9, { :x_offset => 25, :y_offset => 10 } )
|
576
|
+
|
577
|
+
workbook.close
|
578
|
+
store_to_tempfile
|
579
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
580
|
+
end
|
581
|
+
|
582
|
+
def test_chart_gauge
|
583
|
+
@xlsx = 'chart_gauge.xlsx'
|
584
|
+
workbook = WriteXLSX.new(@io)
|
585
|
+
worksheet = workbook.add_worksheet
|
586
|
+
|
587
|
+
chart_doughnut = workbook.add_chart(:type => 'doughnut', :embedded => 1)
|
588
|
+
chart_pie = workbook.add_chart(:type => 'pie', :embedded => 1)
|
589
|
+
|
590
|
+
# Add some data for the Doughnut and Pie charts. This is set up so the
|
591
|
+
# gauge goes from 0-100. It is initially set at 75%.
|
592
|
+
worksheet.write_col('H2', ['Donut', 25, 50, 25, 100])
|
593
|
+
worksheet.write_col('I2', ['Pie', 75, 1, '=200-I4-I3'])
|
594
|
+
|
595
|
+
# Configure the doughnut chart as the background for the gauge.
|
596
|
+
chart_doughnut.add_series(
|
597
|
+
:name => '=Sheet1!$H$2',
|
598
|
+
:values => '=Sheet1!$H$3:$H$6',
|
599
|
+
:points => [
|
600
|
+
{ :fill => { :color => 'green' } },
|
601
|
+
{ :fill => { :color => 'yellow' } },
|
602
|
+
{ :fill => { :color => 'red' } },
|
603
|
+
{ :fill => { :none => 1 } }
|
604
|
+
]
|
605
|
+
)
|
606
|
+
|
607
|
+
# Rotate chart so the gauge parts are above the horizontal.
|
608
|
+
chart_doughnut.set_rotation(270)
|
609
|
+
|
610
|
+
# Turn off the chart legend.
|
611
|
+
chart_doughnut.set_legend(:none => 1)
|
612
|
+
|
613
|
+
# Turn off the chart fill and border.
|
614
|
+
chart_doughnut.set_chartarea(
|
615
|
+
:border => { :none => 1 },
|
616
|
+
:fill => { :none => 1 }
|
617
|
+
)
|
618
|
+
|
619
|
+
# Configure the pie chart as the needle for the gauge.
|
620
|
+
chart_pie.add_series(
|
621
|
+
:name => '=Sheet1!$I$2',
|
622
|
+
:values => '=Sheet1!$I$3:$I$6',
|
623
|
+
:points => [
|
624
|
+
{ :fill => { :none => 1 } },
|
625
|
+
{ :fill => { :color => 'black' } },
|
626
|
+
{ :fill => { :none => 1 } }
|
627
|
+
]
|
628
|
+
)
|
629
|
+
|
630
|
+
# Rotate the pie chart/needle to align with the doughnut/gauge.
|
631
|
+
chart_pie.set_rotation(270)
|
632
|
+
|
633
|
+
# Combine the pie and doughnut charts.
|
634
|
+
chart_doughnut.combine(chart_pie)
|
635
|
+
|
636
|
+
# Insert the chart into the worksheet.
|
637
|
+
worksheet.insert_chart('A1', chart_doughnut)
|
638
|
+
|
639
|
+
workbook.close
|
640
|
+
store_to_tempfile
|
641
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
642
|
+
end
|
643
|
+
|
245
644
|
def test_chart_scatter06
|
246
645
|
@xlsx = 'chart_scatter06.xlsx'
|
247
646
|
workbook = WriteXLSX.new(@io)
|
@@ -252,23 +651,23 @@ class TestExampleMatch < Test::Unit::TestCase
|
|
252
651
|
chart.instance_variable_set(:@axis_ids, [57708544, 44297600])
|
253
652
|
|
254
653
|
data = [
|
255
|
-
|
256
|
-
|
257
|
-
|
654
|
+
[ 1, 2, 3, 4, 5 ],
|
655
|
+
[ 2, 4, 6, 8, 10 ],
|
656
|
+
[ 3, 6, 9, 12, 15 ]
|
258
657
|
|
259
|
-
|
658
|
+
]
|
260
659
|
|
261
660
|
worksheet.write('A1', data)
|
262
661
|
|
263
662
|
chart.add_series(
|
264
|
-
|
265
|
-
|
266
|
-
|
663
|
+
:categories => '=Sheet1!$A$1:$A$5',
|
664
|
+
:values => '=Sheet1!$B$1:$B$5'
|
665
|
+
)
|
267
666
|
|
268
667
|
chart.add_series(
|
269
|
-
|
270
|
-
|
271
|
-
|
668
|
+
:categories => '=Sheet1!$A$1:$A$5',
|
669
|
+
:values => '=Sheet1!$C$1:$C$5'
|
670
|
+
)
|
272
671
|
|
273
672
|
chart.set_x_axis(:minor_unit => 1, :major_unit => 3)
|
274
673
|
chart.set_y_axis(:minor_unit => 2, :major_unit => 4)
|
@@ -281,7 +680,7 @@ class TestExampleMatch < Test::Unit::TestCase
|
|
281
680
|
end
|
282
681
|
|
283
682
|
def autofilter_data
|
284
|
-
<<EOS
|
683
|
+
<<EOS
|
285
684
|
Region Item Volume Month
|
286
685
|
East Apple 9000 July
|
287
686
|
East Apple 5000 July
|
@@ -345,10 +744,10 @@ EOS
|
|
345
744
|
# Add the worksheet data that the charts will refer to.
|
346
745
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
347
746
|
data = [
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
747
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
748
|
+
[ 40, 40, 50, 30, 25, 50 ],
|
749
|
+
[ 30, 25, 30, 10, 5, 10 ]
|
750
|
+
]
|
352
751
|
|
353
752
|
worksheet.write('A1', headings, bold)
|
354
753
|
worksheet.write('A2', data)
|
@@ -358,18 +757,18 @@ EOS
|
|
358
757
|
|
359
758
|
# Configure the first series.
|
360
759
|
chart.add_series(
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
760
|
+
:name => '=Sheet1!$B$1',
|
761
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
762
|
+
:values => '=Sheet1!$B$2:$B$7'
|
763
|
+
)
|
365
764
|
|
366
765
|
# Configure second series. Note alternative use of array ref to define
|
367
766
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
368
767
|
chart.add_series(
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
768
|
+
:name => '=Sheet1!$C$1',
|
769
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
770
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
771
|
+
)
|
373
772
|
|
374
773
|
# Add a chart title and some axis labels.
|
375
774
|
chart.set_title(:name => 'Results of sample analysis')
|
@@ -396,9 +795,9 @@ EOS
|
|
396
795
|
# Add the worksheet data that the charts will refer to.
|
397
796
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
398
797
|
data = [
|
399
|
-
|
400
|
-
|
401
|
-
|
798
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
799
|
+
[ 10, 40, 50, 20, 10, 50 ],
|
800
|
+
[ 30, 60, 70, 50, 40, 30 ]
|
402
801
|
]
|
403
802
|
|
404
803
|
worksheet.write('A1', headings, bold)
|
@@ -409,17 +808,17 @@ EOS
|
|
409
808
|
|
410
809
|
# Configure the first series.
|
411
810
|
chart.add_series(
|
412
|
-
|
413
|
-
|
414
|
-
|
811
|
+
:name => '=Sheet1!$B$1',
|
812
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
813
|
+
:values => '=Sheet1!$B$2:$B$7'
|
415
814
|
)
|
416
815
|
|
417
816
|
# Configure second series. Note alternative use of array ref to define
|
418
817
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
419
818
|
chart.add_series(
|
420
|
-
|
421
|
-
|
422
|
-
|
819
|
+
:name => '=Sheet1!$C$1',
|
820
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
821
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
423
822
|
)
|
424
823
|
|
425
824
|
# Add a chart title and some axis labels.
|
@@ -447,9 +846,9 @@ EOS
|
|
447
846
|
# Add the worksheet data that the charts will refer to.
|
448
847
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
449
848
|
data = [
|
450
|
-
|
451
|
-
|
452
|
-
|
849
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
850
|
+
[ 10, 40, 50, 20, 10, 50 ],
|
851
|
+
[ 30, 60, 70, 50, 40, 30 ]
|
453
852
|
]
|
454
853
|
|
455
854
|
worksheet.write('A1', headings, bold)
|
@@ -460,17 +859,17 @@ EOS
|
|
460
859
|
|
461
860
|
# Configure the first series.
|
462
861
|
chart.add_series(
|
463
|
-
|
464
|
-
|
465
|
-
|
862
|
+
:name => '=Sheet1!$B$1',
|
863
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
864
|
+
:values => '=Sheet1!$B$2:$B$7'
|
466
865
|
)
|
467
866
|
|
468
867
|
# Configure second series. Note alternative use of array ref to define
|
469
868
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
470
869
|
chart.add_series(
|
471
|
-
|
472
|
-
|
473
|
-
|
870
|
+
:name => '=Sheet1!$C$1',
|
871
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
872
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
474
873
|
)
|
475
874
|
|
476
875
|
# Add a chart title and some axis labels.
|
@@ -498,9 +897,9 @@ EOS
|
|
498
897
|
# Add the worksheet data that the charts will refer to.
|
499
898
|
headings = [ 'Category', 'Values' ]
|
500
899
|
data = [
|
501
|
-
|
502
|
-
|
503
|
-
|
900
|
+
[ 'Glazed', 'Chocolate', 'Cream' ],
|
901
|
+
[ 50, 35, 15 ]
|
902
|
+
]
|
504
903
|
|
505
904
|
worksheet.write('A1', headings, bold)
|
506
905
|
worksheet.write('A2', data)
|
@@ -512,10 +911,10 @@ EOS
|
|
512
911
|
# [ $sheetname, $row_start, $row_end, $col_start, $col_end ].
|
513
912
|
# See below for an alternative syntax.
|
514
913
|
chart1.add_series(
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
914
|
+
:name => 'Doughnut sales data',
|
915
|
+
:categories => [ 'Sheet1', 1, 3, 0, 0 ],
|
916
|
+
:values => [ 'Sheet1', 1, 3, 1, 1 ]
|
917
|
+
)
|
519
918
|
|
520
919
|
# Add a title.
|
521
920
|
chart1.set_title(:name => 'Popular Doughnut Types')
|
@@ -536,15 +935,15 @@ EOS
|
|
536
935
|
|
537
936
|
# Configure the series and add user defined segment colours.
|
538
937
|
chart2.add_series(
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
938
|
+
:name => 'Doughnut sales data',
|
939
|
+
:categories => '=Sheet1!$A$2:$A$4',
|
940
|
+
:values => '=Sheet1!$B$2:$B$4',
|
941
|
+
:points => [
|
942
|
+
{ :fill => { :color => '#FA58D0' } },
|
943
|
+
{ :fill => { :color => '#61210B' } },
|
944
|
+
{ :fill => { :color => '#F5F6CE' } }
|
945
|
+
]
|
946
|
+
)
|
548
947
|
|
549
948
|
# Add a title.
|
550
949
|
chart2.set_title(:name => 'Doughnut Chart with user defined colors')
|
@@ -563,10 +962,10 @@ EOS
|
|
563
962
|
|
564
963
|
# Configure the series.
|
565
964
|
chart3.add_series(
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
965
|
+
:name => 'Doughnut sales data',
|
966
|
+
:categories => '=Sheet1!$A$2:$A$4',
|
967
|
+
:values => '=Sheet1!$B$2:$B$4'
|
968
|
+
)
|
570
969
|
|
571
970
|
# Add a title.
|
572
971
|
chart3.set_title(:name => 'Doughnut Chart with segment rotation')
|
@@ -587,10 +986,10 @@ EOS
|
|
587
986
|
|
588
987
|
# Configure the series.
|
589
988
|
chart4.add_series(
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
989
|
+
:name => 'Doughnut sales data',
|
990
|
+
:categories => '=Sheet1!$A$2:$A$4',
|
991
|
+
:values => '=Sheet1!$B$2:$B$4'
|
992
|
+
)
|
594
993
|
|
595
994
|
# Add a title.
|
596
995
|
chart4.set_title(:name => 'Doughnut Chart with user defined hole size')
|
@@ -615,9 +1014,9 @@ EOS
|
|
615
1014
|
# Add the worksheet data that the charts will refer to.
|
616
1015
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
617
1016
|
data = [
|
618
|
-
|
619
|
-
|
620
|
-
|
1017
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
1018
|
+
[ 10, 40, 50, 20, 10, 50 ],
|
1019
|
+
[ 30, 60, 70, 50, 40, 30 ]
|
621
1020
|
]
|
622
1021
|
|
623
1022
|
worksheet.write('A1', headings, bold)
|
@@ -628,17 +1027,17 @@ EOS
|
|
628
1027
|
|
629
1028
|
# Configure the first series.
|
630
1029
|
chart.add_series(
|
631
|
-
|
632
|
-
|
633
|
-
|
1030
|
+
:name => '=Sheet1!$B$1',
|
1031
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1032
|
+
:values => '=Sheet1!$B$2:$B$7'
|
634
1033
|
)
|
635
1034
|
|
636
1035
|
# Configure second series. Note alternative use of array ref to define
|
637
1036
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
638
1037
|
chart.add_series(
|
639
|
-
|
640
|
-
|
641
|
-
|
1038
|
+
:name => '=Sheet1!$C$1',
|
1039
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1040
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
642
1041
|
)
|
643
1042
|
|
644
1043
|
# Add a chart title and some axis labels.
|
@@ -652,6 +1051,81 @@ EOS
|
|
652
1051
|
# Insert the chart into the worksheet (with an offset).
|
653
1052
|
worksheet.insert_chart('D2', chart, 25, 10)
|
654
1053
|
|
1054
|
+
#
|
1055
|
+
# Create a stacked chart sub-type
|
1056
|
+
#
|
1057
|
+
chart2 = workbook.add_chart(
|
1058
|
+
:type => 'line',
|
1059
|
+
:embedded => 1,
|
1060
|
+
:subtype => 'stacked'
|
1061
|
+
)
|
1062
|
+
|
1063
|
+
# Configure the first series.
|
1064
|
+
chart2.add_series(
|
1065
|
+
:name => '=Sheet1!$B$1',
|
1066
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1067
|
+
:values => '=Sheet1!$B$2:$B$7'
|
1068
|
+
)
|
1069
|
+
|
1070
|
+
# Configure second series.
|
1071
|
+
chart2.add_series(
|
1072
|
+
:name => '=Sheet1!$C$1',
|
1073
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1074
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
1075
|
+
)
|
1076
|
+
|
1077
|
+
# Add a chart title and some axis labels.
|
1078
|
+
chart2.set_title( :name => 'Stacked Chart' )
|
1079
|
+
chart2.set_x_axis( :name => 'Test number' )
|
1080
|
+
chart2.set_y_axis( :name => 'Sample length (mm)' )
|
1081
|
+
|
1082
|
+
# Set an Excel chart style. Blue colors with white outline and shadow.
|
1083
|
+
chart2.set_style( 12 )
|
1084
|
+
|
1085
|
+
# Insert the chart into the worksheet (with an offset).
|
1086
|
+
worksheet.insert_chart(
|
1087
|
+
'D18', chart2,
|
1088
|
+
{ :x_offset => 25, :y_offset => 10 }
|
1089
|
+
)
|
1090
|
+
|
1091
|
+
|
1092
|
+
#
|
1093
|
+
# Create a percent stacked chart sub-type
|
1094
|
+
#
|
1095
|
+
chart3 = workbook.add_chart(
|
1096
|
+
:type => 'line',
|
1097
|
+
:embedded => 1,
|
1098
|
+
:subtype => 'percent_stacked'
|
1099
|
+
)
|
1100
|
+
|
1101
|
+
# Configure the first series.
|
1102
|
+
chart3.add_series(
|
1103
|
+
:name => '=Sheet1!$B$1',
|
1104
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1105
|
+
:values => '=Sheet1!$B$2:$B$7'
|
1106
|
+
)
|
1107
|
+
|
1108
|
+
# Configure second series.
|
1109
|
+
chart3.add_series(
|
1110
|
+
:name => '=Sheet1!$C$1',
|
1111
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1112
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
1113
|
+
)
|
1114
|
+
|
1115
|
+
# Add a chart title and some axis labels.
|
1116
|
+
chart3.set_title( :name => 'Percent Stacked Chart' )
|
1117
|
+
chart3.set_x_axis( :name => 'Test number' )
|
1118
|
+
chart3.set_y_axis( :name => 'Sample length (mm)' )
|
1119
|
+
|
1120
|
+
# Set an Excel chart style. Blue colors with white outline and shadow.
|
1121
|
+
chart3.set_style( 13 )
|
1122
|
+
|
1123
|
+
# Insert the chart into the worksheet (with an offset).
|
1124
|
+
worksheet.insert_chart(
|
1125
|
+
'D34', chart3,
|
1126
|
+
{ :x_offset => 25, :y_offset => 10 }
|
1127
|
+
)
|
1128
|
+
|
655
1129
|
workbook.close
|
656
1130
|
store_to_tempfile
|
657
1131
|
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
@@ -666,9 +1140,9 @@ EOS
|
|
666
1140
|
# Add the worksheet data that the charts will refer to.
|
667
1141
|
headings = [ 'Category', 'Values' ]
|
668
1142
|
data = [
|
669
|
-
|
670
|
-
|
671
|
-
|
1143
|
+
[ 'Apple', 'Cherry', 'Pecan' ],
|
1144
|
+
[ 60, 30, 10 ]
|
1145
|
+
]
|
672
1146
|
|
673
1147
|
worksheet.write('A1', headings, bold)
|
674
1148
|
worksheet.write('A2', data)
|
@@ -680,10 +1154,10 @@ EOS
|
|
680
1154
|
# [ $sheetname, $row_start, $row_end, $col_start, $col_end ].
|
681
1155
|
# See below for an alternative syntax.
|
682
1156
|
chart1.add_series(
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
1157
|
+
:name => 'Pie sales data',
|
1158
|
+
:categories => [ 'Sheet1', 1, 3, 0, 0 ],
|
1159
|
+
:values => [ 'Sheet1', 1, 3, 1, 1 ]
|
1160
|
+
)
|
687
1161
|
|
688
1162
|
# Add a title.
|
689
1163
|
chart1.set_title(:name => 'Popular Pie Types')
|
@@ -703,15 +1177,15 @@ EOS
|
|
703
1177
|
|
704
1178
|
# Configure the series and add user defined segment colours.
|
705
1179
|
chart2.add_series(
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
1180
|
+
:name => 'Pie sales data',
|
1181
|
+
:categories => '=Sheet1!$A$2:$A$4',
|
1182
|
+
:values => '=Sheet1!$B$2:$B$4',
|
1183
|
+
:points => [
|
1184
|
+
{ :fill => { :color => '#5ABA10' } },
|
1185
|
+
{ :fill => { :color => '#FE110E' } },
|
1186
|
+
{ :fill => { :color => '#CA5C05' } }
|
1187
|
+
]
|
1188
|
+
)
|
715
1189
|
|
716
1190
|
# Add a title.
|
717
1191
|
chart2.set_title(:name => 'Pie Chart with user defined colors')
|
@@ -733,10 +1207,10 @@ EOS
|
|
733
1207
|
# Add the worksheet data that the charts will refer to.
|
734
1208
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
735
1209
|
data = [
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
1210
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
1211
|
+
[ 30, 60, 70, 50, 40, 30 ],
|
1212
|
+
[ 25, 40, 50, 30, 50, 40 ]
|
1213
|
+
]
|
740
1214
|
|
741
1215
|
worksheet.write('A1', headings, bold)
|
742
1216
|
worksheet.write('A2', data)
|
@@ -746,18 +1220,18 @@ EOS
|
|
746
1220
|
|
747
1221
|
# Configure the first series.
|
748
1222
|
chart1.add_series(
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
1223
|
+
:name => '=Sheet1!$B$1',
|
1224
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1225
|
+
:values => '=Sheet1!$B$2:$B$7'
|
1226
|
+
)
|
753
1227
|
|
754
1228
|
# Configure second series. Note alternative use of array ref to define
|
755
1229
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
756
1230
|
chart1.add_series(
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
1231
|
+
:name => '=Sheet1!$C$1',
|
1232
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1233
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
1234
|
+
)
|
761
1235
|
|
762
1236
|
# Add a chart title and some axis labels.
|
763
1237
|
chart1.set_title(:name => 'Results of sample analysis')
|
@@ -774,24 +1248,24 @@ EOS
|
|
774
1248
|
# Create a with_markers chart sub-type
|
775
1249
|
#
|
776
1250
|
chart2 = workbook.add_chart(
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
1251
|
+
:type => 'radar',
|
1252
|
+
:embedded => 1,
|
1253
|
+
:subtype => 'with_markers'
|
1254
|
+
)
|
781
1255
|
|
782
1256
|
# Configure the first series.
|
783
1257
|
chart2.add_series(
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
1258
|
+
:name => '=Sheet1!$B$1',
|
1259
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1260
|
+
:values => '=Sheet1!$B$2:$B$7'
|
1261
|
+
)
|
788
1262
|
|
789
1263
|
# Configure second series.
|
790
1264
|
chart2.add_series(
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
1265
|
+
:name => '=Sheet1!$C$1',
|
1266
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1267
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
1268
|
+
)
|
795
1269
|
|
796
1270
|
# Add a chart title and some axis labels.
|
797
1271
|
chart2.set_title(:name => 'Stacked Chart')
|
@@ -808,24 +1282,24 @@ EOS
|
|
808
1282
|
# Create a filled chart sub-type
|
809
1283
|
#
|
810
1284
|
chart3 = workbook.add_chart(
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
1285
|
+
:type => 'radar',
|
1286
|
+
:embedded => 1,
|
1287
|
+
:subtype => 'filled'
|
1288
|
+
)
|
815
1289
|
|
816
1290
|
# Configure the first series.
|
817
1291
|
chart3.add_series(
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
1292
|
+
:name => '=Sheet1!$B$1',
|
1293
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1294
|
+
:values => '=Sheet1!$B$2:$B$7'
|
1295
|
+
)
|
822
1296
|
|
823
1297
|
# Configure second series.
|
824
1298
|
chart3.add_series(
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
1299
|
+
:name => '=Sheet1!$C$1',
|
1300
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1301
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
1302
|
+
)
|
829
1303
|
|
830
1304
|
# Add a chart title and some axis labels.
|
831
1305
|
chart3.set_title(:name => 'Percent Stacked Chart')
|
@@ -852,9 +1326,9 @@ EOS
|
|
852
1326
|
# Add the worksheet data that the charts will refer to.
|
853
1327
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
854
1328
|
data = [
|
855
|
-
|
856
|
-
|
857
|
-
|
1329
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
1330
|
+
[ 10, 40, 50, 20, 10, 50 ],
|
1331
|
+
[ 30, 60, 70, 50, 40, 30 ]
|
858
1332
|
]
|
859
1333
|
|
860
1334
|
worksheet.write('A1', headings, bold)
|
@@ -865,17 +1339,17 @@ EOS
|
|
865
1339
|
|
866
1340
|
# Configure the first series.
|
867
1341
|
chart.add_series(
|
868
|
-
|
869
|
-
|
870
|
-
|
1342
|
+
:name => '=Sheet1!$B$1',
|
1343
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
1344
|
+
:values => '=Sheet1!$B$2:$B$7'
|
871
1345
|
)
|
872
1346
|
|
873
1347
|
# Configure second series. Note alternative use of array ref to define
|
874
1348
|
# ranges: [ $sheetname, $row_start, $row_end, $col_start, $col_end ].$chart->add_series(
|
875
1349
|
chart.add_series(
|
876
|
-
|
877
|
-
|
878
|
-
|
1350
|
+
:name => '=Sheet1!$C$1',
|
1351
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
1352
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
879
1353
|
)
|
880
1354
|
|
881
1355
|
# Add a chart title and some axis labels.
|
@@ -906,19 +1380,19 @@ EOS
|
|
906
1380
|
# Add the worksheet data that the charts will refer to.
|
907
1381
|
headings = [ 'Date', 'High', 'Low', 'Close' ]
|
908
1382
|
data = [
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
1383
|
+
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
|
1384
|
+
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
|
1385
|
+
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
|
1386
|
+
[ 25.45, 23.05, 17.32, 20.45, 17.34 ]
|
913
1387
|
]
|
914
1388
|
|
915
1389
|
worksheet.write('A1', headings, bold)
|
916
1390
|
|
917
1391
|
(0 .. 4).each do |row|
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
1392
|
+
worksheet.write_date_time(row + 1, 0, data[0][row], date_format)
|
1393
|
+
worksheet.write(row + 1, 1, data[1][row])
|
1394
|
+
worksheet.write(row + 1, 2, data[2][row])
|
1395
|
+
worksheet.write(row + 1, 3, data[3][row])
|
922
1396
|
end
|
923
1397
|
|
924
1398
|
worksheet.set_column('A:D', 11)
|
@@ -960,9 +1434,9 @@ EOS
|
|
960
1434
|
# Add the worksheet data that the charts will refer to.
|
961
1435
|
headings = [ 'Aliens', 'Humans']
|
962
1436
|
data = [
|
963
|
-
|
964
|
-
|
965
|
-
|
1437
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
1438
|
+
[ 10, 40, 50, 20, 10, 50 ]
|
1439
|
+
]
|
966
1440
|
|
967
1441
|
worksheet.write('A1', headings, bold)
|
968
1442
|
worksheet.write('A2', data)
|
@@ -972,15 +1446,15 @@ EOS
|
|
972
1446
|
|
973
1447
|
# Configure the first series.
|
974
1448
|
chart.add_series(
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
1449
|
+
:name => '=Sheet1!$A$1',
|
1450
|
+
:values => '=Sheet1!$A$2:$A$7',
|
1451
|
+
:y2_axis => 1
|
1452
|
+
)
|
979
1453
|
|
980
1454
|
chart.add_series(
|
981
|
-
|
982
|
-
|
983
|
-
|
1455
|
+
:name => '=Sheet1!$B$1',
|
1456
|
+
:values => '=Sheet1!$B$2:$B$7'
|
1457
|
+
)
|
984
1458
|
|
985
1459
|
chart.set_legend(:position => 'right')
|
986
1460
|
|
@@ -1258,7 +1732,7 @@ EOS
|
|
1258
1732
|
comment = 'Hello.'
|
1259
1733
|
|
1260
1734
|
worksheet6.write( 'C9', cell_text, text_wrap )
|
1261
|
-
worksheet6.write_comment( 'C9', comment, :color =>
|
1735
|
+
worksheet6.write_comment( 'C9', comment, :color => '#FF6600' )
|
1262
1736
|
|
1263
1737
|
|
1264
1738
|
###############################################################################
|
@@ -1275,7 +1749,7 @@ EOS
|
|
1275
1749
|
cell = 'C3'
|
1276
1750
|
|
1277
1751
|
cell_text = "Move the mouse over this cell and you will see 'Cell commented " +
|
1278
|
-
|
1752
|
+
"by #{author}' (blank) in the status bar at the bottom"
|
1279
1753
|
|
1280
1754
|
comment = 'Hello.'
|
1281
1755
|
|
@@ -1286,7 +1760,7 @@ EOS
|
|
1286
1760
|
author = 'Ruby'
|
1287
1761
|
cell = 'C6'
|
1288
1762
|
cell_text = "Move the mouse over this cell and you will see 'Cell commented " +
|
1289
|
-
|
1763
|
+
"by #{author}' in the status bar at the bottom"
|
1290
1764
|
|
1291
1765
|
comment = 'Hello.'
|
1292
1766
|
|
@@ -1297,7 +1771,7 @@ EOS
|
|
1297
1771
|
author = '€'
|
1298
1772
|
cell = 'C9'
|
1299
1773
|
cell_text = "Move the mouse over this cell and you will see 'Cell commented " +
|
1300
|
-
|
1774
|
+
"by #{author}' in the status bar at the bottom"
|
1301
1775
|
comment = 'Hello.'
|
1302
1776
|
|
1303
1777
|
worksheet7.write( cell, cell_text, text_wrap )
|
@@ -1361,36 +1835,36 @@ EOS
|
|
1361
1835
|
|
1362
1836
|
# Light red fill with dark red text.
|
1363
1837
|
format1 = workbook.add_format(
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1838
|
+
:bg_color => '#FFC7CE',
|
1839
|
+
:color => '#9C0006'
|
1840
|
+
)
|
1367
1841
|
|
1368
1842
|
# Green fill with dark green text.
|
1369
1843
|
format2 = workbook.add_format(
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1844
|
+
:bg_color => '#C6EFCE',
|
1845
|
+
:color => '#006100'
|
1846
|
+
)
|
1373
1847
|
|
1374
1848
|
# Some sample data to run the conditional formatting against.
|
1375
1849
|
data = [
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1850
|
+
[ 34, 72, 38, 30, 75, 48, 75, 66, 84, 86 ],
|
1851
|
+
[ 6, 24, 1, 84, 54, 62, 60, 3, 26, 59 ],
|
1852
|
+
[ 28, 79, 97, 13, 85, 93, 93, 22, 5, 14 ],
|
1853
|
+
[ 27, 71, 40, 17, 18, 79, 90, 93, 29, 47 ],
|
1854
|
+
[ 88, 25, 33, 23, 67, 1, 59, 79, 47, 36 ],
|
1855
|
+
[ 24, 100, 20, 88, 29, 33, 38, 54, 54, 88 ],
|
1856
|
+
[ 6, 57, 88, 28, 10, 26, 37, 7, 41, 48 ],
|
1857
|
+
[ 52, 78, 1, 96, 26, 45, 47, 33, 96, 36 ],
|
1858
|
+
[ 60, 54, 81, 66, 81, 90, 80, 93, 12, 55 ],
|
1859
|
+
[ 70, 5, 46, 14, 71, 19, 66, 36, 41, 21 ]
|
1860
|
+
]
|
1387
1861
|
|
1388
1862
|
###############################################################################
|
1389
1863
|
#
|
1390
1864
|
# Example 1.
|
1391
1865
|
#
|
1392
1866
|
caption = 'Cells with values >= 50 are in light red. ' +
|
1393
|
-
|
1867
|
+
'Values < 50 are in light green.'
|
1394
1868
|
|
1395
1869
|
# Write the data.
|
1396
1870
|
worksheet1.write('A1', caption)
|
@@ -1404,7 +1878,7 @@ EOS
|
|
1404
1878
|
:value => 50,
|
1405
1879
|
:format => format1
|
1406
1880
|
}
|
1407
|
-
|
1881
|
+
)
|
1408
1882
|
|
1409
1883
|
# Write another conditional format over the same range.
|
1410
1884
|
worksheet1.conditional_formatting('B3:K12',
|
@@ -1414,7 +1888,7 @@ EOS
|
|
1414
1888
|
:value => 50,
|
1415
1889
|
:format => format2
|
1416
1890
|
}
|
1417
|
-
|
1891
|
+
)
|
1418
1892
|
|
1419
1893
|
|
1420
1894
|
###############################################################################
|
@@ -1422,7 +1896,7 @@ EOS
|
|
1422
1896
|
# Example 2.
|
1423
1897
|
#
|
1424
1898
|
caption = 'Values between 30 and 70 are in light red. ' +
|
1425
|
-
|
1899
|
+
'Values outside that range are in light green.'
|
1426
1900
|
|
1427
1901
|
worksheet2.write('A1', caption)
|
1428
1902
|
worksheet2.write_col('B3', data)
|
@@ -1435,7 +1909,7 @@ EOS
|
|
1435
1909
|
:maximum => 70,
|
1436
1910
|
:format => format1
|
1437
1911
|
}
|
1438
|
-
|
1912
|
+
)
|
1439
1913
|
|
1440
1914
|
worksheet2.conditional_formatting('B3:K12',
|
1441
1915
|
{
|
@@ -1445,7 +1919,7 @@ EOS
|
|
1445
1919
|
:maximum => 70,
|
1446
1920
|
:format => format2
|
1447
1921
|
}
|
1448
|
-
|
1922
|
+
)
|
1449
1923
|
|
1450
1924
|
|
1451
1925
|
###############################################################################
|
@@ -1453,7 +1927,7 @@ EOS
|
|
1453
1927
|
# Example 3.
|
1454
1928
|
#
|
1455
1929
|
caption = 'Duplicate values are in light red. ' +
|
1456
|
-
|
1930
|
+
'Unique values are in light green.'
|
1457
1931
|
|
1458
1932
|
worksheet3.write('A1', caption)
|
1459
1933
|
worksheet3.write_col('B3', data)
|
@@ -1463,14 +1937,14 @@ EOS
|
|
1463
1937
|
:type => 'duplicate',
|
1464
1938
|
:format => format1,
|
1465
1939
|
}
|
1466
|
-
|
1940
|
+
)
|
1467
1941
|
|
1468
1942
|
worksheet3.conditional_formatting('B3:K12',
|
1469
1943
|
{
|
1470
1944
|
:type => 'unique',
|
1471
1945
|
:format => format2,
|
1472
1946
|
}
|
1473
|
-
|
1947
|
+
)
|
1474
1948
|
|
1475
1949
|
|
1476
1950
|
###############################################################################
|
@@ -1478,7 +1952,7 @@ EOS
|
|
1478
1952
|
# Example 4.
|
1479
1953
|
#
|
1480
1954
|
caption = 'Above average values are in light red. ' +
|
1481
|
-
|
1955
|
+
'Below average values are in light green.'
|
1482
1956
|
|
1483
1957
|
worksheet4.write('A1', caption)
|
1484
1958
|
worksheet4.write_col('B3', data)
|
@@ -1489,7 +1963,7 @@ EOS
|
|
1489
1963
|
:criteria => 'above',
|
1490
1964
|
:format => format1
|
1491
1965
|
}
|
1492
|
-
|
1966
|
+
)
|
1493
1967
|
|
1494
1968
|
worksheet4.conditional_formatting('B3:K12',
|
1495
1969
|
{
|
@@ -1497,7 +1971,7 @@ EOS
|
|
1497
1971
|
:criteria => 'below',
|
1498
1972
|
:format => format2
|
1499
1973
|
}
|
1500
|
-
|
1974
|
+
)
|
1501
1975
|
|
1502
1976
|
|
1503
1977
|
###############################################################################
|
@@ -1505,7 +1979,7 @@ EOS
|
|
1505
1979
|
# Example 5.
|
1506
1980
|
#
|
1507
1981
|
caption = 'Top 10 values are in light red. ' +
|
1508
|
-
|
1982
|
+
'Bottom 10 values are in light green.'
|
1509
1983
|
|
1510
1984
|
worksheet5.write('A1', caption)
|
1511
1985
|
worksheet5.write_col('B3', data)
|
@@ -1516,7 +1990,7 @@ EOS
|
|
1516
1990
|
:value => '10',
|
1517
1991
|
:format => format1
|
1518
1992
|
}
|
1519
|
-
|
1993
|
+
)
|
1520
1994
|
|
1521
1995
|
worksheet5.conditional_formatting('B3:K12',
|
1522
1996
|
{
|
@@ -1524,7 +1998,7 @@ EOS
|
|
1524
1998
|
:value => '10',
|
1525
1999
|
:format => format2
|
1526
2000
|
}
|
1527
|
-
|
2001
|
+
)
|
1528
2002
|
|
1529
2003
|
|
1530
2004
|
###############################################################################
|
@@ -1532,7 +2006,7 @@ EOS
|
|
1532
2006
|
# Example 6.
|
1533
2007
|
#
|
1534
2008
|
caption = 'Cells with values >= 50 are in light red. ' +
|
1535
|
-
|
2009
|
+
'Values < 50 are in light green. Non-contiguous ranges.'
|
1536
2010
|
|
1537
2011
|
# Write the data.
|
1538
2012
|
worksheet6.write('A1', caption)
|
@@ -1546,7 +2020,7 @@ EOS
|
|
1546
2020
|
:value => 50,
|
1547
2021
|
:format => format1
|
1548
2022
|
}
|
1549
|
-
|
2023
|
+
)
|
1550
2024
|
|
1551
2025
|
# Write another conditional format over the same range.
|
1552
2026
|
worksheet6.conditional_formatting('B3:K6,B9:K12',
|
@@ -1556,7 +2030,7 @@ EOS
|
|
1556
2030
|
:value => 50,
|
1557
2031
|
:format => format2
|
1558
2032
|
}
|
1559
|
-
|
2033
|
+
)
|
1560
2034
|
|
1561
2035
|
|
1562
2036
|
###############################################################################
|
@@ -1583,19 +2057,19 @@ EOS
|
|
1583
2057
|
{
|
1584
2058
|
:type => '2_color_scale'
|
1585
2059
|
}
|
1586
|
-
|
2060
|
+
)
|
1587
2061
|
|
1588
2062
|
worksheet7.conditional_formatting('D3:D14',
|
1589
2063
|
{
|
1590
2064
|
:type => '3_color_scale'
|
1591
2065
|
}
|
1592
|
-
|
2066
|
+
)
|
1593
2067
|
|
1594
2068
|
worksheet7.conditional_formatting('F3:F14',
|
1595
2069
|
{
|
1596
2070
|
:type => 'data_bar'
|
1597
2071
|
}
|
1598
|
-
|
2072
|
+
)
|
1599
2073
|
|
1600
2074
|
|
1601
2075
|
###############################################################################
|
@@ -1624,7 +2098,7 @@ EOS
|
|
1624
2098
|
:min_color => "#FF0000",
|
1625
2099
|
:max_color => "#00FF00"
|
1626
2100
|
}
|
1627
|
-
|
2101
|
+
)
|
1628
2102
|
|
1629
2103
|
worksheet8.conditional_formatting('D3:D14',
|
1630
2104
|
{
|
@@ -1633,14 +2107,14 @@ EOS
|
|
1633
2107
|
:mid_color => "#8DB4E3",
|
1634
2108
|
:max_color => "#538ED5"
|
1635
2109
|
}
|
1636
|
-
|
2110
|
+
)
|
1637
2111
|
|
1638
2112
|
worksheet8.conditional_formatting('F3:F14',
|
1639
2113
|
{
|
1640
2114
|
:type => 'data_bar',
|
1641
2115
|
:bar_color => '#63C384'
|
1642
2116
|
}
|
1643
|
-
|
2117
|
+
)
|
1644
2118
|
|
1645
2119
|
workbook.close
|
1646
2120
|
store_to_tempfile
|
@@ -1654,13 +2128,13 @@ EOS
|
|
1654
2128
|
|
1655
2129
|
# Add a format for the header cells.
|
1656
2130
|
header_format = workbook.add_format(
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
2131
|
+
:border => 1,
|
2132
|
+
:bg_color => 43,
|
2133
|
+
:bold => 1,
|
2134
|
+
:text_wrap => 1,
|
2135
|
+
:valign => 'vcenter',
|
2136
|
+
:indent => 1
|
2137
|
+
)
|
1664
2138
|
|
1665
2139
|
# Set up layout of the worksheet.
|
1666
2140
|
worksheet.set_column('A:A', 68)
|
@@ -1932,32 +2406,32 @@ EOS
|
|
1932
2406
|
# the format codes change the appearance of the date.
|
1933
2407
|
#
|
1934
2408
|
date_formats = [
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
2409
|
+
'dd/mm/yy',
|
2410
|
+
'mm/dd/yy',
|
2411
|
+
'',
|
2412
|
+
'd mm yy',
|
2413
|
+
'dd mm yy',
|
2414
|
+
'',
|
2415
|
+
'dd m yy',
|
2416
|
+
'dd mm yy',
|
2417
|
+
'dd mmm yy',
|
2418
|
+
'dd mmmm yy',
|
2419
|
+
'',
|
2420
|
+
'dd mm y',
|
2421
|
+
'dd mm yyy',
|
2422
|
+
'dd mm yyyy',
|
2423
|
+
'',
|
2424
|
+
'd mmmm yyyy',
|
2425
|
+
'',
|
2426
|
+
'dd/mm/yy',
|
2427
|
+
'dd/mm/yy hh:mm',
|
2428
|
+
'dd/mm/yy hh:mm:ss',
|
2429
|
+
'dd/mm/yy hh:mm:ss.000',
|
2430
|
+
'',
|
2431
|
+
'hh:mm',
|
2432
|
+
'hh:mm:ss',
|
2433
|
+
'hh:mm:ss.000'
|
2434
|
+
]
|
1961
2435
|
|
1962
2436
|
# Write the same date and time using each of the above formats. The empty
|
1963
2437
|
# string formats create a blank line to make the example clearer.
|
@@ -1969,9 +2443,9 @@ EOS
|
|
1969
2443
|
|
1970
2444
|
# Create a format for the date or time.
|
1971
2445
|
format = workbook.add_format(
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
2446
|
+
:num_format => date_format,
|
2447
|
+
:align => 'left'
|
2448
|
+
)
|
1975
2449
|
|
1976
2450
|
# Write the same date using different formats.
|
1977
2451
|
worksheet.write_date_time(row, 0, '2004-08-01T12:30:45.123', format)
|
@@ -2036,17 +2510,17 @@ EOS
|
|
2036
2510
|
worksheet.set_row(0, 40)
|
2037
2511
|
|
2038
2512
|
heading = workbook.add_format(
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2513
|
+
:bold => 1,
|
2514
|
+
:color => 'blue',
|
2515
|
+
:size => 16,
|
2516
|
+
:merge => 1,
|
2517
|
+
:align => 'vcenter'
|
2518
|
+
)
|
2045
2519
|
|
2046
2520
|
hyperlink_format = workbook.add_format(
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2521
|
+
:color => 'blue',
|
2522
|
+
:underline => 1
|
2523
|
+
)
|
2050
2524
|
|
2051
2525
|
headings = ['Features of WriteXLSX', '']
|
2052
2526
|
worksheet.write_row('A1', headings, heading)
|
@@ -2056,12 +2530,12 @@ EOS
|
|
2056
2530
|
# Some text examples
|
2057
2531
|
#
|
2058
2532
|
text_format = workbook.add_format(
|
2059
|
-
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2533
|
+
:bold => 1,
|
2534
|
+
:italic => 1,
|
2535
|
+
:color => 'red',
|
2536
|
+
:size => 18,
|
2537
|
+
:font => 'Lucida Calligraphy'
|
2538
|
+
)
|
2065
2539
|
|
2066
2540
|
worksheet.write('A2', "Text")
|
2067
2541
|
worksheet.write('B2', "Hello Excel")
|
@@ -2104,7 +2578,10 @@ EOS
|
|
2104
2578
|
# Images
|
2105
2579
|
#
|
2106
2580
|
worksheet.write('A10', "Images")
|
2107
|
-
worksheet.insert_image(
|
2581
|
+
worksheet.insert_image(
|
2582
|
+
'B10', File.join(@test_dir, 'republic.png'),
|
2583
|
+
:x_offset => 16, :y_offset => 8
|
2584
|
+
)
|
2108
2585
|
|
2109
2586
|
#######################################################################
|
2110
2587
|
#
|
@@ -2129,10 +2606,10 @@ EOS
|
|
2129
2606
|
format3 = workbook.add_format(:diag_type => 3)
|
2130
2607
|
|
2131
2608
|
format4 = workbook.add_format(
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2609
|
+
:diag_type => 3,
|
2610
|
+
:diag_border => 7,
|
2611
|
+
:diag_color => 'red'
|
2612
|
+
)
|
2136
2613
|
|
2137
2614
|
worksheet.write('B3', 'Text', format1)
|
2138
2615
|
worksheet.write('B6', 'Text', format2)
|
@@ -2218,9 +2695,9 @@ EOS
|
|
2218
2695
|
format2.set_color('blue')
|
2219
2696
|
|
2220
2697
|
format3 = workbook.add_format(
|
2221
|
-
|
2222
|
-
|
2223
|
-
|
2698
|
+
:color => 'blue',
|
2699
|
+
:underline => 1
|
2700
|
+
)
|
2224
2701
|
|
2225
2702
|
worksheet.write(2, 0, 'This workbook demonstrates some of', format)
|
2226
2703
|
worksheet.write(3, 0, 'the formatting options provided by', format)
|
@@ -2233,16 +2710,16 @@ EOS
|
|
2233
2710
|
'Named colors', format3)
|
2234
2711
|
|
2235
2712
|
worksheet.write(
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2239
|
-
|
2713
|
+
'A10',
|
2714
|
+
"internal:'Standard colors'!A1",
|
2715
|
+
'Standard colors', format3
|
2716
|
+
)
|
2240
2717
|
|
2241
2718
|
worksheet.write(
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2719
|
+
'A11',
|
2720
|
+
"internal:'Numeric formats'!A1",
|
2721
|
+
'Numeric formats', format3
|
2722
|
+
)
|
2246
2723
|
|
2247
2724
|
worksheet.write('A12', "internal:Borders!A1", 'Borders', format3)
|
2248
2725
|
worksheet.write('A13', "internal:Patterns!A1", 'Patterns', format3)
|
@@ -2272,10 +2749,10 @@ EOS
|
|
2272
2749
|
[33, 11, 53, 17, 22, 18, 13, 16, 23, 9, 12, 15, 14, 20, 8, 10].each do |index|
|
2273
2750
|
color = colors[index]
|
2274
2751
|
format = workbook.add_format(
|
2275
|
-
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2752
|
+
:bg_color => color,
|
2753
|
+
:pattern => 1,
|
2754
|
+
:border => 1
|
2755
|
+
)
|
2279
2756
|
|
2280
2757
|
worksheet.write(i + 1, 0, index, center)
|
2281
2758
|
worksheet.write(i + 1, 1, sprintf("0x%02X", index), center)
|
@@ -2302,10 +2779,10 @@ EOS
|
|
2302
2779
|
|
2303
2780
|
(8 .. 63).each do |i|
|
2304
2781
|
format = workbook.add_format(
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2782
|
+
:bg_color => i,
|
2783
|
+
:pattern => 1,
|
2784
|
+
:border => 1
|
2785
|
+
)
|
2309
2786
|
|
2310
2787
|
worksheet.write((i - 7), 0, i, center)
|
2311
2788
|
worksheet.write((i - 7), 1, sprintf("0x%02X", i), center)
|
@@ -2787,17 +3264,17 @@ EOS
|
|
2787
3264
|
|
2788
3265
|
# Add the standard url link format.
|
2789
3266
|
url_format = workbook.add_format(
|
2790
|
-
|
2791
|
-
|
2792
|
-
|
3267
|
+
:color => 'blue',
|
3268
|
+
:underline => 1
|
3269
|
+
)
|
2793
3270
|
|
2794
3271
|
# Add a sample format.
|
2795
3272
|
red_format = workbook.add_format(
|
2796
|
-
|
2797
|
-
|
2798
|
-
|
2799
|
-
|
2800
|
-
|
3273
|
+
:color => 'red',
|
3274
|
+
:bold => 1,
|
3275
|
+
:underline => 1,
|
3276
|
+
:size => 12
|
3277
|
+
)
|
2801
3278
|
|
2802
3279
|
# Add an alternate description string to the URL.
|
2803
3280
|
str = 'Perl home.'
|
@@ -2839,6 +3316,55 @@ EOS
|
|
2839
3316
|
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
2840
3317
|
end
|
2841
3318
|
|
3319
|
+
def test_ignore_errors
|
3320
|
+
@xlsx = 'ignore_errors.xlsx'
|
3321
|
+
workbook = WriteXLSX.new(@io)
|
3322
|
+
worksheet = workbook.add_worksheet
|
3323
|
+
|
3324
|
+
# Write strings that looks like numbers. This will cause an Excel warning.
|
3325
|
+
worksheet.write_string('C2', '123')
|
3326
|
+
worksheet.write_string('C3', '123')
|
3327
|
+
|
3328
|
+
# Write a divide by zero formula. This will also cause an Excel warning.
|
3329
|
+
worksheet.write_formula('C5', '=1/0')
|
3330
|
+
worksheet.write_formula('C6', '=1/0')
|
3331
|
+
|
3332
|
+
# Turn off some of the warnings:
|
3333
|
+
worksheet.ignore_errors(
|
3334
|
+
:number_stored_as_text => 'C3',
|
3335
|
+
:eval_error => 'C6'
|
3336
|
+
)
|
3337
|
+
|
3338
|
+
# Write some descriptions for the cells and make the column wider for clarity.
|
3339
|
+
worksheet.set_column('B:B', 16)
|
3340
|
+
worksheet.write('B2', 'Warning:')
|
3341
|
+
worksheet.write('B3', 'Warning turned off:')
|
3342
|
+
worksheet.write('B5', 'Warning:')
|
3343
|
+
worksheet.write('B6', 'Warning turned off:')
|
3344
|
+
|
3345
|
+
workbook.close
|
3346
|
+
store_to_tempfile
|
3347
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
3348
|
+
end
|
3349
|
+
|
3350
|
+
def test_keep_leading_zoros
|
3351
|
+
@xlsx = 'keep_leading_zeros.xlsx'
|
3352
|
+
workbook = WriteXLSX.new(@io)
|
3353
|
+
worksheet = workbook.add_worksheet
|
3354
|
+
|
3355
|
+
worksheet.keep_leading_zeros(true)
|
3356
|
+
worksheet.write('A1', '001')
|
3357
|
+
worksheet.write('B1', 'written as string.')
|
3358
|
+
worksheet.write('A2', '012')
|
3359
|
+
worksheet.write('B2', 'written as string.')
|
3360
|
+
worksheet.write('A3', '123')
|
3361
|
+
worksheet.write('B3', 'written as number.')
|
3362
|
+
|
3363
|
+
workbook.close
|
3364
|
+
store_to_tempfile
|
3365
|
+
compare_xlsx(File.join(@perl_output, @xlsx), @tempfile.path)
|
3366
|
+
end
|
3367
|
+
|
2842
3368
|
def test_merge1
|
2843
3369
|
@xlsx = 'merge1.xlsx'
|
2844
3370
|
# Create a new workbook and add a worksheet
|
@@ -2873,16 +3399,16 @@ EOS
|
|
2873
3399
|
|
2874
3400
|
# Create a merged format
|
2875
3401
|
format = workbook.add_format(
|
2876
|
-
|
2877
|
-
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
|
2884
|
-
|
2885
|
-
|
3402
|
+
:center_across => 1,
|
3403
|
+
:bold => 1,
|
3404
|
+
:size => 15,
|
3405
|
+
:pattern => 1,
|
3406
|
+
:border => 6,
|
3407
|
+
:color => 'white',
|
3408
|
+
:fg_color => 'green',
|
3409
|
+
:border_color => 'yellow',
|
3410
|
+
:align => 'vcenter'
|
3411
|
+
)
|
2886
3412
|
|
2887
3413
|
# Only one cell should contain text, the others should be blank.
|
2888
3414
|
worksheet.write(2, 1, "Center across selection", format)
|
@@ -2909,12 +3435,12 @@ EOS
|
|
2909
3435
|
# Example: Merge cells containing a hyperlink using merge_range().
|
2910
3436
|
#
|
2911
3437
|
format = workbook.add_format(
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
|
2916
|
-
|
2917
|
-
|
3438
|
+
:border => 1,
|
3439
|
+
:underline => 1,
|
3440
|
+
:color => 'blue',
|
3441
|
+
:align => 'center',
|
3442
|
+
:valign => 'vcenter'
|
3443
|
+
)
|
2918
3444
|
|
2919
3445
|
# Merge 3 cells
|
2920
3446
|
worksheet.merge_range('B4:D4', 'http://www.perl.com', format)
|
@@ -2942,12 +3468,12 @@ EOS
|
|
2942
3468
|
# Example 1: Text centered vertically and horizontally
|
2943
3469
|
#
|
2944
3470
|
format1 = workbook.add_format(
|
2945
|
-
|
2946
|
-
|
2947
|
-
|
2948
|
-
|
2949
|
-
|
2950
|
-
|
3471
|
+
:border => 6,
|
3472
|
+
:bold => 1,
|
3473
|
+
:color => 'red',
|
3474
|
+
:valign => 'vcenter',
|
3475
|
+
:align => 'center'
|
3476
|
+
)
|
2951
3477
|
|
2952
3478
|
worksheet.merge_range('B2:D3', 'Vertical and horizontal', format1)
|
2953
3479
|
|
@@ -2956,12 +3482,12 @@ EOS
|
|
2956
3482
|
# Example 2: Text aligned to the top and left
|
2957
3483
|
#
|
2958
3484
|
format2 = workbook.add_format(
|
2959
|
-
|
2960
|
-
|
2961
|
-
|
2962
|
-
|
2963
|
-
|
2964
|
-
|
3485
|
+
:border => 6,
|
3486
|
+
:bold => 1,
|
3487
|
+
:color => 'red',
|
3488
|
+
:valign => 'top',
|
3489
|
+
:align => 'left'
|
3490
|
+
)
|
2965
3491
|
|
2966
3492
|
worksheet.merge_range('B5:D6', 'Aligned to the top and left', format2)
|
2967
3493
|
|
@@ -2970,12 +3496,12 @@ EOS
|
|
2970
3496
|
# Example 3: Text aligned to the bottom and right
|
2971
3497
|
#
|
2972
3498
|
format3 = workbook.add_format(
|
2973
|
-
|
2974
|
-
|
2975
|
-
|
2976
|
-
|
2977
|
-
|
2978
|
-
|
3499
|
+
:border => 6,
|
3500
|
+
:bold => 1,
|
3501
|
+
:color => 'red',
|
3502
|
+
:valign => 'bottom',
|
3503
|
+
:align => 'right'
|
3504
|
+
)
|
2979
3505
|
|
2980
3506
|
worksheet.merge_range('B8:D9', 'Aligned to the bottom and right', format3)
|
2981
3507
|
|
@@ -2984,12 +3510,12 @@ EOS
|
|
2984
3510
|
# Example 4: Text justified (i.e. wrapped) in the cell
|
2985
3511
|
#
|
2986
3512
|
format4 = workbook.add_format(
|
2987
|
-
|
2988
|
-
|
2989
|
-
|
2990
|
-
|
2991
|
-
|
2992
|
-
|
3513
|
+
:border => 6,
|
3514
|
+
:bold => 1,
|
3515
|
+
:color => 'red',
|
3516
|
+
:valign => 'top',
|
3517
|
+
:align => 'justify'
|
3518
|
+
)
|
2993
3519
|
|
2994
3520
|
worksheet.merge_range('B11:D12', 'Justified: ' << 'so on and ' * 18, format4)
|
2995
3521
|
|
@@ -3013,13 +3539,13 @@ EOS
|
|
3013
3539
|
# Rotation 1, letters run from top to bottom
|
3014
3540
|
#
|
3015
3541
|
format1 = workbook.add_format(
|
3016
|
-
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3542
|
+
:border => 6,
|
3543
|
+
:bold => 1,
|
3544
|
+
:color => 'red',
|
3545
|
+
:valign => 'vcentre',
|
3546
|
+
:align => 'centre',
|
3547
|
+
:rotation => 270
|
3548
|
+
)
|
3023
3549
|
|
3024
3550
|
worksheet.merge_range( 'B4:B9', 'Rotation 270', format1 )
|
3025
3551
|
|
@@ -3028,13 +3554,13 @@ EOS
|
|
3028
3554
|
# Rotation 2, 90ー anticlockwise
|
3029
3555
|
#
|
3030
3556
|
format2 = workbook.add_format(
|
3031
|
-
|
3032
|
-
|
3033
|
-
|
3034
|
-
|
3035
|
-
|
3036
|
-
|
3037
|
-
|
3557
|
+
:border => 6,
|
3558
|
+
:bold => 1,
|
3559
|
+
:color => 'red',
|
3560
|
+
:valign => 'vcentre',
|
3561
|
+
:align => 'centre',
|
3562
|
+
:rotation => 90
|
3563
|
+
)
|
3038
3564
|
|
3039
3565
|
worksheet.merge_range( 'D4:D9', 'Rotation 90°', format2 )
|
3040
3566
|
|
@@ -3043,13 +3569,13 @@ EOS
|
|
3043
3569
|
# Rotation 3, 90ー clockwise
|
3044
3570
|
#
|
3045
3571
|
format3 = workbook.add_format(
|
3046
|
-
|
3047
|
-
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
3051
|
-
|
3052
|
-
|
3572
|
+
:border => 6,
|
3573
|
+
:bold => 1,
|
3574
|
+
:color => 'red',
|
3575
|
+
:valign => 'vcentre',
|
3576
|
+
:align => 'centre',
|
3577
|
+
:rotation => -90
|
3578
|
+
)
|
3053
3579
|
|
3054
3580
|
worksheet.merge_range( 'F4:F9', 'Rotation -90°', format3 )
|
3055
3581
|
|
@@ -3070,14 +3596,14 @@ EOS
|
|
3070
3596
|
|
3071
3597
|
# Format for the merged cells.
|
3072
3598
|
format = workbook.add_format(
|
3073
|
-
|
3074
|
-
|
3075
|
-
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3599
|
+
:border => 6,
|
3600
|
+
:bold => 1,
|
3601
|
+
:color => 'red',
|
3602
|
+
:size => 20,
|
3603
|
+
:valign => 'vcentre',
|
3604
|
+
:align => 'left',
|
3605
|
+
:indent => 1
|
3606
|
+
)
|
3081
3607
|
|
3082
3608
|
###############################################################################
|
3083
3609
|
#
|
@@ -3234,12 +3760,12 @@ EOS
|
|
3234
3760
|
# Example 3: Create a worksheet with outlined columns.
|
3235
3761
|
#
|
3236
3762
|
data = [
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3763
|
+
[ 'Month', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', ' Total' ],
|
3764
|
+
[ 'North', 50, 20, 15, 25, 65, 80, '=SUM(B2:G2)' ],
|
3765
|
+
[ 'South', 10, 20, 30, 50, 50, 50, '=SUM(B3:G3)' ],
|
3766
|
+
[ 'East', 45, 75, 50, 15, 75, 100, '=SUM(B4:G4)' ],
|
3767
|
+
[ 'West', 15, 15, 55, 35, 20, 50, '=SUM(B5:G5)' ],
|
3768
|
+
]
|
3243
3769
|
|
3244
3770
|
# Add bold format to the first row
|
3245
3771
|
worksheet3.set_row(0, nil, bold)
|
@@ -3259,10 +3785,10 @@ EOS
|
|
3259
3785
|
# Example 4: Show all possible outline levels.
|
3260
3786
|
#
|
3261
3787
|
levels = [
|
3262
|
-
|
3263
|
-
|
3264
|
-
|
3265
|
-
|
3788
|
+
"Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6",
|
3789
|
+
"Level 7", "Level 6", "Level 5", "Level 4", "Level 3", "Level 2",
|
3790
|
+
"Level 1"
|
3791
|
+
]
|
3266
3792
|
|
3267
3793
|
|
3268
3794
|
worksheet4.write_col('A1', levels)
|
@@ -3393,12 +3919,12 @@ EOS
|
|
3393
3919
|
# Example 5: Create a worksheet with outlined columns.
|
3394
3920
|
#
|
3395
3921
|
data = [
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
|
3401
|
-
|
3922
|
+
[ 'Month', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Total' ],
|
3923
|
+
[ 'North', 50, 20, 15, 25, 65, 80, '=SUM(B2:G2)' ],
|
3924
|
+
[ 'South', 10, 20, 30, 50, 50, 50, '=SUM(B3:G3)' ],
|
3925
|
+
[ 'East', 45, 75, 50, 15, 75, 100, '=SUM(B4:G4)' ],
|
3926
|
+
[ 'West', 15, 15, 55, 35, 20, 50, '=SUM(B5:G6)' ]
|
3927
|
+
]
|
3402
3928
|
|
3403
3929
|
# Add bold format to the first row
|
3404
3930
|
worksheet5.set_row(0, nil, bold)
|
@@ -3499,10 +4025,10 @@ EOS
|
|
3499
4025
|
#
|
3500
4026
|
|
3501
4027
|
header = workbook.add_format(
|
3502
|
-
|
3503
|
-
|
3504
|
-
|
3505
|
-
|
4028
|
+
:align => 'center',
|
4029
|
+
:valign => 'vcenter',
|
4030
|
+
:fg_color => 0x2A
|
4031
|
+
)
|
3506
4032
|
|
3507
4033
|
center = workbook.add_format(:align => 'center')
|
3508
4034
|
|
@@ -3598,16 +4124,16 @@ EOS
|
|
3598
4124
|
worksheet = workbook.add_worksheet
|
3599
4125
|
|
3600
4126
|
workbook.set_properties(
|
3601
|
-
|
3602
|
-
|
3603
|
-
|
3604
|
-
|
3605
|
-
|
3606
|
-
|
3607
|
-
|
3608
|
-
|
3609
|
-
|
3610
|
-
|
4127
|
+
:title => 'This is an example spreadsheet',
|
4128
|
+
:subject => 'With document properties',
|
4129
|
+
:author => 'John McNamara',
|
4130
|
+
:manager => 'Dr. Heinz Doofenshmirtz',
|
4131
|
+
:company => 'of Wolves',
|
4132
|
+
:category => 'Example spreadsheets',
|
4133
|
+
:keywords => 'Sample, Example, Properties',
|
4134
|
+
:comments => 'Created with Perl and Excel::Writer::XLSX',
|
4135
|
+
:status => 'Quo'
|
4136
|
+
)
|
3611
4137
|
|
3612
4138
|
worksheet.set_column('A:A', 70)
|
3613
4139
|
worksheet.write('A1', "Select 'Office Button -> Prepare -> Properties' to see the file properties.")
|
@@ -3708,16 +4234,16 @@ EOS
|
|
3708
4234
|
|
3709
4235
|
# Write some strings with multiple formats.
|
3710
4236
|
worksheet.write_rich_string('A1',
|
3711
|
-
|
4237
|
+
'This is ', bold, 'bold', ' and this is ', italic, 'italic')
|
3712
4238
|
|
3713
4239
|
worksheet.write_rich_string('A3',
|
3714
|
-
|
4240
|
+
'This is ', red, 'red', ' and this is ', blue, 'blue')
|
3715
4241
|
|
3716
4242
|
worksheet.write_rich_string('A5',
|
3717
|
-
|
4243
|
+
'Some ', bold, 'bold text', ' centered', center)
|
3718
4244
|
|
3719
4245
|
worksheet.write_rich_string('A7',
|
3720
|
-
|
4246
|
+
italic, 'j = k', superc, '(n-1)', center)
|
3721
4247
|
|
3722
4248
|
workbook.close
|
3723
4249
|
store_to_tempfile
|
@@ -3750,7 +4276,7 @@ EOS
|
|
3750
4276
|
:text => "Hello\nWorld",
|
3751
4277
|
:width => 60,
|
3752
4278
|
:height => 60
|
3753
|
-
|
4279
|
+
)
|
3754
4280
|
|
3755
4281
|
worksheet.insert_shape('A1', ellipse, 50, 50)
|
3756
4282
|
|
@@ -3775,12 +4301,12 @@ EOS
|
|
3775
4301
|
:text => "Plain",
|
3776
4302
|
:width => 100,
|
3777
4303
|
:height => 100
|
3778
|
-
|
4304
|
+
)
|
3779
4305
|
|
3780
4306
|
bbformat = workbook.add_format(
|
3781
4307
|
:color => 'red',
|
3782
4308
|
:font => 'Lucida Calligraphy'
|
3783
|
-
|
4309
|
+
)
|
3784
4310
|
|
3785
4311
|
bbformat.set_bold
|
3786
4312
|
bbformat.set_underline
|
@@ -3797,7 +4323,7 @@ EOS
|
|
3797
4323
|
:line_weight => 3,
|
3798
4324
|
:fill => 'FFFF00',
|
3799
4325
|
:line => '3366FF'
|
3800
|
-
|
4326
|
+
)
|
3801
4327
|
|
3802
4328
|
worksheet.insert_shape('A1', plain, 50, 50)
|
3803
4329
|
worksheet.insert_shape('A1', decor, 250, 50)
|
@@ -3818,7 +4344,7 @@ EOS
|
|
3818
4344
|
:text => 'Normal',
|
3819
4345
|
:width => 100,
|
3820
4346
|
:height => 100
|
3821
|
-
|
4347
|
+
)
|
3822
4348
|
|
3823
4349
|
worksheet.insert_shape('A1', normal, 50, 50)
|
3824
4350
|
normal.text = 'Scaled 3w x 2h'
|
@@ -3841,7 +4367,7 @@ EOS
|
|
3841
4367
|
:type => type,
|
3842
4368
|
:width => 90,
|
3843
4369
|
:height => 90
|
3844
|
-
|
4370
|
+
)
|
3845
4371
|
|
3846
4372
|
(1..10).each do |n|
|
3847
4373
|
# Change the last 5 rectangles to stars. Previously
|
@@ -3857,7 +4383,7 @@ EOS
|
|
3857
4383
|
:width => 90,
|
3858
4384
|
:height => 90,
|
3859
4385
|
:text => 'started as a box'
|
3860
|
-
|
4386
|
+
)
|
3861
4387
|
worksheet.insert_shape('A1', stencil, 100, 150)
|
3862
4388
|
|
3863
4389
|
stencil.stencil = 0
|
@@ -3884,14 +4410,14 @@ EOS
|
|
3884
4410
|
:type => 'ellipse',
|
3885
4411
|
:width => 60,
|
3886
4412
|
:height => 60
|
3887
|
-
|
4413
|
+
)
|
3888
4414
|
worksheet.insert_shape('A1', s1, 50, 50)
|
3889
4415
|
|
3890
4416
|
s2 = workbook.add_shape(
|
3891
4417
|
:type => 'plus',
|
3892
4418
|
:width => 20,
|
3893
4419
|
:height => 20
|
3894
|
-
|
4420
|
+
)
|
3895
4421
|
worksheet.insert_shape('A1', s2, 250, 200)
|
3896
4422
|
|
3897
4423
|
# Create a connector to link the two shapes.
|
@@ -3923,14 +4449,14 @@ EOS
|
|
3923
4449
|
:type => 'chevron',
|
3924
4450
|
:width => 60,
|
3925
4451
|
:height => 60
|
3926
|
-
|
4452
|
+
)
|
3927
4453
|
worksheet.insert_shape('A1', s1, 50, 50)
|
3928
4454
|
|
3929
4455
|
s2 = workbook.add_shape(
|
3930
4456
|
:type => 'pentagon',
|
3931
4457
|
:width => 20,
|
3932
4458
|
:height => 20
|
3933
|
-
|
4459
|
+
)
|
3934
4460
|
worksheet.insert_shape('A1', s2, 250, 200)
|
3935
4461
|
|
3936
4462
|
# Create a connector to link the two shapes.
|
@@ -3970,7 +4496,7 @@ EOS
|
|
3970
4496
|
:text => "Hello\nWorld",
|
3971
4497
|
:width => cw,
|
3972
4498
|
:height => ch
|
3973
|
-
|
4499
|
+
)
|
3974
4500
|
worksheet.insert_shape('A1', ellipse, cx, cy)
|
3975
4501
|
|
3976
4502
|
# Add a plus sign at 4 different positions around the circle.
|
@@ -3984,7 +4510,7 @@ EOS
|
|
3984
4510
|
:id => 3,
|
3985
4511
|
:width => pw,
|
3986
4512
|
:height => ph
|
3987
|
-
|
4513
|
+
)
|
3988
4514
|
|
3989
4515
|
p1 = worksheet.insert_shape('A1', plus, 350, 350)
|
3990
4516
|
p2 = worksheet.insert_shape('A1', plus, 150, 350)
|
@@ -4035,7 +4561,7 @@ EOS
|
|
4035
4561
|
:text => "Hello\nWorld",
|
4036
4562
|
:width => cw,
|
4037
4563
|
:height => ch
|
4038
|
-
|
4564
|
+
)
|
4039
4565
|
worksheet.insert_shape('A1', ellipse, cx, cy)
|
4040
4566
|
|
4041
4567
|
# Add a plus sign at 4 different positionos around the circle.
|
@@ -4049,7 +4575,7 @@ EOS
|
|
4049
4575
|
:id => 3,
|
4050
4576
|
:width => pw,
|
4051
4577
|
:height => ph
|
4052
|
-
|
4578
|
+
)
|
4053
4579
|
|
4054
4580
|
p1 = worksheet.insert_shape('A1', plus, 350, 150)
|
4055
4581
|
p2 = worksheet.insert_shape('A1', plus, 350, 350)
|
@@ -4100,11 +4626,11 @@ EOS
|
|
4100
4626
|
end
|
4101
4627
|
last_sheet = sheet
|
4102
4628
|
shape = workbook.add_shape(
|
4103
|
-
|
4104
|
-
|
4105
|
-
|
4106
|
-
|
4107
|
-
|
4629
|
+
:type => name,
|
4630
|
+
:text => name,
|
4631
|
+
:width => 90,
|
4632
|
+
:height => 90
|
4633
|
+
)
|
4108
4634
|
|
4109
4635
|
# Connectors can not have labels, so write the connector name in the cell
|
4110
4636
|
# to the left.
|
@@ -4530,17 +5056,18 @@ EOS
|
|
4530
5056
|
worksheet10 = workbook.add_worksheet
|
4531
5057
|
worksheet11 = workbook.add_worksheet
|
4532
5058
|
worksheet12 = workbook.add_worksheet
|
5059
|
+
worksheet13 = workbook.add_worksheet
|
4533
5060
|
|
4534
5061
|
currency_format = workbook.add_format(:num_format => '$#,##0')
|
4535
5062
|
|
4536
5063
|
|
4537
5064
|
# Some sample data for the table.
|
4538
5065
|
data = [
|
4539
|
-
|
4540
|
-
|
4541
|
-
|
4542
|
-
|
4543
|
-
|
5066
|
+
[ 'Apples', 10000, 5000, 8000, 6000 ],
|
5067
|
+
[ 'Pears', 2000, 3000, 4000, 5000 ],
|
5068
|
+
[ 'Bananas', 6000, 6000, 6500, 6000 ],
|
5069
|
+
[ 'Oranges', 500, 300, 200, 700 ]
|
5070
|
+
]
|
4544
5071
|
|
4545
5072
|
###############################################################################
|
4546
5073
|
#
|
@@ -4561,7 +5088,7 @@ EOS
|
|
4561
5088
|
#
|
4562
5089
|
# Example 2.
|
4563
5090
|
#
|
4564
|
-
caption = 'Default table with data.'
|
5091
|
+
caption = 'Default table with data.'
|
4565
5092
|
|
4566
5093
|
# Set the columns widths.
|
4567
5094
|
worksheet2.set_column('B:G', 12)
|
@@ -4630,7 +5157,7 @@ EOS
|
|
4630
5157
|
#
|
4631
5158
|
# Example 6.
|
4632
5159
|
#
|
4633
|
-
caption = 'Table with banded columns but without default banded rows.'
|
5160
|
+
caption = 'Table with banded columns but without default banded rows.'
|
4634
5161
|
|
4635
5162
|
# Set the columns widths.
|
4636
5163
|
worksheet6.set_column('B:G', 12)
|
@@ -4648,7 +5175,7 @@ EOS
|
|
4648
5175
|
#
|
4649
5176
|
# Example 7.
|
4650
5177
|
#
|
4651
|
-
caption = 'Table with user defined column headers'
|
5178
|
+
caption = 'Table with user defined column headers'
|
4652
5179
|
|
4653
5180
|
# Set the columns widths.
|
4654
5181
|
worksheet7.set_column('B:G', 12)
|
@@ -4658,24 +5185,24 @@ EOS
|
|
4658
5185
|
|
4659
5186
|
# Add a table to the worksheet.
|
4660
5187
|
worksheet7.add_table(
|
4661
|
-
|
4662
|
-
|
4663
|
-
|
4664
|
-
|
4665
|
-
|
4666
|
-
|
4667
|
-
|
4668
|
-
|
4669
|
-
|
4670
|
-
|
4671
|
-
|
4672
|
-
|
5188
|
+
'B3:F7',
|
5189
|
+
{
|
5190
|
+
:data => data,
|
5191
|
+
:columns => [
|
5192
|
+
{ :header => 'Product' },
|
5193
|
+
{ :header => 'Quarter 1' },
|
5194
|
+
{ :header => 'Quarter 2' },
|
5195
|
+
{ :header => 'Quarter 3' },
|
5196
|
+
{ :header => 'Quarter 4' }
|
5197
|
+
]
|
5198
|
+
}
|
5199
|
+
)
|
4673
5200
|
|
4674
5201
|
###############################################################################
|
4675
5202
|
#
|
4676
5203
|
# Example 8.
|
4677
5204
|
#
|
4678
|
-
caption = 'Table with user defined column headers'
|
5205
|
+
caption = 'Table with user defined column headers'
|
4679
5206
|
|
4680
5207
|
# Set the columns widths.
|
4681
5208
|
worksheet8.set_column('B:G', 12)
|
@@ -4685,29 +5212,29 @@ EOS
|
|
4685
5212
|
|
4686
5213
|
# Add a table to the worksheet.
|
4687
5214
|
worksheet8.add_table(
|
4688
|
-
|
4689
|
-
|
4690
|
-
|
4691
|
-
|
4692
|
-
|
4693
|
-
|
4694
|
-
|
4695
|
-
|
4696
|
-
|
4697
|
-
|
4698
|
-
|
4699
|
-
|
4700
|
-
|
4701
|
-
|
4702
|
-
|
4703
|
-
|
5215
|
+
'B3:G7',
|
5216
|
+
{
|
5217
|
+
:data => data,
|
5218
|
+
:columns => [
|
5219
|
+
{ :header => 'Product' },
|
5220
|
+
{ :header => 'Quarter 1' },
|
5221
|
+
{ :header => 'Quarter 2' },
|
5222
|
+
{ :header => 'Quarter 3' },
|
5223
|
+
{ :header => 'Quarter 4' },
|
5224
|
+
{
|
5225
|
+
:header => 'Year',
|
5226
|
+
:formula => '=SUM(Table8[@[Quarter 1]:[Quarter 4]])'
|
5227
|
+
}
|
5228
|
+
]
|
5229
|
+
}
|
5230
|
+
)
|
4704
5231
|
|
4705
5232
|
|
4706
5233
|
###############################################################################
|
4707
5234
|
#
|
4708
5235
|
# Example 9.
|
4709
5236
|
#
|
4710
|
-
caption = 'Table with totals row (but no caption or totals).'
|
5237
|
+
caption = 'Table with totals row (but no caption or totals).'
|
4711
5238
|
|
4712
5239
|
# Set the columns widths.
|
4713
5240
|
worksheet9.set_column('B:G', 12)
|
@@ -4717,29 +5244,29 @@ EOS
|
|
4717
5244
|
|
4718
5245
|
# Add a table to the worksheet.
|
4719
5246
|
worksheet9.add_table(
|
4720
|
-
|
4721
|
-
|
4722
|
-
|
4723
|
-
|
4724
|
-
|
4725
|
-
|
4726
|
-
|
4727
|
-
|
4728
|
-
|
4729
|
-
|
4730
|
-
|
4731
|
-
|
4732
|
-
|
4733
|
-
|
4734
|
-
|
4735
|
-
|
4736
|
-
|
5247
|
+
'B3:G8',
|
5248
|
+
{
|
5249
|
+
:data => data,
|
5250
|
+
:total_row => 1,
|
5251
|
+
:columns => [
|
5252
|
+
{ :header => 'Product' },
|
5253
|
+
{ :header => 'Quarter 1' },
|
5254
|
+
{ :header => 'Quarter 2' },
|
5255
|
+
{ :header => 'Quarter 3' },
|
5256
|
+
{ :header => 'Quarter 4' },
|
5257
|
+
{
|
5258
|
+
:header => 'Year',
|
5259
|
+
:formula => '=SUM(Table8[@[Quarter 1]:[Quarter 4]])'
|
5260
|
+
}
|
5261
|
+
]
|
5262
|
+
}
|
5263
|
+
)
|
4737
5264
|
|
4738
5265
|
###############################################################################
|
4739
5266
|
#
|
4740
5267
|
# Example 10.
|
4741
5268
|
#
|
4742
|
-
caption = 'Table with totals row with user captions and functions.'
|
5269
|
+
caption = 'Table with totals row with user captions and functions.'
|
4743
5270
|
|
4744
5271
|
# Set the columns widths.
|
4745
5272
|
worksheet10.set_column('B:G', 12)
|
@@ -4749,30 +5276,30 @@ EOS
|
|
4749
5276
|
|
4750
5277
|
# Add a table to the worksheet.
|
4751
5278
|
worksheet10.add_table(
|
4752
|
-
|
4753
|
-
|
4754
|
-
|
4755
|
-
|
4756
|
-
|
4757
|
-
|
4758
|
-
|
4759
|
-
|
4760
|
-
|
4761
|
-
|
4762
|
-
|
4763
|
-
|
4764
|
-
|
4765
|
-
|
4766
|
-
|
4767
|
-
|
4768
|
-
|
4769
|
-
|
5279
|
+
'B3:G8',
|
5280
|
+
{
|
5281
|
+
:data => data,
|
5282
|
+
:total_row => 1,
|
5283
|
+
:columns => [
|
5284
|
+
{ :header => 'Product', :total_string => 'Totals' },
|
5285
|
+
{ :header => 'Quarter 1', :total_function => 'sum' },
|
5286
|
+
{ :header => 'Quarter 2', :total_function => 'sum' },
|
5287
|
+
{ :header => 'Quarter 3', :total_function => 'sum' },
|
5288
|
+
{ :header => 'Quarter 4', :total_function => 'sum' },
|
5289
|
+
{
|
5290
|
+
:header => 'Year',
|
5291
|
+
:formula => '=SUM(Table8[@[Quarter 1]:[Quarter 4]])',
|
5292
|
+
:total_function => 'sum'
|
5293
|
+
}
|
5294
|
+
]
|
5295
|
+
}
|
5296
|
+
)
|
4770
5297
|
|
4771
5298
|
###############################################################################
|
4772
5299
|
#
|
4773
5300
|
# Example 11.
|
4774
5301
|
#
|
4775
|
-
caption = 'Table with alternative Excel style.'
|
5302
|
+
caption = 'Table with alternative Excel style.'
|
4776
5303
|
|
4777
5304
|
# Set the columns widths.
|
4778
5305
|
worksheet11.set_column('B:G', 12)
|
@@ -4782,31 +5309,31 @@ EOS
|
|
4782
5309
|
|
4783
5310
|
# Add a table to the worksheet.
|
4784
5311
|
worksheet11.add_table(
|
4785
|
-
|
4786
|
-
|
4787
|
-
|
4788
|
-
|
4789
|
-
|
4790
|
-
|
4791
|
-
|
4792
|
-
|
4793
|
-
|
4794
|
-
|
4795
|
-
|
4796
|
-
|
4797
|
-
|
4798
|
-
|
4799
|
-
|
4800
|
-
|
4801
|
-
|
4802
|
-
|
4803
|
-
|
5312
|
+
'B3:G8',
|
5313
|
+
{
|
5314
|
+
:data => data,
|
5315
|
+
:style => 'Table Style Light 11',
|
5316
|
+
:total_row => 1,
|
5317
|
+
:columns => [
|
5318
|
+
{ :header => 'Product', :total_string => 'Totals' },
|
5319
|
+
{ :header => 'Quarter 1', :total_function => 'sum' },
|
5320
|
+
{ :header => 'Quarter 2', :total_function => 'sum' },
|
5321
|
+
{ :header => 'Quarter 3', :total_function => 'sum' },
|
5322
|
+
{ :header => 'Quarter 4', :total_function => 'sum' },
|
5323
|
+
{
|
5324
|
+
:header => 'Year',
|
5325
|
+
:formula => '=SUM(Table8[@[Quarter 1]:[Quarter 4]])',
|
5326
|
+
:total_function => 'sum'
|
5327
|
+
}
|
5328
|
+
]
|
5329
|
+
}
|
5330
|
+
)
|
4804
5331
|
|
4805
5332
|
###############################################################################
|
4806
5333
|
#
|
4807
5334
|
# Example 12.
|
4808
5335
|
#
|
4809
|
-
caption = 'Table with
|
5336
|
+
caption = 'Table with no Excel style.'
|
4810
5337
|
|
4811
5338
|
# Set the columns widths.
|
4812
5339
|
worksheet12.set_column('B:G', 12)
|
@@ -4816,41 +5343,75 @@ EOS
|
|
4816
5343
|
|
4817
5344
|
# Add a table to the worksheet.
|
4818
5345
|
worksheet12.add_table(
|
4819
|
-
|
4820
|
-
|
4821
|
-
|
4822
|
-
|
4823
|
-
|
4824
|
-
|
4825
|
-
|
4826
|
-
|
4827
|
-
|
4828
|
-
|
4829
|
-
|
4830
|
-
|
4831
|
-
|
4832
|
-
|
4833
|
-
|
4834
|
-
|
4835
|
-
|
4836
|
-
|
4837
|
-
|
4838
|
-
|
4839
|
-
|
4840
|
-
|
4841
|
-
|
4842
|
-
|
4843
|
-
|
4844
|
-
|
4845
|
-
|
4846
|
-
|
4847
|
-
|
4848
|
-
|
4849
|
-
|
4850
|
-
|
4851
|
-
|
4852
|
-
|
4853
|
-
|
5346
|
+
'B3:G8',
|
5347
|
+
{
|
5348
|
+
:data => data,
|
5349
|
+
:style => 'None',
|
5350
|
+
:total_row => 1,
|
5351
|
+
:columns => [
|
5352
|
+
{ :header => 'Product', :total_string => 'Totals' },
|
5353
|
+
{ :header => 'Quarter 1', :total_function => 'sum' },
|
5354
|
+
{ :header => 'Quarter 2', :total_function => 'sum' },
|
5355
|
+
{ :header => 'Quarter 3', :total_function => 'sum' },
|
5356
|
+
{ :header => 'Quarter 4', :total_function => 'sum' },
|
5357
|
+
{
|
5358
|
+
:header => 'Year',
|
5359
|
+
:formula => '=SUM(Table12[@[Quarter 1]:[Quarter 4]])',
|
5360
|
+
:total_function => 'sum'
|
5361
|
+
}
|
5362
|
+
]
|
5363
|
+
}
|
5364
|
+
)
|
5365
|
+
|
5366
|
+
###############################################################################
|
5367
|
+
#
|
5368
|
+
# Example 13.
|
5369
|
+
#
|
5370
|
+
caption = 'Table with column formats.'
|
5371
|
+
|
5372
|
+
# Set the columns widths.
|
5373
|
+
worksheet13.set_column('B:G', 12)
|
5374
|
+
|
5375
|
+
# Write the caption.
|
5376
|
+
worksheet13.write('B1', caption)
|
5377
|
+
|
5378
|
+
# Add a table to the worksheet.
|
5379
|
+
worksheet13.add_table(
|
5380
|
+
'B3:G8',
|
5381
|
+
{
|
5382
|
+
:data => data,
|
5383
|
+
:total_row => 1,
|
5384
|
+
:columns => [
|
5385
|
+
{ :header => 'Product', :total_string => 'Totals' },
|
5386
|
+
{
|
5387
|
+
:header => 'Quarter 1',
|
5388
|
+
:total_function => 'sum',
|
5389
|
+
:format => currency_format,
|
5390
|
+
},
|
5391
|
+
{
|
5392
|
+
:header => 'Quarter 2',
|
5393
|
+
:total_function => 'sum',
|
5394
|
+
:format => currency_format,
|
5395
|
+
},
|
5396
|
+
{
|
5397
|
+
:header => 'Quarter 3',
|
5398
|
+
:total_function => 'sum',
|
5399
|
+
:format => currency_format,
|
5400
|
+
},
|
5401
|
+
{
|
5402
|
+
:header => 'Quarter 4',
|
5403
|
+
:total_function => 'sum',
|
5404
|
+
:format => currency_format,
|
5405
|
+
},
|
5406
|
+
{
|
5407
|
+
:header => 'Year',
|
5408
|
+
:formula => '=SUM(Table8[@[Quarter 1]:[Quarter 4]])',
|
5409
|
+
:total_function => 'sum',
|
5410
|
+
:format => currency_format,
|
5411
|
+
}
|
5412
|
+
]
|
5413
|
+
}
|
5414
|
+
)
|
4854
5415
|
|
4855
5416
|
workbook.close
|
4856
5417
|
store_to_tempfile
|
@@ -4864,42 +5425,42 @@ EOS
|
|
4864
5425
|
|
4865
5426
|
# Some sample data to plot.
|
4866
5427
|
data = [
|
4867
|
-
|
4868
|
-
|
4869
|
-
|
4870
|
-
|
5428
|
+
[ -2, 2, 3, -1, 0 ],
|
5429
|
+
[ 30, 20, 33, 20, 15 ],
|
5430
|
+
[ 1, -1, -1, 1, -1 ]
|
5431
|
+
]
|
4871
5432
|
|
4872
5433
|
# Write the sample data to the worksheet.
|
4873
5434
|
worksheet.write_col('A1', data)
|
4874
5435
|
|
4875
5436
|
# Add a line sparkline (the default) with markers.
|
4876
5437
|
worksheet.add_sparkline(
|
4877
|
-
|
4878
|
-
|
4879
|
-
|
4880
|
-
|
4881
|
-
|
4882
|
-
|
5438
|
+
{
|
5439
|
+
:location => 'F1',
|
5440
|
+
:range => 'Sheet1!A1:E1',
|
5441
|
+
:markers => 1
|
5442
|
+
}
|
5443
|
+
)
|
4883
5444
|
|
4884
5445
|
# Add a column sparkline with non-default style.
|
4885
5446
|
worksheet.add_sparkline(
|
4886
|
-
|
4887
|
-
|
4888
|
-
|
4889
|
-
|
4890
|
-
|
4891
|
-
|
4892
|
-
|
5447
|
+
{
|
5448
|
+
:location => 'F2',
|
5449
|
+
:range => 'Sheet1!A2:E2',
|
5450
|
+
:type => 'column',
|
5451
|
+
:style => 12
|
5452
|
+
}
|
5453
|
+
)
|
4893
5454
|
|
4894
5455
|
# Add a win/loss sparkline with negative values highlighted.
|
4895
5456
|
worksheet.add_sparkline(
|
4896
|
-
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
|
5457
|
+
{
|
5458
|
+
:location => 'F3',
|
5459
|
+
:range => 'Sheet1!A3:E3',
|
5460
|
+
:type => 'win_loss',
|
5461
|
+
:negative_points => 1
|
5462
|
+
}
|
5463
|
+
)
|
4903
5464
|
|
4904
5465
|
workbook.close
|
4905
5466
|
store_to_tempfile
|
@@ -4928,11 +5489,11 @@ EOS
|
|
4928
5489
|
str = 'A default "line" sparkline.'
|
4929
5490
|
|
4930
5491
|
worksheet1.add_sparkline(
|
4931
|
-
|
4932
|
-
|
4933
|
-
|
4934
|
-
|
4935
|
-
|
5492
|
+
{
|
5493
|
+
:location => 'A2',
|
5494
|
+
:range => 'Sheet2!A1:J1'
|
5495
|
+
}
|
5496
|
+
)
|
4936
5497
|
|
4937
5498
|
worksheet1.write(row, 1, str)
|
4938
5499
|
row += 1
|
@@ -4942,12 +5503,12 @@ EOS
|
|
4942
5503
|
str = 'A default "column" sparkline.'
|
4943
5504
|
|
4944
5505
|
worksheet1.add_sparkline(
|
4945
|
-
|
4946
|
-
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
4950
|
-
|
5506
|
+
{
|
5507
|
+
:location => 'A3',
|
5508
|
+
:range => 'Sheet2!A2:J2',
|
5509
|
+
:type => 'column'
|
5510
|
+
}
|
5511
|
+
)
|
4951
5512
|
|
4952
5513
|
worksheet1.write(row, 1, str)
|
4953
5514
|
row += 1
|
@@ -4957,12 +5518,12 @@ EOS
|
|
4957
5518
|
str = 'A default "win/loss" sparkline.'
|
4958
5519
|
|
4959
5520
|
worksheet1.add_sparkline(
|
4960
|
-
|
4961
|
-
|
4962
|
-
|
4963
|
-
|
4964
|
-
|
4965
|
-
|
5521
|
+
{
|
5522
|
+
:location => 'A4',
|
5523
|
+
:range => 'Sheet2!A3:J3',
|
5524
|
+
:type => 'win_loss'
|
5525
|
+
}
|
5526
|
+
)
|
4966
5527
|
|
4967
5528
|
worksheet1.write(row, 1, str)
|
4968
5529
|
row += 2
|
@@ -4972,12 +5533,12 @@ EOS
|
|
4972
5533
|
str = 'Line with markers.'
|
4973
5534
|
|
4974
5535
|
worksheet1.add_sparkline(
|
4975
|
-
|
4976
|
-
|
4977
|
-
|
4978
|
-
|
4979
|
-
|
4980
|
-
|
5536
|
+
{
|
5537
|
+
:location => 'A6',
|
5538
|
+
:range => 'Sheet2!A1:J1',
|
5539
|
+
:markers => 1
|
5540
|
+
}
|
5541
|
+
)
|
4981
5542
|
|
4982
5543
|
worksheet1.write(row, 1, str)
|
4983
5544
|
row += 1
|
@@ -4987,13 +5548,13 @@ EOS
|
|
4987
5548
|
str = 'Line with high and low points.'
|
4988
5549
|
|
4989
5550
|
worksheet1.add_sparkline(
|
4990
|
-
|
4991
|
-
|
4992
|
-
|
4993
|
-
|
4994
|
-
|
4995
|
-
|
4996
|
-
|
5551
|
+
{
|
5552
|
+
:location => 'A7',
|
5553
|
+
:range => 'Sheet2!A1:J1',
|
5554
|
+
:high_point => 1,
|
5555
|
+
:low_point => 1
|
5556
|
+
}
|
5557
|
+
)
|
4997
5558
|
|
4998
5559
|
worksheet1.write(row, 1, str)
|
4999
5560
|
row += 1
|
@@ -5003,13 +5564,13 @@ EOS
|
|
5003
5564
|
str = 'Line with first and last point markers.'
|
5004
5565
|
|
5005
5566
|
worksheet1.add_sparkline(
|
5006
|
-
|
5007
|
-
|
5008
|
-
|
5009
|
-
|
5010
|
-
|
5011
|
-
|
5012
|
-
|
5567
|
+
{
|
5568
|
+
:location => 'A8',
|
5569
|
+
:range => 'Sheet2!A1:J1',
|
5570
|
+
:first_point => 1,
|
5571
|
+
:last_point => 1
|
5572
|
+
}
|
5573
|
+
)
|
5013
5574
|
|
5014
5575
|
worksheet1.write(row, 1, str)
|
5015
5576
|
row += 1
|
@@ -5019,12 +5580,12 @@ EOS
|
|
5019
5580
|
str = 'Line with negative point markers.'
|
5020
5581
|
|
5021
5582
|
worksheet1.add_sparkline(
|
5022
|
-
|
5023
|
-
|
5024
|
-
|
5025
|
-
|
5026
|
-
|
5027
|
-
|
5583
|
+
{
|
5584
|
+
:location => 'A9',
|
5585
|
+
:range => 'Sheet2!A1:J1',
|
5586
|
+
:negative_points => 1
|
5587
|
+
}
|
5588
|
+
)
|
5028
5589
|
|
5029
5590
|
worksheet1.write(row, 1, str)
|
5030
5591
|
row += 1
|
@@ -5034,12 +5595,12 @@ EOS
|
|
5034
5595
|
str = 'Line with axis.'
|
5035
5596
|
|
5036
5597
|
worksheet1.add_sparkline(
|
5037
|
-
|
5038
|
-
|
5039
|
-
|
5040
|
-
|
5041
|
-
|
5042
|
-
|
5598
|
+
{
|
5599
|
+
:location => 'A10',
|
5600
|
+
:range => 'Sheet2!A1:J1',
|
5601
|
+
:axis => 1
|
5602
|
+
}
|
5603
|
+
)
|
5043
5604
|
|
5044
5605
|
worksheet1.write(row, 1, str)
|
5045
5606
|
row += 2
|
@@ -5049,12 +5610,12 @@ EOS
|
|
5049
5610
|
str = 'Column with default style (1).'
|
5050
5611
|
|
5051
5612
|
worksheet1.add_sparkline(
|
5052
|
-
|
5053
|
-
|
5054
|
-
|
5055
|
-
|
5056
|
-
|
5057
|
-
|
5613
|
+
{
|
5614
|
+
:location => 'A12',
|
5615
|
+
:range => 'Sheet2!A2:J2',
|
5616
|
+
:type => 'column'
|
5617
|
+
}
|
5618
|
+
)
|
5058
5619
|
|
5059
5620
|
worksheet1.write(row, 1, str)
|
5060
5621
|
row += 1
|
@@ -5064,13 +5625,13 @@ EOS
|
|
5064
5625
|
str = 'Column with style 2.'
|
5065
5626
|
|
5066
5627
|
worksheet1.add_sparkline(
|
5067
|
-
|
5068
|
-
|
5069
|
-
|
5070
|
-
|
5071
|
-
|
5072
|
-
|
5073
|
-
|
5628
|
+
{
|
5629
|
+
:location => 'A13',
|
5630
|
+
:range => 'Sheet2!A2:J2',
|
5631
|
+
:type => 'column',
|
5632
|
+
:style => 2
|
5633
|
+
}
|
5634
|
+
)
|
5074
5635
|
|
5075
5636
|
worksheet1.write(row, 1, str)
|
5076
5637
|
row += 1
|
@@ -5080,13 +5641,13 @@ EOS
|
|
5080
5641
|
str = 'Column with style 3.'
|
5081
5642
|
|
5082
5643
|
worksheet1.add_sparkline(
|
5083
|
-
|
5084
|
-
|
5085
|
-
|
5086
|
-
|
5087
|
-
|
5088
|
-
|
5089
|
-
|
5644
|
+
{
|
5645
|
+
:location => 'A14',
|
5646
|
+
:range => 'Sheet2!A2:J2',
|
5647
|
+
:type => 'column',
|
5648
|
+
:style => 3
|
5649
|
+
}
|
5650
|
+
)
|
5090
5651
|
|
5091
5652
|
worksheet1.write(row, 1, str)
|
5092
5653
|
row += 1
|
@@ -5096,13 +5657,13 @@ EOS
|
|
5096
5657
|
str = 'Column with style 4.'
|
5097
5658
|
|
5098
5659
|
worksheet1.add_sparkline(
|
5099
|
-
|
5100
|
-
|
5101
|
-
|
5102
|
-
|
5103
|
-
|
5104
|
-
|
5105
|
-
|
5660
|
+
{
|
5661
|
+
:location => 'A15',
|
5662
|
+
:range => 'Sheet2!A2:J2',
|
5663
|
+
:type => 'column',
|
5664
|
+
:style => 4
|
5665
|
+
}
|
5666
|
+
)
|
5106
5667
|
|
5107
5668
|
worksheet1.write(row, 1, str)
|
5108
5669
|
row += 1
|
@@ -5112,13 +5673,13 @@ EOS
|
|
5112
5673
|
str = 'Column with style 5.'
|
5113
5674
|
|
5114
5675
|
worksheet1.add_sparkline(
|
5115
|
-
|
5116
|
-
|
5117
|
-
|
5118
|
-
|
5119
|
-
|
5120
|
-
|
5121
|
-
|
5676
|
+
{
|
5677
|
+
:location => 'A16',
|
5678
|
+
:range => 'Sheet2!A2:J2',
|
5679
|
+
:type => 'column',
|
5680
|
+
:style => 5
|
5681
|
+
}
|
5682
|
+
)
|
5122
5683
|
|
5123
5684
|
worksheet1.write(row, 1, str)
|
5124
5685
|
row += 1
|
@@ -5128,13 +5689,13 @@ EOS
|
|
5128
5689
|
str = 'Column with style 6.'
|
5129
5690
|
|
5130
5691
|
worksheet1.add_sparkline(
|
5131
|
-
|
5132
|
-
|
5133
|
-
|
5134
|
-
|
5135
|
-
|
5136
|
-
|
5137
|
-
|
5692
|
+
{
|
5693
|
+
:location => 'A17',
|
5694
|
+
:range => 'Sheet2!A2:J2',
|
5695
|
+
:type => 'column',
|
5696
|
+
:style => 6
|
5697
|
+
}
|
5698
|
+
)
|
5138
5699
|
|
5139
5700
|
worksheet1.write(row, 1, str)
|
5140
5701
|
row += 1
|
@@ -5144,13 +5705,13 @@ EOS
|
|
5144
5705
|
str = 'Column with a user defined colour.'
|
5145
5706
|
|
5146
5707
|
worksheet1.add_sparkline(
|
5147
|
-
|
5148
|
-
|
5149
|
-
|
5150
|
-
|
5151
|
-
|
5152
|
-
|
5153
|
-
|
5708
|
+
{
|
5709
|
+
:location => 'A18',
|
5710
|
+
:range => 'Sheet2!A2:J2',
|
5711
|
+
:type => 'column',
|
5712
|
+
:series_color => '#E965E0'
|
5713
|
+
}
|
5714
|
+
)
|
5154
5715
|
|
5155
5716
|
worksheet1.write(row, 1, str)
|
5156
5717
|
row += 2
|
@@ -5160,12 +5721,12 @@ EOS
|
|
5160
5721
|
str = 'A win/loss sparkline.'
|
5161
5722
|
|
5162
5723
|
worksheet1.add_sparkline(
|
5163
|
-
|
5164
|
-
|
5165
|
-
|
5166
|
-
|
5167
|
-
|
5168
|
-
|
5724
|
+
{
|
5725
|
+
:location => 'A20',
|
5726
|
+
:range => 'Sheet2!A3:J3',
|
5727
|
+
:type => 'win_loss'
|
5728
|
+
}
|
5729
|
+
)
|
5169
5730
|
|
5170
5731
|
worksheet1.write(row, 1, str)
|
5171
5732
|
row += 1
|
@@ -5175,13 +5736,13 @@ EOS
|
|
5175
5736
|
str = 'A win/loss sparkline with negative points highlighted.'
|
5176
5737
|
|
5177
5738
|
worksheet1.add_sparkline(
|
5178
|
-
|
5179
|
-
|
5180
|
-
|
5181
|
-
|
5182
|
-
|
5183
|
-
|
5184
|
-
|
5739
|
+
{
|
5740
|
+
:location => 'A21',
|
5741
|
+
:range => 'Sheet2!A3:J3',
|
5742
|
+
:type => 'win_loss',
|
5743
|
+
:negative_points => 1
|
5744
|
+
}
|
5745
|
+
)
|
5185
5746
|
|
5186
5747
|
worksheet1.write(row, 1, str)
|
5187
5748
|
row += 2
|
@@ -5191,13 +5752,13 @@ EOS
|
|
5191
5752
|
str = 'A left to right column (the default).'
|
5192
5753
|
|
5193
5754
|
worksheet1.add_sparkline(
|
5194
|
-
|
5195
|
-
|
5196
|
-
|
5197
|
-
|
5198
|
-
|
5199
|
-
|
5200
|
-
|
5755
|
+
{
|
5756
|
+
:location => 'A23',
|
5757
|
+
:range => 'Sheet2!A4:J4',
|
5758
|
+
:type => 'column',
|
5759
|
+
:style => 20
|
5760
|
+
}
|
5761
|
+
)
|
5201
5762
|
|
5202
5763
|
worksheet1.write(row, 1, str)
|
5203
5764
|
row += 1
|
@@ -5207,14 +5768,14 @@ EOS
|
|
5207
5768
|
str = 'A right to left column.'
|
5208
5769
|
|
5209
5770
|
worksheet1.add_sparkline(
|
5210
|
-
|
5211
|
-
|
5212
|
-
|
5213
|
-
|
5214
|
-
|
5215
|
-
|
5216
|
-
|
5217
|
-
|
5771
|
+
{
|
5772
|
+
:location => 'A24',
|
5773
|
+
:range => 'Sheet2!A4:J4',
|
5774
|
+
:type => 'column',
|
5775
|
+
:style => 20,
|
5776
|
+
:reverse => 1
|
5777
|
+
}
|
5778
|
+
)
|
5218
5779
|
|
5219
5780
|
worksheet1.write(row, 1, str)
|
5220
5781
|
row += 1
|
@@ -5224,13 +5785,13 @@ EOS
|
|
5224
5785
|
str = 'Sparkline and text in one cell.'
|
5225
5786
|
|
5226
5787
|
worksheet1.add_sparkline(
|
5227
|
-
|
5228
|
-
|
5229
|
-
|
5230
|
-
|
5231
|
-
|
5232
|
-
|
5233
|
-
|
5788
|
+
{
|
5789
|
+
:location => 'A25',
|
5790
|
+
:range => 'Sheet2!A4:J4',
|
5791
|
+
:type => 'column',
|
5792
|
+
:style => 20
|
5793
|
+
}
|
5794
|
+
)
|
5234
5795
|
|
5235
5796
|
worksheet1.write(row, 0, 'Growth')
|
5236
5797
|
worksheet1.write(row, 1, str)
|
@@ -5241,12 +5802,12 @@ EOS
|
|
5241
5802
|
str = 'A grouped sparkline. Changes are applied to all three.'
|
5242
5803
|
|
5243
5804
|
worksheet1.add_sparkline(
|
5244
|
-
|
5245
|
-
|
5246
|
-
|
5247
|
-
|
5248
|
-
|
5249
|
-
|
5805
|
+
{
|
5806
|
+
:location => [ 'A27', 'A28', 'A29' ],
|
5807
|
+
:range => [ 'Sheet2!A5:J5', 'Sheet2!A6:J6', 'Sheet2!A7:J7' ],
|
5808
|
+
:markers => 1
|
5809
|
+
}
|
5810
|
+
)
|
5250
5811
|
|
5251
5812
|
worksheet1.write(row, 1, str)
|
5252
5813
|
row += 1
|
@@ -5258,23 +5819,23 @@ EOS
|
|
5258
5819
|
worksheet2.set_column('A:J', 11)
|
5259
5820
|
|
5260
5821
|
data = [
|
5261
|
-
|
5262
|
-
|
5822
|
+
# Simple line data.
|
5823
|
+
[ -2, 2, 3, -1, 0, -2, 3, 2, 1, 0 ],
|
5263
5824
|
|
5264
|
-
|
5265
|
-
|
5825
|
+
# Simple column data.
|
5826
|
+
[ 30, 20, 33, 20, 15, 5, 5, 15, 10, 15 ],
|
5266
5827
|
|
5267
|
-
|
5268
|
-
|
5828
|
+
# Simple win/loss data.
|
5829
|
+
[ 1, 1, -1, -1, 1, -1, 1, 1, 1, -1 ],
|
5269
5830
|
|
5270
|
-
|
5271
|
-
|
5831
|
+
# Unbalanced histogram.
|
5832
|
+
[ 5, 6, 7, 10, 15, 20, 30, 50, 70, 100 ],
|
5272
5833
|
|
5273
|
-
|
5274
|
-
|
5275
|
-
|
5276
|
-
|
5277
|
-
|
5834
|
+
# Data for the grouped sparkline example.
|
5835
|
+
[ -2, 2, 3, -1, 0, -2, 3, 2, 1, 0 ],
|
5836
|
+
[ 3, -1, 0, -2, 3, 2, 1, 0, 2, 1 ],
|
5837
|
+
[ 0, -2, 3, 2, 1, 0, 1, 2, 3, 1 ]
|
5838
|
+
]
|
5278
5839
|
|
5279
5840
|
# Write the sample data to the worksheet.
|
5280
5841
|
worksheet2.write_col('A1', data)
|
@@ -5339,10 +5900,10 @@ EOS
|
|
5339
5900
|
# Add the worksheet data that the charts will refer to.
|
5340
5901
|
headings = [ 'Number', 'Batch 1', 'Batch 2' ]
|
5341
5902
|
data = [
|
5342
|
-
|
5343
|
-
|
5344
|
-
|
5345
|
-
|
5903
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
5904
|
+
[ 10, 40, 50, 20, 10, 50 ],
|
5905
|
+
[ 30, 60, 70, 50, 40, 30 ]
|
5906
|
+
]
|
5346
5907
|
|
5347
5908
|
worksheet.write('A1', headings, bold)
|
5348
5909
|
worksheet.write('A2', data)
|
@@ -5352,18 +5913,18 @@ EOS
|
|
5352
5913
|
|
5353
5914
|
# Configure the first series.
|
5354
5915
|
chart1.add_series(
|
5355
|
-
|
5356
|
-
|
5357
|
-
|
5358
|
-
|
5916
|
+
:name => '=Sheet1!$B$1',
|
5917
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
5918
|
+
:values => '=Sheet1!$B$2:$B$7'
|
5919
|
+
)
|
5359
5920
|
|
5360
5921
|
# Configure second series. Note alternative use of array ref to define
|
5361
5922
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
5362
5923
|
chart1.add_series(
|
5363
|
-
|
5364
|
-
|
5365
|
-
|
5366
|
-
|
5924
|
+
:name => '=Sheet1!$C$1',
|
5925
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
5926
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
5927
|
+
)
|
5367
5928
|
|
5368
5929
|
# Add a chart title and some axis labels.
|
5369
5930
|
chart1.set_title(:name => 'Chart with Data Table')
|
@@ -5383,18 +5944,18 @@ EOS
|
|
5383
5944
|
|
5384
5945
|
# Configure the first series.
|
5385
5946
|
chart2.add_series(
|
5386
|
-
|
5387
|
-
|
5388
|
-
|
5389
|
-
|
5947
|
+
:name => '=Sheet1!$B$1',
|
5948
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
5949
|
+
:values => '=Sheet1!$B$2:$B$7'
|
5950
|
+
)
|
5390
5951
|
|
5391
5952
|
# Configure second series. Note alternative use of array ref to define
|
5392
5953
|
# ranges: [ sheetname, row_start, row_end, col_start, col_end ].
|
5393
5954
|
chart2.add_series(
|
5394
|
-
|
5395
|
-
|
5396
|
-
|
5397
|
-
|
5955
|
+
:name => '=Sheet1!$C$1',
|
5956
|
+
:categories => [ 'Sheet1', 1, 6, 0, 0 ],
|
5957
|
+
:values => [ 'Sheet1', 1, 6, 2, 2 ]
|
5958
|
+
)
|
5398
5959
|
|
5399
5960
|
# Add a chart title and some axis labels.
|
5400
5961
|
chart2.set_title(:name => 'Data Table with legend keys')
|
@@ -5424,10 +5985,10 @@ EOS
|
|
5424
5985
|
# Add the worksheet data that the charts will refer to.
|
5425
5986
|
headings = [ 'Number', 'Data 1', 'Data 2' ]
|
5426
5987
|
data = [
|
5427
|
-
|
5428
|
-
|
5429
|
-
|
5430
|
-
|
5988
|
+
[ 2, 3, 4, 5, 6, 7 ],
|
5989
|
+
[ 10, 40, 50, 20, 10, 50 ],
|
5990
|
+
[ 30, 60, 70, 50, 40, 30 ]
|
5991
|
+
]
|
5431
5992
|
|
5432
5993
|
worksheet.write('A1', headings, bold)
|
5433
5994
|
worksheet.write('A2', data)
|
@@ -5443,20 +6004,20 @@ EOS
|
|
5443
6004
|
|
5444
6005
|
# Configure the first series with a polynomial trendline.
|
5445
6006
|
chart1.add_series(
|
5446
|
-
|
5447
|
-
|
5448
|
-
|
5449
|
-
|
5450
|
-
|
5451
|
-
|
5452
|
-
|
6007
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6008
|
+
:values => '=Sheet1!$B$2:$B$7',
|
6009
|
+
:trendline => {
|
6010
|
+
:type => 'polynomial',
|
6011
|
+
:order => 3,
|
6012
|
+
}
|
6013
|
+
)
|
5453
6014
|
|
5454
6015
|
# Configure the second series with a moving average trendline.
|
5455
6016
|
chart1.add_series(
|
5456
|
-
|
5457
|
-
|
5458
|
-
|
5459
|
-
|
6017
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6018
|
+
:values => '=Sheet1!$C$2:$C$7',
|
6019
|
+
:trendline => { :type => 'linear' }
|
6020
|
+
)
|
5460
6021
|
|
5461
6022
|
# Add a chart title. and some axis labels.
|
5462
6023
|
chart1.set_title(:name => 'Chart with Trendlines')
|
@@ -5474,17 +6035,17 @@ EOS
|
|
5474
6035
|
|
5475
6036
|
# Configure the first series.
|
5476
6037
|
chart2.add_series(
|
5477
|
-
|
5478
|
-
|
5479
|
-
|
5480
|
-
|
5481
|
-
|
6038
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6039
|
+
:values => '=Sheet1!$B$2:$B$7',
|
6040
|
+
:data_labels => { :value => 1 },
|
6041
|
+
:marker => { :type => 'automatic' }
|
6042
|
+
)
|
5482
6043
|
|
5483
6044
|
# Configure the second series.
|
5484
6045
|
chart2.add_series(
|
5485
|
-
|
5486
|
-
|
5487
|
-
|
6046
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6047
|
+
:values => '=Sheet1!$C$2:$C$7'
|
6048
|
+
)
|
5488
6049
|
|
5489
6050
|
# Add a chart title. and some axis labels.
|
5490
6051
|
chart2.set_title(:name => 'Chart with Data Labels and Markers')
|
@@ -5502,16 +6063,16 @@ EOS
|
|
5502
6063
|
|
5503
6064
|
# Configure the first series.
|
5504
6065
|
chart3.add_series(
|
5505
|
-
|
5506
|
-
|
5507
|
-
|
5508
|
-
|
6066
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6067
|
+
:values => '=Sheet1!$B$2:$B$7',
|
6068
|
+
:y_error_bars => { :type => 'standard_error' }
|
6069
|
+
)
|
5509
6070
|
|
5510
6071
|
# Configure the second series.
|
5511
6072
|
chart3.add_series(
|
5512
|
-
|
5513
|
-
|
5514
|
-
|
6073
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6074
|
+
:values => '=Sheet1!$C$2:$C$7'
|
6075
|
+
)
|
5515
6076
|
|
5516
6077
|
# Add a chart title. and some axis labels.
|
5517
6078
|
chart3.set_title(:name => 'Chart with Error Bars')
|
@@ -5532,15 +6093,15 @@ EOS
|
|
5532
6093
|
|
5533
6094
|
# Configure the first series.
|
5534
6095
|
chart4.add_series(
|
5535
|
-
|
5536
|
-
|
5537
|
-
|
6096
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6097
|
+
:values => '=Sheet1!$B$2:$B$7'
|
6098
|
+
)
|
5538
6099
|
|
5539
6100
|
# Configure the second series.
|
5540
6101
|
chart4.add_series(
|
5541
|
-
|
5542
|
-
|
5543
|
-
|
6102
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6103
|
+
:values => '=Sheet1!$C$2:$C$7'
|
6104
|
+
)
|
5544
6105
|
|
5545
6106
|
# Add a chart title. and some axis labels.
|
5546
6107
|
chart4.set_title(:name => 'Chart with Up-Down Bars')
|
@@ -5561,15 +6122,15 @@ EOS
|
|
5561
6122
|
|
5562
6123
|
# Configure the first series.
|
5563
6124
|
chart5.add_series(
|
5564
|
-
|
5565
|
-
|
5566
|
-
|
6125
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6126
|
+
:values => '=Sheet1!$B$2:$B$7'
|
6127
|
+
)
|
5567
6128
|
|
5568
6129
|
# Configure the second series.
|
5569
6130
|
chart5.add_series(
|
5570
|
-
|
5571
|
-
|
5572
|
-
|
6131
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6132
|
+
:values => '=Sheet1!$C$2:$C$7'
|
6133
|
+
)
|
5573
6134
|
|
5574
6135
|
# Add a chart title. and some axis labels.
|
5575
6136
|
chart5.set_title(:name => 'Chart with High-Low Lines')
|
@@ -5590,15 +6151,15 @@ EOS
|
|
5590
6151
|
|
5591
6152
|
# Configure the first series.
|
5592
6153
|
chart6.add_series(
|
5593
|
-
|
5594
|
-
|
5595
|
-
|
6154
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6155
|
+
:values => '=Sheet1!$B$2:$B$7'
|
6156
|
+
)
|
5596
6157
|
|
5597
6158
|
# Configure the second series.
|
5598
6159
|
chart6.add_series(
|
5599
|
-
|
5600
|
-
|
5601
|
-
|
6160
|
+
:categories => '=Sheet1!$A$2:$A$7',
|
6161
|
+
:values => '=Sheet1!$C$2:$C$7'
|
6162
|
+
)
|
5602
6163
|
|
5603
6164
|
# Add a chart title. and some axis labels.
|
5604
6165
|
chart6.set_title(:name => 'Chart with Drop Lines')
|