write_xlsx 0.86.0 → 0.97.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +43 -0
- data/Changes +74 -0
- data/LICENSE.txt +1 -1
- data/README.md +4 -4
- data/examples/a_simple.rb +1 -6
- data/examples/chart_combined.rb +3 -1
- data/examples/conditional_format.rb +73 -46
- data/examples/demo.rb +1 -7
- data/examples/hyperlink1.rb +4 -11
- data/lib/write_xlsx/chart.rb +150 -192
- data/lib/write_xlsx/chart/axis.rb +33 -8
- data/lib/write_xlsx/chart/caption.rb +3 -1
- data/lib/write_xlsx/chart/pie.rb +2 -0
- data/lib/write_xlsx/chart/series.rb +37 -17
- data/lib/write_xlsx/format.rb +19 -11
- data/lib/write_xlsx/package/conditional_format.rb +351 -38
- data/lib/write_xlsx/package/content_types.rb +10 -0
- data/lib/write_xlsx/package/core.rb +8 -6
- data/lib/write_xlsx/package/custom.rb +125 -0
- data/lib/write_xlsx/package/packager.rb +26 -0
- data/lib/write_xlsx/package/styles.rb +53 -21
- data/lib/write_xlsx/package/table.rb +25 -4
- data/lib/write_xlsx/utility.rb +317 -32
- data/lib/write_xlsx/version.rb +1 -1
- data/lib/write_xlsx/workbook.rb +103 -7
- data/lib/write_xlsx/worksheet.rb +280 -30
- data/lib/write_xlsx/worksheet/cell_data.rb +21 -0
- data/lib/write_xlsx/worksheet/hyperlink.rb +4 -8
- 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 +1 -1
- 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/drawing/test_drawing_chart_01.rb +1 -1
- data/test/drawing/test_drawing_image_01.rb +1 -1
- data/test/drawing/test_drawing_shape_01.rb +1 -1
- data/test/drawing/test_drawing_shape_02.rb +1 -1
- data/test/drawing/test_drawing_shape_03.rb +1 -1
- data/test/drawing/test_drawing_shape_04.rb +1 -1
- data/test/drawing/test_drawing_shape_05.rb +1 -1
- data/test/drawing/test_drawing_shape_06.rb +1 -1
- data/test/drawing/test_drawing_shape_07.rb +1 -1
- data/test/drawing/test_write_a_graphic_frame_locks.rb +1 -1
- data/test/drawing/test_write_c_chart.rb +1 -1
- data/test/drawing/test_write_c_nv_graphic_frame_pr.rb +1 -1
- data/test/drawing/test_write_c_nv_pr.rb +1 -1
- data/test/drawing/test_write_col.rb +1 -1
- data/test/drawing/test_write_col_off.rb +1 -1
- data/test/drawing/test_write_ext.rb +1 -1
- data/test/drawing/test_write_pos.rb +1 -1
- data/test/drawing/test_write_row.rb +1 -1
- data/test/drawing/test_write_row_off.rb +1 -1
- data/test/drawing/test_write_xfrm_extension.rb +1 -1
- data/test/drawing/test_write_xfrm_offset.rb +1 -1
- 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_write_text_t.rb +1 -1
- 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/regression/_test_hyperlink31.rb +26 -0
- data/test/regression/disabled_test_vml04.rb +1 -1
- 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_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_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 +1 -1
- data/test/regression/test_chart_axis27.rb +1 -1
- data/test/regression/test_chart_axis28.rb +1 -1
- data/test/regression/test_chart_axis29.rb +1 -1
- 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 +1 -1
- 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_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_crossing01.rb +1 -1
- 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_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_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_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 +1 -1
- 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_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_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 +1 -1
- 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_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_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 +2 -2
- 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_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_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_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_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 +4 -1
- data/test/regression/test_hyperlink23.rb +4 -1
- data/test/regression/test_hyperlink24.rb +4 -1
- 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_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 +1 -1
- data/test/regression/test_image07.rb +1 -1
- data/test/regression/test_image08.rb +1 -1
- 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 +1 -1
- 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 +2 -2
- data/test/regression/test_image29.rb +2 -2
- data/test/regression/test_image30.rb +1 -1
- data/test/regression/test_image31.rb +1 -1
- data/test/regression/test_image32.rb +1 -1
- data/test/regression/test_image33.rb +2 -2
- data/test/regression/test_image35.rb +26 -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_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 +2 -5
- 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_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_print_scale01.rb +1 -1
- 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 +1 -1
- 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_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 +1 -1
- 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/chart_axis40.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis41.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_data_labels25.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_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/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/date_1904_01.xlsx +0 -0
- data/test/regression/xlsx_files/default_row05.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/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/image35.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/table21.xlsx +0 -0
- data/test/regression/xlsx_files/table22.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/utf8_11.xlsx +0 -0
- data/test/test_delete_files.rb +3 -3
- data/test/test_example_match.rb +1 -1
- data/test/test_option_hash_for_workbook.rb +1 -1
- data/test/test_xml_writer_simple.rb +1 -1
- 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 +81 -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 +2 -2
- 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_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 +1 -1
- data/test/worksheet/test_update_format_methods.rb +9 -29
- 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 +28 -1
- 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 +1 -1
- 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 +2 -2
- metadata +248 -15
- data/test/test_col_name.rb +0 -13
- data/test/workbook/test_workbook_new.rb +0 -18
- data/test/worksheet/test_format.rb +0 -17
- data/test/worksheet/test_write_multiline_string_with_url.rb +0 -30
- data/test/worksheet/test_write_url.rb +0 -19
@@ -178,6 +178,16 @@ def add_vba_project
|
|
178
178
|
add_default('bin', 'application/vnd.ms-office.vbaProject')
|
179
179
|
end
|
180
180
|
|
181
|
+
#
|
182
|
+
# Add the name of a table to the ContentTypes overrides.
|
183
|
+
#
|
184
|
+
def add_custom_properties
|
185
|
+
custom = "/docProps/custom.xml"
|
186
|
+
|
187
|
+
add_override(custom, "#{App_document}custom-properties+xml")
|
188
|
+
end
|
189
|
+
|
190
|
+
|
181
191
|
private
|
182
192
|
|
183
193
|
def change_the_workbook_xml_content_type_from_xlsx_to_xlsm
|
@@ -14,7 +14,7 @@ class Core
|
|
14
14
|
def initialize
|
15
15
|
@writer = Package::XMLWriterSimple.new
|
16
16
|
@properties = {}
|
17
|
-
@
|
17
|
+
@createtime = [Time.now.gmtime]
|
18
18
|
end
|
19
19
|
|
20
20
|
def set_xml_writer(filename)
|
@@ -47,12 +47,14 @@ def write_cp_core_properties_base
|
|
47
47
|
end
|
48
48
|
|
49
49
|
#
|
50
|
-
# Convert a localtime() date to a ISO 8601 style
|
50
|
+
# Convert a gmtime/localtime() date to a ISO 8601 style
|
51
|
+
# "2010-01-01T00:00:00Z" date. Excel always treats this as
|
52
|
+
# a utc date/time.
|
51
53
|
#
|
52
|
-
def
|
53
|
-
|
54
|
+
def datetime_to_iso8601_date(gm_time = nil)
|
55
|
+
gm_time ||= Time.now.gmtime
|
54
56
|
|
55
|
-
|
57
|
+
gm_time.strftime('%Y-%m-%dT%H:%M:%SZ')
|
56
58
|
end
|
57
59
|
|
58
60
|
#
|
@@ -109,7 +111,7 @@ def write_dcterms(tag)
|
|
109
111
|
end
|
110
112
|
|
111
113
|
def dcterms_date
|
112
|
-
|
114
|
+
datetime_to_iso8601_date(@properties[:created])
|
113
115
|
end
|
114
116
|
|
115
117
|
#
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require 'write_xlsx/package/xml_writer_simple'
|
3
|
+
require 'write_xlsx/utility'
|
4
|
+
|
5
|
+
module Writexlsx
|
6
|
+
module Package
|
7
|
+
class Custom
|
8
|
+
|
9
|
+
include Writexlsx::Utility
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@writer = Package::XMLWriterSimple.new
|
13
|
+
@properties = []
|
14
|
+
@pid = 1
|
15
|
+
end
|
16
|
+
|
17
|
+
def set_xml_writer(filename)
|
18
|
+
@writer.set_xml_writer(filename)
|
19
|
+
end
|
20
|
+
|
21
|
+
def assemble_xml_file
|
22
|
+
write_xml_declaration do
|
23
|
+
write_properties
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Set the document properties.
|
29
|
+
#
|
30
|
+
def set_properties(properties)
|
31
|
+
@properties = properties
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def write_properties
|
37
|
+
schema = 'http://schemas.openxmlformats.org/officeDocument/2006/'
|
38
|
+
xmlns = "#{schema}custom-properties"
|
39
|
+
xmlns_vt = "#{schema}docPropsVTypes"
|
40
|
+
|
41
|
+
attributes = [
|
42
|
+
['xmlns', xmlns],
|
43
|
+
['xmlns:vt', xmlns_vt]
|
44
|
+
]
|
45
|
+
|
46
|
+
@writer.tag_elements('Properties', attributes ) do
|
47
|
+
@properties.each do |property|
|
48
|
+
# Write the property element.
|
49
|
+
write_property(property)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def write_property(property)
|
55
|
+
fmtid = '{D5CDD505-2E9C-101B-9397-08002B2CF9AE}'
|
56
|
+
|
57
|
+
@pid += 1
|
58
|
+
name, value, type = property
|
59
|
+
|
60
|
+
attributes = [
|
61
|
+
['fmtid', fmtid],
|
62
|
+
['pid', @pid],
|
63
|
+
['name', name]
|
64
|
+
]
|
65
|
+
|
66
|
+
@writer.tag_elements('property', attributes) do
|
67
|
+
if type == 'date'
|
68
|
+
# Write the vt:filetime element.
|
69
|
+
write_vt_filetime(value)
|
70
|
+
elsif type == 'number'
|
71
|
+
# Write the vt:r8 element.
|
72
|
+
write_vt_r8(value)
|
73
|
+
elsif type == 'number_int'
|
74
|
+
# Write the vt:i4 element.
|
75
|
+
write_vt_i4(value)
|
76
|
+
elsif type == 'bool'
|
77
|
+
# Write the vt:bool element.
|
78
|
+
write_vt_bool(value)
|
79
|
+
else
|
80
|
+
# Write the vt:lpwstr element.
|
81
|
+
write_vt_lpwstr(value)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
def write_vt_lpwstr(data)
|
87
|
+
@writer.data_element('vt:lpwstr', data)
|
88
|
+
end
|
89
|
+
|
90
|
+
#
|
91
|
+
# Write the <vt:i4> element.
|
92
|
+
#
|
93
|
+
def write_vt_i4(data)
|
94
|
+
@writer.data_element('vt:i4', data)
|
95
|
+
end
|
96
|
+
|
97
|
+
#
|
98
|
+
# Write the <vt:r8> element.
|
99
|
+
#
|
100
|
+
def write_vt_r8(data)
|
101
|
+
@writer.data_element('vt:r8', data)
|
102
|
+
end
|
103
|
+
|
104
|
+
#
|
105
|
+
# Write the <vt:bool> element.
|
106
|
+
#
|
107
|
+
def write_vt_bool(data)
|
108
|
+
if ptrue?(data)
|
109
|
+
data = 'true'
|
110
|
+
else
|
111
|
+
data = 'false'
|
112
|
+
end
|
113
|
+
|
114
|
+
@writer.data_element('vt:bool', data)
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Write the <vt:filetime> element.
|
119
|
+
#
|
120
|
+
def write_vt_filetime(data)
|
121
|
+
@writer.data_element('vt:filetime', data)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'write_xlsx/package/comments'
|
6
6
|
require 'write_xlsx/package/content_types'
|
7
7
|
require 'write_xlsx/package/core'
|
8
|
+
require 'write_xlsx/package/custom'
|
8
9
|
require 'write_xlsx/package/relationships'
|
9
10
|
require 'write_xlsx/package/shared_strings'
|
10
11
|
require 'write_xlsx/package/styles'
|
@@ -44,6 +45,7 @@ def create_package
|
|
44
45
|
write_shared_strings_file
|
45
46
|
write_app_file
|
46
47
|
write_core_file
|
48
|
+
write_custom_file
|
47
49
|
write_content_types_file
|
48
50
|
write_styles_file
|
49
51
|
write_theme_file
|
@@ -172,6 +174,22 @@ def write_core_file
|
|
172
174
|
core.assemble_xml_file
|
173
175
|
end
|
174
176
|
|
177
|
+
#
|
178
|
+
# Write the custom.xml file.
|
179
|
+
#
|
180
|
+
def write_custom_file
|
181
|
+
properties = @workbook.custom_properties
|
182
|
+
custom = Package::Custom.new
|
183
|
+
|
184
|
+
return if properties.empty?
|
185
|
+
|
186
|
+
FileUtils.mkdir_p("#{@package_dir}/docProps")
|
187
|
+
|
188
|
+
custom.set_properties(properties)
|
189
|
+
custom.set_xml_writer("#{@package_dir}/docProps/custom.xml")
|
190
|
+
custom.assemble_xml_file
|
191
|
+
end
|
192
|
+
|
175
193
|
#
|
176
194
|
# Write the ContentTypes.xml file.
|
177
195
|
#
|
@@ -190,6 +208,8 @@ def write_content_types_file
|
|
190
208
|
content.add_shared_strings unless @workbook.shared_strings_empty?
|
191
209
|
# Add vbaProject if present.
|
192
210
|
content.add_vba_project if @workbook.vba_project
|
211
|
+
# Add the custom properties if present.
|
212
|
+
content.add_custom_properties unless @workbook.custom_properties.empty?
|
193
213
|
|
194
214
|
content.set_xml_writer("#{@package_dir}/[Content_Types].xml")
|
195
215
|
content.assemble_xml_file
|
@@ -239,9 +259,15 @@ def write_root_rels_file
|
|
239
259
|
FileUtils.mkdir_p("#{@package_dir}/_rels")
|
240
260
|
|
241
261
|
rels.add_document_relationship('/officeDocument', 'xl/workbook.xml')
|
262
|
+
|
242
263
|
rels.add_package_relationship('/metadata/core-properties',
|
243
264
|
'docProps/core.xml')
|
265
|
+
|
244
266
|
rels.add_document_relationship('/extended-properties', 'docProps/app.xml')
|
267
|
+
|
268
|
+
unless @workbook.custom_properties.empty?
|
269
|
+
rels.add_document_relationship('/custom-properties', 'docProps/custom.xml')
|
270
|
+
end
|
245
271
|
rels.set_xml_writer("#{@package_dir}/_rels/.rels" )
|
246
272
|
rels.assemble_xml_file
|
247
273
|
end
|
@@ -10,14 +10,16 @@ class Styles
|
|
10
10
|
|
11
11
|
def initialize
|
12
12
|
@writer = Package::XMLWriterSimple.new
|
13
|
-
@xf_formats
|
14
|
-
@palette
|
15
|
-
@font_count
|
16
|
-
@num_format_count
|
17
|
-
@border_count
|
18
|
-
@fill_count
|
19
|
-
@custom_colors
|
20
|
-
@dxf_formats
|
13
|
+
@xf_formats = nil
|
14
|
+
@palette = []
|
15
|
+
@font_count = 0
|
16
|
+
@num_format_count = 0
|
17
|
+
@border_count = 0
|
18
|
+
@fill_count = 0
|
19
|
+
@custom_colors = []
|
20
|
+
@dxf_formats = []
|
21
|
+
@has_hyperlink = 0
|
22
|
+
@hyperlink_font_id = 0
|
21
23
|
end
|
22
24
|
|
23
25
|
def set_xml_writer(filename)
|
@@ -33,7 +35,10 @@ def assemble_xml_file
|
|
33
35
|
#
|
34
36
|
# Pass in the Format objects and other properties used to set the styles.
|
35
37
|
#
|
36
|
-
def set_style_properties(
|
38
|
+
def set_style_properties(
|
39
|
+
xf_formats, palette, font_count, num_format_count, border_count,
|
40
|
+
fill_count, custom_colors, dxf_formats
|
41
|
+
)
|
37
42
|
@xf_formats = xf_formats
|
38
43
|
@palette = palette
|
39
44
|
@font_count = font_count
|
@@ -150,7 +155,11 @@ def write_fonts
|
|
150
155
|
|
151
156
|
def write_font_base
|
152
157
|
@xf_formats.each do |format|
|
153
|
-
|
158
|
+
if format.has_font?
|
159
|
+
format.write_font(@writer, self)
|
160
|
+
@has_hyperlink = 1 if ptrue?(format.hyperlink)
|
161
|
+
@hyperlink_font_id = format.font_index unless ptrue?(@hyperlink_font_id)
|
162
|
+
end
|
154
163
|
end
|
155
164
|
end
|
156
165
|
|
@@ -365,11 +374,17 @@ def write_sub_border(type, style = 0, color = nil)
|
|
365
374
|
# Write the <cellStyleXfs> element.
|
366
375
|
#
|
367
376
|
def write_cell_style_xfs
|
368
|
-
|
377
|
+
count = ptrue?(@has_hyperlink) ? 2 : 1
|
378
|
+
|
379
|
+
attributes = [ ['count', count] ]
|
369
380
|
|
370
381
|
@writer.tag_elements('cellStyleXfs', attributes) do
|
371
382
|
# Write the style_xf element.
|
372
|
-
write_style_xf
|
383
|
+
write_style_xf(0, 0)
|
384
|
+
|
385
|
+
if ptrue?(@has_hyperlink)
|
386
|
+
write_style_xf(1, @hyperlink_font_id)
|
387
|
+
end
|
373
388
|
end
|
374
389
|
end
|
375
390
|
|
@@ -396,15 +411,27 @@ def write_cell_xfs
|
|
396
411
|
#
|
397
412
|
# Write the style <xf> element.
|
398
413
|
#
|
399
|
-
def write_style_xf
|
414
|
+
def write_style_xf(has_hyperlink, font_id)
|
400
415
|
attributes = [
|
401
416
|
['numFmtId', 0],
|
402
|
-
['fontId',
|
417
|
+
['fontId', font_id],
|
403
418
|
['fillId', 0],
|
404
419
|
['borderId', 0]
|
405
420
|
]
|
406
421
|
|
407
|
-
|
422
|
+
if ptrue?(has_hyperlink)
|
423
|
+
attributes << ['applyNumberFormat', 0]
|
424
|
+
attributes << ['applyFill', 0]
|
425
|
+
attributes << ['applyBorder', 0]
|
426
|
+
attributes << ['applyAlignment', 0]
|
427
|
+
attributes << ['applyProtection', 0]
|
428
|
+
@writer.tag_elements('xf', attributes) do
|
429
|
+
@writer.empty_tag('alignment', [ ['vertical', 'top'] ])
|
430
|
+
@writer.empty_tag('protection', [ ['locked', 0] ])
|
431
|
+
end
|
432
|
+
else
|
433
|
+
@writer.empty_tag('xf', attributes)
|
434
|
+
end
|
408
435
|
end
|
409
436
|
|
410
437
|
private
|
@@ -450,22 +477,27 @@ def write_xf(format)
|
|
450
477
|
# Write the <cellStyles> element.
|
451
478
|
#
|
452
479
|
def write_cell_styles
|
453
|
-
|
480
|
+
count = ptrue?(@has_hyperlink) ? 2 : 1
|
481
|
+
|
482
|
+
attributes = [ ['count', count] ]
|
454
483
|
|
455
484
|
@writer.tag_elements('cellStyles', attributes) do
|
456
485
|
# Write the cellStyle element.
|
457
|
-
|
486
|
+
if ptrue?(@has_hyperlink)
|
487
|
+
write_cell_style('Hyperlink', 1, 8)
|
488
|
+
end
|
489
|
+
write_cell_style('Normal', 0, 0)
|
458
490
|
end
|
459
491
|
end
|
460
492
|
|
461
493
|
#
|
462
494
|
# Write the <cellStyle> element.
|
463
495
|
#
|
464
|
-
def write_cell_style
|
496
|
+
def write_cell_style(name, xf_id, builtin_id)
|
465
497
|
attributes = [
|
466
|
-
['name',
|
467
|
-
['xfId',
|
468
|
-
['builtinId',
|
498
|
+
['name', name],
|
499
|
+
['xfId', xf_id],
|
500
|
+
['builtinId', builtin_id]
|
469
501
|
]
|
470
502
|
|
471
503
|
@writer.empty_tag('cellStyle', attributes)
|
@@ -32,8 +32,9 @@ def initialize(worksheet, *args)
|
|
32
32
|
@writer = Package::XMLWriterSimple.new
|
33
33
|
|
34
34
|
@row1, @row2, @col1, @col2, @param = handle_args(*args)
|
35
|
-
@columns
|
35
|
+
@columns = []
|
36
36
|
@col_formats = []
|
37
|
+
@seen_name = {}
|
37
38
|
|
38
39
|
# Set the data range rows (without the header and footer).
|
39
40
|
@first_data_row = @row1
|
@@ -95,9 +96,15 @@ def overrite_the_defaults_with_any_use_defined_values(col_id, col_data, col_num)
|
|
95
96
|
col_data.name = user_data[:header]
|
96
97
|
end
|
97
98
|
|
99
|
+
# Excel requires unique case insensitive header names.
|
100
|
+
if @seen_name[col_data.name.downcase]
|
101
|
+
raise "add_table() contains duplicate name: '#{col_data.name}'"
|
102
|
+
else
|
103
|
+
@seen_name[col_data.name.downcase] = true
|
104
|
+
end
|
98
105
|
# Get the header format if defined.
|
99
106
|
col_data.name_format = user_data[:header_format]
|
100
|
-
|
107
|
+
|
101
108
|
# Handle the column formula.
|
102
109
|
handle_the_column_formula(
|
103
110
|
col_data, col_num, user_data[:formula], user_data[:format]
|
@@ -277,8 +284,22 @@ def set_the_table_style
|
|
277
284
|
def set_the_table_name
|
278
285
|
if @param[:name]
|
279
286
|
name = @param[:name]
|
280
|
-
|
281
|
-
|
287
|
+
|
288
|
+
# Raise if the name contains invalid chars as defined by Excel help.
|
289
|
+
if name !~ /^[\w\\][\w\\.]*$/ || name =~ /^\d/
|
290
|
+
raise "Invalid character in name '#{name} used in add_table()"
|
291
|
+
end
|
292
|
+
|
293
|
+
# Raise if the name looks like a cell name.
|
294
|
+
if name =~ /^[a-zA-Z][a-zA-Z]?[a-dA-D]?[0-9]+$/
|
295
|
+
ralse "Invalid name '#{name}' looks like a cell name in add_table()"
|
296
|
+
end
|
297
|
+
|
298
|
+
# Raise if the name looks like a R1C1.
|
299
|
+
if name =~ /^[rcRC]$/ || name =~ /^[rcRC]\d+[rcRC]\d+$/
|
300
|
+
raise "Invalid name '#{name}' like a RC cell ref in add_table()"
|
301
|
+
end
|
302
|
+
|
282
303
|
@name = @param[:name]
|
283
304
|
end
|
284
305
|
end
|
data/lib/write_xlsx/utility.rb
CHANGED
@@ -320,7 +320,7 @@ def check_parameter(params, valid_keys, method)
|
|
320
320
|
invalids = params.keys - valid_keys
|
321
321
|
unless invalids.empty?
|
322
322
|
raise WriteXLSXOptionParameterError,
|
323
|
-
|
323
|
+
"Unknown parameter '#{invalids.join(', ')}' in #{method}."
|
324
324
|
end
|
325
325
|
true
|
326
326
|
end
|
@@ -372,7 +372,7 @@ def layout_properties(args, is_text = false)
|
|
372
372
|
# Check for valid properties.
|
373
373
|
args.keys.each do |key|
|
374
374
|
unless properties.include?(key.to_sym)
|
375
|
-
|
375
|
+
raise "Property '#{key}' not allowed in layout options\n"
|
376
376
|
end
|
377
377
|
end
|
378
378
|
|
@@ -405,9 +405,9 @@ def pixels_to_points(vertices)
|
|
405
405
|
|
406
406
|
def v_shape_attributes_base(id, z_index)
|
407
407
|
[
|
408
|
-
|
409
|
-
|
410
|
-
|
408
|
+
['id', "_x0000_s#{id}"],
|
409
|
+
['type', type],
|
410
|
+
['style', (v_shape_style_base(z_index, vertices) + style_addition).join]
|
411
411
|
]
|
412
412
|
end
|
413
413
|
|
@@ -425,17 +425,17 @@ def v_shape_style_base(z_index, vertices)
|
|
425
425
|
|
426
426
|
def shape_style_base(left_str, top_str, width_str, height_str, z_index_str)
|
427
427
|
[
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
428
|
+
'position:absolute;',
|
429
|
+
'margin-left:',
|
430
|
+
left_str, 'pt;',
|
431
|
+
'margin-top:',
|
432
|
+
top_str, 'pt;',
|
433
|
+
'width:',
|
434
|
+
width_str, 'pt;',
|
435
|
+
'height:',
|
436
|
+
height_str, 'pt;',
|
437
|
+
'z-index:',
|
438
|
+
z_index_str, ';'
|
439
439
|
]
|
440
440
|
end
|
441
441
|
|
@@ -500,10 +500,10 @@ def write_font(font)
|
|
500
500
|
color = '#000000'
|
501
501
|
|
502
502
|
attributes = [
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
503
|
+
['face', face],
|
504
|
+
['size', size],
|
505
|
+
['color', color]
|
506
|
+
]
|
507
507
|
@writer.data_element('font', caption, attributes)
|
508
508
|
end
|
509
509
|
|
@@ -543,6 +543,91 @@ def fill_properties(fill) # :nodoc:
|
|
543
543
|
line_fill_properties(fill)
|
544
544
|
end
|
545
545
|
|
546
|
+
#
|
547
|
+
# Convert user defined pattern properties to the structure required internally.
|
548
|
+
#
|
549
|
+
def pattern_properties(args) # :nodoc:
|
550
|
+
pattern = {}
|
551
|
+
|
552
|
+
return nil unless args
|
553
|
+
|
554
|
+
# Check the pattern type is present.
|
555
|
+
return nil unless args.has_key?(:pattern)
|
556
|
+
|
557
|
+
# Check the foreground color is present.
|
558
|
+
retuen nil unless args.has_key?(:fg_color)
|
559
|
+
|
560
|
+
types = {
|
561
|
+
'percent_5' => 'pct5',
|
562
|
+
'percent_10' => 'pct10',
|
563
|
+
'percent_20' => 'pct20',
|
564
|
+
'percent_25' => 'pct25',
|
565
|
+
'percent_30' => 'pct30',
|
566
|
+
'percent_40' => 'pct40',
|
567
|
+
|
568
|
+
'percent_50' => 'pct50',
|
569
|
+
'percent_60' => 'pct60',
|
570
|
+
'percent_70' => 'pct70',
|
571
|
+
'percent_75' => 'pct75',
|
572
|
+
'percent_80' => 'pct80',
|
573
|
+
'percent_90' => 'pct90',
|
574
|
+
|
575
|
+
'light_downward_diagonal' => 'ltDnDiag',
|
576
|
+
'light_upward_diagonal' => 'ltUpDiag',
|
577
|
+
'dark_downward_diagonal' => 'dkDnDiag',
|
578
|
+
'dark_upward_diagonal' => 'dkUpDiag',
|
579
|
+
'wide_downward_diagonal' => 'wdDnDiag',
|
580
|
+
'wide_upward_diagonal' => 'wdUpDiag',
|
581
|
+
|
582
|
+
'light_vertical' => 'ltVert',
|
583
|
+
'light_horizontal' => 'ltHorz',
|
584
|
+
'narrow_vertical' => 'narVert',
|
585
|
+
'narrow_horizontal' => 'narHorz',
|
586
|
+
'dark_vertical' => 'dkVert',
|
587
|
+
'dark_horizontal' => 'dkHorz',
|
588
|
+
|
589
|
+
'dashed_downward_diagonal' => 'dashDnDiag',
|
590
|
+
'dashed_upward_diagonal' => 'dashUpDiag',
|
591
|
+
'dashed_horizontal' => 'dashHorz',
|
592
|
+
'dashed_vertical' => 'dashVert',
|
593
|
+
'small_confetti' => 'smConfetti',
|
594
|
+
'large_confetti' => 'lgConfetti',
|
595
|
+
|
596
|
+
'zigzag' => 'zigZag',
|
597
|
+
'wave' => 'wave',
|
598
|
+
'diagonal_brick' => 'diagBrick',
|
599
|
+
'horizontal_brick' => 'horzBrick',
|
600
|
+
'weave' => 'weave',
|
601
|
+
'plaid' => 'plaid',
|
602
|
+
|
603
|
+
'divot' => 'divot',
|
604
|
+
'dotted_grid' => 'dotGrid',
|
605
|
+
'dotted_diamond' => 'dotDmnd',
|
606
|
+
'shingle' => 'shingle',
|
607
|
+
'trellis' => 'trellis',
|
608
|
+
'sphere' => 'sphere',
|
609
|
+
|
610
|
+
'small_grid' => 'smGrid',
|
611
|
+
'large_grid' => 'lgGrid',
|
612
|
+
'small_check' => 'smCheck',
|
613
|
+
'large_check' => 'lgCheck',
|
614
|
+
'outlined_diamond' => 'openDmnd',
|
615
|
+
'solid_diamond' => 'solidDmnd'
|
616
|
+
}
|
617
|
+
|
618
|
+
# Check for valid types.
|
619
|
+
if types[args[:pattern]]
|
620
|
+
pattern[:pattern] = types[args[:pattern]]
|
621
|
+
else
|
622
|
+
raise "Unknown pattern type '#{args[:pattern]}'"
|
623
|
+
end
|
624
|
+
|
625
|
+
pattern[:bg_color] = args[:bg_color] || '#FFFFFF'
|
626
|
+
pattern[:fg_color] = args[:fg_color]
|
627
|
+
|
628
|
+
pattern
|
629
|
+
end
|
630
|
+
|
546
631
|
def line_fill_properties(params)
|
547
632
|
return { :_defined => 0 } unless params
|
548
633
|
ret = params.dup
|
@@ -605,22 +690,222 @@ def process_workbook_options(*params)
|
|
605
690
|
[options.dup, default_format_properties.dup]
|
606
691
|
end
|
607
692
|
end
|
693
|
+
|
694
|
+
#
|
695
|
+
# Convert user defined font values into private hash values.
|
696
|
+
#
|
697
|
+
def convert_font_args(params)
|
698
|
+
return unless params
|
699
|
+
font = params_to_font(params)
|
700
|
+
|
701
|
+
# Convert font size units.
|
702
|
+
font[:_size] *= 100 if font[:_size] && font[:_size] != 0
|
703
|
+
|
704
|
+
# Convert rotation into 60,000ths of a degree.
|
705
|
+
if ptrue?(font[:_rotation])
|
706
|
+
font[:_rotation] = 60_000 * font[:_rotation].to_i
|
707
|
+
end
|
708
|
+
|
709
|
+
font
|
710
|
+
end
|
711
|
+
|
712
|
+
def params_to_font(params)
|
713
|
+
{
|
714
|
+
:_name => params[:name],
|
715
|
+
:_color => params[:color],
|
716
|
+
:_size => params[:size],
|
717
|
+
:_bold => params[:bold],
|
718
|
+
:_italic => params[:italic],
|
719
|
+
:_underline => params[:underline],
|
720
|
+
:_pitch_family => params[:pitch_family],
|
721
|
+
:_charset => params[:charset],
|
722
|
+
:_baseline => params[:baseline] || 0,
|
723
|
+
:_rotation => params[:rotation]
|
724
|
+
}
|
725
|
+
end
|
726
|
+
|
727
|
+
#
|
728
|
+
# Write the <c:txPr> element.
|
729
|
+
#
|
730
|
+
def write_tx_pr(horiz, font) # :nodoc:
|
731
|
+
rotation = nil
|
732
|
+
if font && font[:_rotation]
|
733
|
+
rotation = font[:_rotation]
|
734
|
+
end
|
735
|
+
@writer.tag_elements('c:txPr') do
|
736
|
+
# Write the a:bodyPr element.
|
737
|
+
write_a_body_pr(rotation, horiz)
|
738
|
+
# Write the a:lstStyle element.
|
739
|
+
write_a_lst_style
|
740
|
+
# Write the a:p element.
|
741
|
+
write_a_p_formula(font)
|
742
|
+
end
|
743
|
+
end
|
744
|
+
|
745
|
+
#
|
746
|
+
# Write the <a:bodyPr> element.
|
747
|
+
#
|
748
|
+
def write_a_body_pr(rot, horiz = nil) # :nodoc:
|
749
|
+
rot = -5400000 if !rot && ptrue?(horiz)
|
750
|
+
attributes = []
|
751
|
+
attributes << ['rot', rot] if rot
|
752
|
+
attributes << ['vert', 'horz'] if ptrue?(horiz)
|
753
|
+
|
754
|
+
@writer.empty_tag('a:bodyPr', attributes)
|
755
|
+
end
|
756
|
+
|
757
|
+
#
|
758
|
+
# Write the <a:lstStyle> element.
|
759
|
+
#
|
760
|
+
def write_a_lst_style # :nodoc:
|
761
|
+
@writer.empty_tag('a:lstStyle')
|
762
|
+
end
|
763
|
+
|
764
|
+
#
|
765
|
+
# Write the <a:p> element for formula titles.
|
766
|
+
#
|
767
|
+
def write_a_p_formula(font = nil) # :nodoc:
|
768
|
+
@writer.tag_elements('a:p') do
|
769
|
+
# Write the a:pPr element.
|
770
|
+
write_a_p_pr_formula(font)
|
771
|
+
# Write the a:endParaRPr element.
|
772
|
+
write_a_end_para_rpr
|
773
|
+
end
|
774
|
+
end
|
775
|
+
|
776
|
+
#
|
777
|
+
# Write the <a:pPr> element for formula titles.
|
778
|
+
#
|
779
|
+
def write_a_p_pr_formula(font) # :nodoc:
|
780
|
+
@writer.tag_elements('a:pPr') { write_a_def_rpr(font) }
|
781
|
+
end
|
782
|
+
|
783
|
+
#
|
784
|
+
# Write the <a:defRPr> element.
|
785
|
+
#
|
786
|
+
def write_a_def_rpr(font = nil) # :nodoc:
|
787
|
+
write_def_rpr_r_pr_common(
|
788
|
+
font,
|
789
|
+
get_font_style_attributes(font),
|
790
|
+
'a:defRPr'
|
791
|
+
)
|
792
|
+
end
|
793
|
+
|
794
|
+
def write_def_rpr_r_pr_common(font, style_attributes, tag) # :nodoc:
|
795
|
+
latin_attributes = get_font_latin_attributes(font)
|
796
|
+
has_color = ptrue?(font) && ptrue?(font[:_color])
|
797
|
+
|
798
|
+
if !latin_attributes.empty? || has_color
|
799
|
+
@writer.tag_elements(tag, style_attributes) do
|
800
|
+
if has_color
|
801
|
+
write_a_solid_fill(:color => font[:_color])
|
802
|
+
end
|
803
|
+
if !latin_attributes.empty?
|
804
|
+
write_a_latin(latin_attributes)
|
805
|
+
end
|
806
|
+
end
|
807
|
+
else
|
808
|
+
@writer.empty_tag(tag, style_attributes)
|
809
|
+
end
|
810
|
+
end
|
811
|
+
|
812
|
+
#
|
813
|
+
# Get the font latin attributes from a font hash.
|
814
|
+
#
|
815
|
+
def get_font_latin_attributes(font)
|
816
|
+
return [] unless font
|
817
|
+
|
818
|
+
attributes = []
|
819
|
+
attributes << ['typeface', font[:_name]] if ptrue?(font[:_name])
|
820
|
+
attributes << ['pitchFamily', font[:_pitch_family]] if font[:_pitch_family]
|
821
|
+
attributes << ['charset', font[:_charset]] if font[:_charset]
|
822
|
+
|
823
|
+
attributes
|
824
|
+
end
|
825
|
+
|
826
|
+
#
|
827
|
+
# Write the <a:solidFill> element.
|
828
|
+
#
|
829
|
+
def write_a_solid_fill(fill) # :nodoc:
|
830
|
+
@writer.tag_elements('a:solidFill') do
|
831
|
+
if fill[:color]
|
832
|
+
# Write the a:srgbClr element.
|
833
|
+
write_a_srgb_clr(color(fill[:color]), fill[:transparency])
|
834
|
+
end
|
835
|
+
end
|
836
|
+
end
|
837
|
+
|
838
|
+
#
|
839
|
+
# Write the <a:srgbClr> element.
|
840
|
+
#
|
841
|
+
def write_a_srgb_clr(color, transparency = nil) # :nodoc:
|
842
|
+
tag = 'a:srgbClr'
|
843
|
+
attributes = [ ['val', color] ]
|
844
|
+
|
845
|
+
if ptrue?(transparency)
|
846
|
+
@writer.tag_elements(tag, attributes) do
|
847
|
+
write_a_alpha(transparency)
|
848
|
+
end
|
849
|
+
else
|
850
|
+
@writer.empty_tag(tag, attributes)
|
851
|
+
end
|
852
|
+
end
|
853
|
+
|
854
|
+
#
|
855
|
+
# Convert the user specified colour index or string to a rgb colour.
|
856
|
+
#
|
857
|
+
def color(color_code) # :nodoc:
|
858
|
+
if color_code and color_code =~ /^#[0-9a-fA-F]{6}$/
|
859
|
+
# Convert a HTML style #RRGGBB color.
|
860
|
+
color_code.sub(/^#/, '').upcase
|
861
|
+
else
|
862
|
+
index = Format.color(color_code)
|
863
|
+
raise "Unknown color '#{color_code}' used in chart formatting." unless index
|
864
|
+
palette_color(index)
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
#
|
869
|
+
# Get the font style attributes from a font hash.
|
870
|
+
#
|
871
|
+
def get_font_style_attributes(font)
|
872
|
+
return [] unless font
|
873
|
+
|
874
|
+
attributes = []
|
875
|
+
attributes << ['sz', font[:_size]] if ptrue?(font[:_size])
|
876
|
+
attributes << ['b', font[:_bold]] if font[:_bold]
|
877
|
+
attributes << ['i', font[:_italic]] if font[:_italic]
|
878
|
+
attributes << ['u', 'sng'] if font[:_underline]
|
879
|
+
|
880
|
+
# Turn off baseline when testing fonts that don't have it.
|
881
|
+
if font[:_baseline] != -1
|
882
|
+
attributes << ['baseline', font[:_baseline]]
|
883
|
+
end
|
884
|
+
attributes
|
885
|
+
end
|
886
|
+
|
887
|
+
#
|
888
|
+
# Write the <a:endParaRPr> element.
|
889
|
+
#
|
890
|
+
def write_a_end_para_rpr # :nodoc:
|
891
|
+
@writer.empty_tag('a:endParaRPr', [ ['lang', 'en-US'] ])
|
892
|
+
end
|
608
893
|
end
|
609
894
|
|
610
895
|
module WriteDPtPoint
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
end
|
896
|
+
#
|
897
|
+
# Write an individual <c:dPt> element. Override the parent method to add
|
898
|
+
# markers.
|
899
|
+
#
|
900
|
+
def write_d_pt_point(index, point)
|
901
|
+
@writer.tag_elements('c:dPt') do
|
902
|
+
# Write the c:idx element.
|
903
|
+
write_idx(index)
|
904
|
+
@writer.tag_elements('c:marker') do
|
905
|
+
# Write the c:spPr element.
|
906
|
+
write_sp_pr(point)
|
623
907
|
end
|
624
908
|
end
|
909
|
+
end
|
625
910
|
end
|
626
911
|
end
|