write_xlsx 0.0.4 → 0.51.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -2
- data/README.rdoc +14 -12
- data/Rakefile +8 -8
- data/VERSION +1 -1
- data/examples/chart_secondary_axis.rb +55 -0
- data/examples/date_time.rb +84 -0
- data/examples/panes.rb +108 -0
- data/examples/regions.rb +49 -0
- data/examples/shape1.rb +36 -0
- data/examples/shape2.rb +53 -0
- data/examples/shape3.rb +32 -0
- data/examples/shape4.rb +55 -0
- data/examples/shape5.rb +48 -0
- data/examples/shape6.rb +48 -0
- data/examples/shape7.rb +74 -0
- data/examples/shape8.rb +73 -0
- data/examples/shape_all.rb +241 -0
- data/examples/stats.rb +69 -0
- data/examples/stats_ext.rb +77 -0
- data/examples/stocks.rb +73 -0
- data/examples/tables.rb +360 -0
- data/lib/write_xlsx.rb +25 -1
- data/lib/write_xlsx/chart.rb +656 -260
- data/lib/write_xlsx/chart/area.rb +41 -7
- data/lib/write_xlsx/chart/bar.rb +16 -17
- data/lib/write_xlsx/chart/column.rb +5 -15
- data/lib/write_xlsx/chart/line.rb +15 -6
- data/lib/write_xlsx/chart/pie.rb +7 -21
- data/lib/write_xlsx/chart/scatter.rb +90 -20
- data/lib/write_xlsx/chart/stock.rb +24 -43
- data/lib/write_xlsx/chartsheet.rb +29 -11
- data/lib/write_xlsx/drawing.rb +354 -35
- data/lib/write_xlsx/format.rb +72 -21
- data/lib/write_xlsx/package/app.rb +2 -5
- data/lib/write_xlsx/package/comments.rb +5 -1
- data/lib/write_xlsx/package/content_types.rb +10 -0
- data/lib/write_xlsx/package/packager.rb +41 -7
- data/lib/write_xlsx/package/relationships.rb +1 -1
- data/lib/write_xlsx/package/shared_strings.rb +36 -8
- data/lib/write_xlsx/package/styles.rb +12 -9
- data/lib/write_xlsx/package/table.rb +194 -0
- data/lib/write_xlsx/package/vml.rb +26 -27
- data/lib/write_xlsx/package/xml_writer_simple.rb +25 -4
- data/lib/write_xlsx/shape.rb +172 -0
- data/lib/write_xlsx/utility.rb +20 -0
- data/lib/write_xlsx/workbook.rb +499 -141
- data/lib/write_xlsx/worksheet.rb +1162 -153
- data/test/chart/test_add_series.rb +43 -4
- data/test/chart/test_write_d_lbls.rb +274 -0
- data/test/chart/test_write_major_gridlines.rb +1 -1
- data/test/chartsheet/test_chartsheet01.rb +31 -0
- data/test/drawing/test_drawing_shape_01.rb +68 -0
- data/test/drawing/test_drawing_shape_02.rb +73 -0
- data/test/drawing/test_drawing_shape_03.rb +38 -0
- data/test/drawing/test_drawing_shape_04.rb +121 -0
- data/test/drawing/test_drawing_shape_05.rb +45 -0
- data/test/drawing/test_drawing_shape_06.rb +42 -0
- data/test/drawing/test_drawing_shape_07.rb +47 -0
- data/test/drawing/test_write_a_graphic_frame_locks.rb +18 -0
- data/test/drawing/test_write_c_chart.rb +18 -0
- data/test/drawing/test_write_c_nv_graphic_frame_pr.rb +28 -0
- data/test/drawing/test_write_c_nv_pr.rb +18 -0
- data/test/drawing/test_write_col.rb +18 -0
- data/test/drawing/test_write_col_off.rb +18 -0
- data/test/drawing/test_write_ext.rb +18 -0
- data/test/drawing/test_write_pos.rb +18 -0
- data/test/drawing/test_write_row.rb +18 -0
- data/test/drawing/test_write_row_off.rb +18 -0
- data/test/drawing/test_write_xfrm_extension.rb +18 -0
- data/test/drawing/test_write_xfrm_offset.rb +18 -0
- data/test/helper.rb +93 -50
- data/test/package/shared_strings/test_write_si.rb +10 -1
- data/test/package/table/test_table01.rb +42 -0
- data/test/package/table/test_table02.rb +44 -0
- data/test/package/table/test_table03.rb +48 -0
- data/test/package/table/test_table04.rb +46 -0
- data/test/package/table/test_table05.rb +46 -0
- data/test/package/table/test_table06.rb +52 -0
- data/test/package/table/test_table07.rb +47 -0
- data/test/package/table/test_table08.rb +53 -0
- data/test/package/table/test_table09.rb +65 -0
- data/test/package/table/test_table10.rb +45 -0
- data/test/package/table/test_table11.rb +60 -0
- data/test/package/table/test_table12.rb +60 -0
- data/test/package/table/test_write_auto_filter.rb +16 -0
- data/test/package/table/test_write_table_column.rb +15 -0
- data/test/package/table/test_write_table_style_info.rb +25 -0
- data/test/package/table/test_write_xml_declaration.rb +15 -0
- data/test/perl_output/a_simple.xlsx +0 -0
- data/test/perl_output/array_formula.xlsx +0 -0
- data/test/perl_output/chart_secondary_axis.xlsx +0 -0
- data/test/perl_output/data_validate.xlsx +0 -0
- data/test/perl_output/date_time.xlsx +0 -0
- data/test/perl_output/demo.xlsx +0 -0
- data/test/perl_output/formats.xlsx +0 -0
- data/test/perl_output/headers.xlsx +0 -0
- data/test/perl_output/outline_collapsed.xlsx +0 -0
- data/test/perl_output/panes.xlsx +0 -0
- data/test/perl_output/regions.xlsx +0 -0
- data/test/perl_output/shape1.xlsx +0 -0
- data/test/perl_output/shape2.xlsx +0 -0
- data/test/perl_output/shape3.xlsx +0 -0
- data/test/perl_output/shape4.xlsx +0 -0
- data/test/perl_output/shape5.xlsx +0 -0
- data/test/perl_output/shape6.xlsx +0 -0
- data/test/perl_output/shape7.xlsx +0 -0
- data/test/perl_output/shape8.xlsx +0 -0
- data/test/perl_output/shape_all.xlsx +0 -0
- data/test/perl_output/stats.xlsx +0 -0
- data/test/perl_output/stats_ext.xlsx +0 -0
- data/test/perl_output/stocks.xlsx +0 -0
- data/test/perl_output/tables.xlsx +0 -0
- data/test/regression/images/blue.jpg +0 -0
- data/test/regression/images/blue.png +0 -0
- data/test/regression/images/grey.jpg +0 -0
- data/test/regression/images/grey.png +0 -0
- data/test/regression/images/red.bmp +0 -0
- data/test/regression/images/red.jpg +0 -0
- data/test/regression/images/red.png +0 -0
- data/test/regression/images/yellow.jpg +0 -0
- data/test/regression/images/yellow.png +0 -0
- data/test/regression/test_array_formula01.rb +31 -0
- data/test/regression/test_array_formula02.rb +32 -0
- data/test/regression/test_autofilter00.rb +84 -0
- data/test/regression/test_autofilter01.rb +86 -0
- data/test/regression/test_autofilter02.rb +104 -0
- data/test/regression/test_autofilter03.rb +104 -0
- data/test/regression/test_autofilter04.rb +107 -0
- data/test/regression/test_autofilter05.rb +108 -0
- data/test/regression/test_autofilter06.rb +108 -0
- data/test/regression/test_autofilter07.rb +107 -0
- data/test/regression/test_chart_area01.rb +45 -0
- data/test/regression/test_chart_area02.rb +45 -0
- data/test/regression/test_chart_area03.rb +45 -0
- data/test/regression/test_chart_axis01.rb +46 -0
- data/test/regression/test_chart_axis02.rb +46 -0
- data/test/regression/test_chart_axis03.rb +68 -0
- data/test/regression/test_chart_axis04.rb +53 -0
- data/test/regression/test_chart_axis05.rb +48 -0
- data/test/regression/test_chart_axis06.rb +50 -0
- data/test/regression/test_chart_axis07.rb +54 -0
- data/test/regression/test_chart_axis08.rb +53 -0
- data/test/regression/test_chart_axis09.rb +47 -0
- data/test/regression/test_chart_axis10.rb +53 -0
- data/test/regression/test_chart_axis11.rb +47 -0
- data/test/regression/test_chart_axis12.rb +47 -0
- data/test/regression/test_chart_axis13.rb +53 -0
- data/test/regression/test_chart_axis14.rb +67 -0
- data/test/regression/test_chart_axis15.rb +48 -0
- data/test/regression/test_chart_axis16.rb +70 -0
- data/test/regression/test_chart_axis17.rb +46 -0
- data/test/regression/test_chart_axis18.rb +44 -0
- data/test/regression/test_chart_axis19.rb +46 -0
- data/test/regression/test_chart_axis20.rb +46 -0
- data/test/regression/test_chart_axis21.rb +50 -0
- data/test/regression/test_chart_bar01.rb +44 -0
- data/test/regression/test_chart_bar02.rb +55 -0
- data/test/regression/test_chart_bar03.rb +67 -0
- data/test/regression/test_chart_bar04.rb +70 -0
- data/test/regression/test_chart_bar05.rb +43 -0
- data/test/regression/test_chart_bar06.rb +50 -0
- data/test/regression/test_chart_bar07.rb +54 -0
- data/test/regression/test_chart_bar08.rb +44 -0
- data/test/regression/test_chart_bar09.rb +43 -0
- data/test/regression/test_chart_bar10.rb +47 -0
- data/test/regression/test_chart_bar11.rb +71 -0
- data/test/regression/test_chart_bar12.rb +43 -0
- data/test/regression/test_chart_bar13.rb +53 -0
- data/test/regression/test_chart_bar14.rb +63 -0
- data/test/regression/test_chart_bar15.rb +53 -0
- data/test/regression/test_chart_bar16.rb +51 -0
- data/test/regression/test_chart_bar17.rb +47 -0
- data/test/regression/test_chart_bar18.rb +58 -0
- data/test/regression/test_chart_bar19.rb +50 -0
- data/test/regression/test_chart_bar20.rb +47 -0
- data/test/regression/test_chart_bar21.rb +53 -0
- data/test/regression/test_chart_bar22.rb +68 -0
- data/test/regression/test_chart_bar23.rb +62 -0
- data/test/regression/test_chart_bar24.rb +46 -0
- data/test/regression/test_chart_blank01.rb +41 -0
- data/test/regression/test_chart_blank02.rb +41 -0
- data/test/regression/test_chart_blank03.rb +41 -0
- data/test/regression/test_chart_blank04.rb +41 -0
- data/test/regression/test_chart_blank05.rb +46 -0
- data/test/regression/test_chart_blank06.rb +41 -0
- data/test/regression/test_chart_column01.rb +43 -0
- data/test/regression/test_chart_column02.rb +45 -0
- data/test/regression/test_chart_column03.rb +45 -0
- data/test/regression/test_chart_column04.rb +45 -0
- data/test/regression/test_chart_column05.rb +39 -0
- data/test/regression/test_chart_column06.rb +46 -0
- data/test/regression/test_chart_crossing01.rb +50 -0
- data/test/regression/test_chart_crossing02.rb +48 -0
- data/test/regression/test_chart_crossing03.rb +53 -0
- data/test/regression/test_chart_crossing04.rb +53 -0
- data/test/regression/test_chart_format01.rb +44 -0
- data/test/regression/test_chart_format02.rb +45 -0
- data/test/regression/test_chart_format03.rb +46 -0
- data/test/regression/test_chart_format04.rb +45 -0
- data/test/regression/test_chart_format05.rb +45 -0
- data/test/regression/test_chart_format06.rb +52 -0
- data/test/regression/test_chart_format07.rb +57 -0
- data/test/regression/test_chart_format08.rb +52 -0
- data/test/regression/test_chart_format09.rb +56 -0
- data/test/regression/test_chart_format10.rb +59 -0
- data/test/regression/test_chart_format11.rb +63 -0
- data/test/regression/test_chart_format12.rb +60 -0
- data/test/regression/test_chart_format13.rb +52 -0
- data/test/regression/test_chart_format14.rb +56 -0
- data/test/regression/test_chart_format15.rb +54 -0
- data/test/regression/test_chart_format16.rb +57 -0
- data/test/regression/test_chart_format17.rb +40 -0
- data/test/regression/test_chart_format18.rb +44 -0
- data/test/regression/test_chart_line01.rb +39 -0
- data/test/regression/test_chart_line02.rb +45 -0
- data/test/regression/test_chart_name01.rb +46 -0
- data/test/regression/test_chart_name02.rb +58 -0
- data/test/regression/test_chart_name03.rb +58 -0
- data/test/regression/test_chart_pie01.rb +36 -0
- data/test/regression/test_chart_scatter01.rb +45 -0
- data/test/regression/test_chart_scatter02.rb +49 -0
- data/test/regression/test_chart_scatter03.rb +49 -0
- data/test/regression/test_chart_scatter04.rb +49 -0
- data/test/regression/test_chart_scatter05.rb +49 -0
- data/test/regression/test_chart_scatter06.rb +51 -0
- data/test/regression/test_chart_scatter07.rb +60 -0
- data/test/regression/test_chart_sparse01.rb +54 -0
- data/test/regression/test_chart_stock01.rb +72 -0
- data/test/regression/test_chart_stock02.rb +73 -0
- data/test/regression/test_chart_str01.rb +48 -0
- data/test/regression/test_chart_str02.rb +52 -0
- data/test/regression/test_chartsheet01.rb +46 -0
- data/test/regression/test_chartsheet02.rb +50 -0
- data/test/regression/test_chartsheet03.rb +48 -0
- data/test/regression/test_chartsheet04.rb +48 -0
- data/test/regression/test_chartsheet05.rb +48 -0
- data/test/regression/test_chartsheet06.rb +48 -0
- data/test/regression/test_chartsheet07.rb +57 -0
- data/test/regression/test_chartsheet08.rb +61 -0
- data/test/regression/test_chartsheet09.rb +52 -0
- data/test/regression/test_comment01.rb +27 -0
- data/test/regression/test_comment02.rb +28 -0
- data/test/regression/test_comment03.rb +32 -0
- data/test/regression/test_comment04.rb +37 -0
- data/test/regression/test_comment06.rb +34 -0
- data/test/regression/test_comment07.rb +36 -0
- data/test/regression/test_comment08.rb +36 -0
- data/test/regression/test_comment09.rb +32 -0
- data/test/regression/test_comment10.rb +31 -0
- data/test/regression/test_cond_format01.rb +46 -0
- data/test/regression/test_cond_format02.rb +41 -0
- data/test/regression/test_cond_format03.rb +52 -0
- data/test/regression/test_cond_format04.rb +51 -0
- data/test/regression/test_cond_format05.rb +41 -0
- data/test/regression/test_cond_format06.rb +45 -0
- data/test/regression/test_cond_format07.rb +62 -0
- data/test/regression/test_cond_format08.rb +46 -0
- data/test/regression/test_cond_format10.rb +43 -0
- data/test/regression/test_cond_format11.rb +47 -0
- data/test/regression/test_cond_format12.rb +47 -0
- data/test/regression/test_custom_colors01.rb +33 -0
- data/test/regression/test_date_1904_01.rb +36 -0
- data/test/regression/test_date_1904_02.rb +39 -0
- data/test/regression/test_defined_name01.rb +47 -0
- data/test/regression/test_escapes01.rb +37 -0
- data/test/regression/test_escapes02.rb +33 -0
- data/test/regression/test_escapes03.rb +34 -0
- data/test/regression/test_fit_to_pages01.rb +37 -0
- data/test/regression/test_fit_to_pages02.rb +37 -0
- data/test/regression/test_fit_to_pages03.rb +37 -0
- data/test/regression/test_fit_to_pages04.rb +37 -0
- data/test/regression/test_fit_to_pages05.rb +37 -0
- data/test/regression/test_format01.rb +35 -0
- data/test/regression/test_format02.rb +47 -0
- data/test/regression/test_format03.rb +31 -0
- data/test/regression/test_format04.rb +41 -0
- data/test/regression/test_gridlines01.rb +36 -0
- data/test/regression/test_hyperlink01.rb +23 -0
- data/test/regression/test_hyperlink02.rb +27 -0
- data/test/regression/test_hyperlink03.rb +32 -0
- data/test/regression/test_hyperlink04.rb +31 -0
- data/test/regression/test_hyperlink05.rb +26 -0
- data/test/regression/test_hyperlink06.rb +25 -0
- data/test/regression/test_hyperlink07.rb +24 -0
- data/test/regression/test_hyperlink08.rb +24 -0
- data/test/regression/test_hyperlink09.rb +25 -0
- data/test/regression/test_hyperlink10.rb +24 -0
- data/test/regression/test_hyperlink11.rb +24 -0
- data/test/regression/test_hyperlink12.rb +25 -0
- data/test/regression/test_hyperlink13.rb +24 -0
- data/test/regression/test_hyperlink14.rb +24 -0
- data/test/regression/test_hyperlink15.rb +26 -0
- data/test/regression/test_hyperlink16.rb +26 -0
- data/test/regression/test_hyperlink17.rb +27 -0
- data/test/regression/test_hyperlink18.rb +27 -0
- data/test/regression/test_image01.rb +23 -0
- data/test/regression/test_image02.rb +23 -0
- data/test/regression/test_image03.rb +23 -0
- data/test/regression/test_image04.rb +23 -0
- data/test/regression/test_image05.rb +26 -0
- data/test/regression/test_image06.rb +36 -0
- data/test/regression/test_image07.rb +25 -0
- data/test/regression/test_outline01.rb +86 -0
- data/test/regression/test_outline02.rb +89 -0
- data/test/regression/test_outline03.rb +59 -0
- data/test/regression/test_outline04.rb +55 -0
- data/test/regression/test_outline05.rb +90 -0
- data/test/regression/test_outline06.rb +89 -0
- data/test/regression/test_page_breaks01.rb +36 -0
- data/test/regression/test_page_breaks02.rb +36 -0
- data/test/regression/test_page_breaks03.rb +36 -0
- data/test/regression/test_page_breaks04.rb +36 -0
- data/test/regression/test_page_breaks05.rb +36 -0
- data/test/regression/test_page_breaks06.rb +37 -0
- data/test/regression/test_page_view01.rb +36 -0
- data/test/regression/test_panes01.rb +66 -0
- data/test/regression/test_print_across01.rb +37 -0
- data/test/regression/test_print_area01.rb +36 -0
- data/test/regression/test_print_area02.rb +36 -0
- data/test/regression/test_print_area03.rb +36 -0
- data/test/regression/test_print_area04.rb +36 -0
- data/test/regression/test_print_area05.rb +36 -0
- data/test/regression/test_print_area06.rb +36 -0
- data/test/regression/test_print_area07.rb +37 -0
- data/test/regression/test_print_options01.rb +36 -0
- data/test/regression/test_print_options02.rb +36 -0
- data/test/regression/test_print_options03.rb +36 -0
- data/test/regression/test_print_options04.rb +36 -0
- data/test/regression/test_print_options05.rb +39 -0
- data/test/regression/test_print_options06.rb +37 -0
- data/test/regression/test_print_scale01.rb +37 -0
- data/test/regression/test_print_scale02.rb +37 -0
- data/test/regression/test_properties01.rb +40 -0
- data/test/regression/test_repeat01.rb +36 -0
- data/test/regression/test_repeat02.rb +36 -0
- data/test/regression/test_repeat03.rb +37 -0
- data/test/regression/test_repeat04.rb +36 -0
- data/test/regression/test_repeat05.rb +43 -0
- data/test/regression/test_rich_string01.rb +28 -0
- data/test/regression/test_rich_string02.rb +28 -0
- data/test/regression/test_rich_string03.rb +28 -0
- data/test/regression/test_rich_string04.rb +28 -0
- data/test/regression/test_rich_string05.rb +30 -0
- data/test/regression/test_rich_string06.rb +27 -0
- data/test/regression/test_rich_string07.rb +33 -0
- data/test/regression/test_rich_string08.rb +29 -0
- data/test/regression/test_rich_string09.rb +31 -0
- data/test/regression/test_rich_string10.rb +30 -0
- data/test/regression/test_rich_string11.rb +29 -0
- data/test/regression/test_row_col_format01.rb +24 -0
- data/test/regression/test_row_col_format02.rb +25 -0
- data/test/regression/test_row_col_format03.rb +24 -0
- data/test/regression/test_row_col_format04.rb +25 -0
- data/test/regression/test_row_col_format05.rb +26 -0
- data/test/regression/test_row_col_format06.rb +29 -0
- data/test/regression/test_row_col_format07.rb +24 -0
- data/test/regression/test_row_col_format08.rb +34 -0
- data/test/regression/test_row_col_format09.rb +33 -0
- data/test/regression/test_row_col_format10.rb +24 -0
- data/test/regression/test_row_col_format11.rb +23 -0
- data/test/regression/test_row_col_format12.rb +23 -0
- data/test/regression/test_row_col_format13.rb +28 -0
- data/test/regression/test_row_col_format14.rb +28 -0
- data/test/regression/test_shape_connect01.rb +46 -0
- data/test/regression/test_shape_connect02.rb +42 -0
- data/test/regression/test_shape_connect03.rb +78 -0
- data/test/regression/test_shape_connect04.rb +75 -0
- data/test/regression/test_shape_scale01.rb +47 -0
- data/test/regression/test_shape_stencil01.rb +44 -0
- data/test/regression/test_shared_strings01.rb +34 -0
- data/test/regression/test_shared_strings02.rb +47 -0
- data/test/regression/test_simple01.rb +24 -0
- data/test/regression/test_simple02.rb +32 -0
- data/test/regression/test_tab_color01.rb +29 -0
- data/test/regression/test_table01.rb +27 -0
- data/test/regression/test_table02.rb +37 -0
- data/test/regression/test_table03.rb +30 -0
- data/test/regression/test_table04.rb +34 -0
- data/test/regression/test_table05.rb +38 -0
- data/test/regression/test_table06.rb +41 -0
- data/test/regression/test_table07.rb +29 -0
- data/test/regression/test_table08.rb +48 -0
- data/test/regression/test_table09.rb +65 -0
- data/test/regression/test_table10.rb +68 -0
- data/test/regression/test_table11.rb +37 -0
- data/test/regression/test_table12.rb +36 -0
- data/test/regression/test_table13.rb +51 -0
- data/test/regression/test_table14.rb +51 -0
- data/test/regression/xlsx_files/array_formula01.xlsx +0 -0
- data/test/regression/xlsx_files/array_formula02.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter00.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter01.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter02.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter03.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter04.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter05.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter06.xlsx +0 -0
- data/test/regression/xlsx_files/autofilter07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_area01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_area02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_area03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_area04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis08.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis09.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis10.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis11.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis12.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis13.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis14.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis15.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis16.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis17.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis18.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis19.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis20.xlsx +0 -0
- data/test/regression/xlsx_files/chart_axis21.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar08.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar09.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar10.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar11.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar12.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar13.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar14.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar15.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar16.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar17.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar18.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar19.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar20.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar21.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar22.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar23.xlsx +0 -0
- data/test/regression/xlsx_files/chart_bar24.xlsx +0 -0
- data/test/regression/xlsx_files/chart_blank01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_blank02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_blank03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_blank04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_blank05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_blank06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_column01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_column02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_column03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_column04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_column05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_column06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_crossing01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_crossing02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_crossing03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_crossing04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format08.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format09.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format10.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format11.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format12.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format13.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format14.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format15.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format16.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format17.xlsx +0 -0
- data/test/regression/xlsx_files/chart_format18.xlsx +0 -0
- data/test/regression/xlsx_files/chart_line01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_line02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_name01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_name02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_name03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_pie01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter03.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter04.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter05.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter06.xlsx +0 -0
- data/test/regression/xlsx_files/chart_scatter07.xlsx +0 -0
- data/test/regression/xlsx_files/chart_sparse01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_stock01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_stock02.xlsx +0 -0
- data/test/regression/xlsx_files/chart_str01.xlsx +0 -0
- data/test/regression/xlsx_files/chart_str02.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet01.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet02.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet03.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet04.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet05.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet06.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet07.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet08.xlsx +0 -0
- data/test/regression/xlsx_files/chartsheet09.xlsx +0 -0
- data/test/regression/xlsx_files/comment01.xlsx +0 -0
- data/test/regression/xlsx_files/comment02.xlsx +0 -0
- data/test/regression/xlsx_files/comment03.xlsx +0 -0
- data/test/regression/xlsx_files/comment04.xlsx +0 -0
- data/test/regression/xlsx_files/comment05.xlsx +0 -0
- data/test/regression/xlsx_files/comment06.xlsx +0 -0
- data/test/regression/xlsx_files/comment07.xlsx +0 -0
- data/test/regression/xlsx_files/comment08.xlsx +0 -0
- data/test/regression/xlsx_files/comment09.xlsx +0 -0
- data/test/regression/xlsx_files/comment10.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format01.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format02.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format03.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format04.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format05.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format06.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format07.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format08.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format10.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format11.xlsx +0 -0
- data/test/regression/xlsx_files/cond_format12.xlsx +0 -0
- data/test/regression/xlsx_files/custom_colors01.xlsx +0 -0
- data/test/regression/xlsx_files/date_1904_01.xlsx +0 -0
- data/test/regression/xlsx_files/date_1904_02.xlsx +0 -0
- data/test/regression/xlsx_files/defined_name01.xlsx +0 -0
- data/test/regression/xlsx_files/escapes01.xlsx +0 -0
- data/test/regression/xlsx_files/escapes02.xlsx +0 -0
- data/test/regression/xlsx_files/escapes03.xlsx +0 -0
- data/test/regression/xlsx_files/filehandle01.xlsx +0 -0
- data/test/regression/xlsx_files/fit_to_pages01.xlsx +0 -0
- data/test/regression/xlsx_files/fit_to_pages02.xlsx +0 -0
- data/test/regression/xlsx_files/fit_to_pages03.xlsx +0 -0
- data/test/regression/xlsx_files/fit_to_pages04.xlsx +0 -0
- data/test/regression/xlsx_files/fit_to_pages05.xlsx +0 -0
- data/test/regression/xlsx_files/format01.xlsx +0 -0
- data/test/regression/xlsx_files/format02.xlsx +0 -0
- data/test/regression/xlsx_files/format03.xlsx +0 -0
- data/test/regression/xlsx_files/format04.xlsx +0 -0
- data/test/regression/xlsx_files/gridlines01.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink01.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink02.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink03.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink04.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink05.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink06.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink07.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink08.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink09.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink10.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink11.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink12.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink13.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink14.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink15.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink16.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink17.xlsx +0 -0
- data/test/regression/xlsx_files/hyperlink18.xlsx +0 -0
- data/test/regression/xlsx_files/image01.xlsx +0 -0
- data/test/regression/xlsx_files/image02.xlsx +0 -0
- data/test/regression/xlsx_files/image03.xlsx +0 -0
- data/test/regression/xlsx_files/image04.xlsx +0 -0
- data/test/regression/xlsx_files/image05.xlsx +0 -0
- data/test/regression/xlsx_files/image06.xlsx +0 -0
- data/test/regression/xlsx_files/image07.xlsx +0 -0
- data/test/regression/xlsx_files/outline01.xlsx +0 -0
- data/test/regression/xlsx_files/outline02.xlsx +0 -0
- data/test/regression/xlsx_files/outline03.xlsx +0 -0
- data/test/regression/xlsx_files/outline04.xlsx +0 -0
- data/test/regression/xlsx_files/outline05.xlsx +0 -0
- data/test/regression/xlsx_files/outline06.xlsx +0 -0
- data/test/regression/xlsx_files/page_breaks01.xlsx +0 -0
- data/test/regression/xlsx_files/page_breaks02.xlsx +0 -0
- data/test/regression/xlsx_files/page_breaks03.xlsx +0 -0
- data/test/regression/xlsx_files/page_breaks04.xlsx +0 -0
- data/test/regression/xlsx_files/page_breaks05.xlsx +0 -0
- data/test/regression/xlsx_files/page_breaks06.xlsx +0 -0
- data/test/regression/xlsx_files/page_view01.xlsx +0 -0
- data/test/regression/xlsx_files/panes01.xlsx +0 -0
- data/test/regression/xlsx_files/print_across01.xlsx +0 -0
- data/test/regression/xlsx_files/print_area01.xlsx +0 -0
- data/test/regression/xlsx_files/print_area02.xlsx +0 -0
- data/test/regression/xlsx_files/print_area03.xlsx +0 -0
- data/test/regression/xlsx_files/print_area04.xlsx +0 -0
- data/test/regression/xlsx_files/print_area05.xlsx +0 -0
- data/test/regression/xlsx_files/print_area06.xlsx +0 -0
- data/test/regression/xlsx_files/print_area07.xlsx +0 -0
- data/test/regression/xlsx_files/print_options01.xlsx +0 -0
- data/test/regression/xlsx_files/print_options02.xlsx +0 -0
- data/test/regression/xlsx_files/print_options03.xlsx +0 -0
- data/test/regression/xlsx_files/print_options04.xlsx +0 -0
- data/test/regression/xlsx_files/print_options05.xlsx +0 -0
- data/test/regression/xlsx_files/print_options06.xlsx +0 -0
- data/test/regression/xlsx_files/print_scale01.xlsx +0 -0
- data/test/regression/xlsx_files/print_scale02.xlsx +0 -0
- data/test/regression/xlsx_files/properties01.xlsx +0 -0
- data/test/regression/xlsx_files/repeat01.xlsx +0 -0
- data/test/regression/xlsx_files/repeat02.xlsx +0 -0
- data/test/regression/xlsx_files/repeat03.xlsx +0 -0
- data/test/regression/xlsx_files/repeat04.xlsx +0 -0
- data/test/regression/xlsx_files/repeat05.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string01.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string02.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string03.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string04.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string05.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string06.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string07.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string08.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string09.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string10.xlsx +0 -0
- data/test/regression/xlsx_files/rich_string11.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format01.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format02.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format03.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format04.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format05.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format06.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format07.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format08.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format09.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format10.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format11.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format12.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format13.xlsx +0 -0
- data/test/regression/xlsx_files/row_col_format14.xlsx +0 -0
- data/test/regression/xlsx_files/shape_connect01.xlsx +0 -0
- data/test/regression/xlsx_files/shape_connect02.xlsx +0 -0
- data/test/regression/xlsx_files/shape_connect03.xlsx +0 -0
- data/test/regression/xlsx_files/shape_connect04.xlsx +0 -0
- data/test/regression/xlsx_files/shape_scale01.xlsx +0 -0
- data/test/regression/xlsx_files/shape_stencil01.xlsx +0 -0
- data/test/regression/xlsx_files/shared_strings01.xlsx +0 -0
- data/test/regression/xlsx_files/shared_strings02.xlsx +0 -0
- data/test/regression/xlsx_files/simple01.xlsx +0 -0
- data/test/regression/xlsx_files/simple02.xlsx +0 -0
- data/test/regression/xlsx_files/tab_color01.xlsx +0 -0
- data/test/regression/xlsx_files/table01.xlsx +0 -0
- data/test/regression/xlsx_files/table02.xlsx +0 -0
- data/test/regression/xlsx_files/table03.xlsx +0 -0
- data/test/regression/xlsx_files/table04.xlsx +0 -0
- data/test/regression/xlsx_files/table05.xlsx +0 -0
- data/test/regression/xlsx_files/table06.xlsx +0 -0
- data/test/regression/xlsx_files/table07.xlsx +0 -0
- data/test/regression/xlsx_files/table08.xlsx +0 -0
- data/test/regression/xlsx_files/table09.xlsx +0 -0
- data/test/regression/xlsx_files/table10.xlsx +0 -0
- data/test/regression/xlsx_files/table11.xlsx +0 -0
- data/test/regression/xlsx_files/table12.xlsx +0 -0
- data/test/regression/xlsx_files/table13.xlsx +0 -0
- data/test/regression/xlsx_files/table14.xlsx +0 -0
- data/test/test_example_match.rb +2386 -889
- data/test/workbook/test_write_defined_names.rb +1 -1
- data/test/worksheet/test_cond_format_01.rb +82 -0
- data/test/worksheet/test_cond_format_02.rb +87 -0
- data/test/worksheet/test_cond_format_03.rb +97 -0
- data/test/worksheet/test_cond_format_04.rb +85 -0
- data/test/worksheet/test_cond_format_05.rb +96 -0
- data/test/worksheet/test_cond_format_06.rb +106 -0
- data/test/worksheet/test_cond_format_07.rb +116 -0
- data/test/worksheet/test_cond_format_08.rb +115 -0
- data/test/worksheet/test_cond_format_09.rb +108 -0
- data/test/worksheet/test_cond_format_10.rb +83 -0
- data/test/worksheet/test_cond_format_11.rb +85 -0
- data/test/worksheet/test_cond_format_12.rb +133 -0
- data/test/worksheet/test_cond_format_13.rb +135 -0
- data/test/worksheet/test_cond_format_14.rb +132 -0
- data/test/worksheet/test_cond_format_15.rb +93 -0
- data/test/worksheet/test_cond_format_16.rb +138 -0
- data/test/worksheet/test_cond_format_17.rb +141 -0
- data/test/worksheet/test_cond_format_18.rb +135 -0
- data/test/worksheet/test_cond_format_19.rb +139 -0
- data/test/worksheet/test_write_array_formula_01.rb +3 -4
- data/test/worksheet/test_write_data_validation_01.rb +1 -1
- data/test/worksheet/test_write_data_validation_02.rb +2 -2
- data/test/worksheet/test_write_methods.rb +6 -1
- data/test/worksheet/test_write_page_setup.rb +1 -1
- data/test/worksheet/test_write_sheet_view.rb +1 -1
- data/write_xlsx.gemspec +644 -9
- metadata +649 -22
- data/test/chart/test_write_chart_space.rb +0 -15
data/examples/shape2.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# modify shapes properties in an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape2.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
worksheet.hide_gridlines(2)
|
20
|
+
|
21
|
+
plain = workbook.add_shape(
|
22
|
+
:type => 'smileyFace',
|
23
|
+
:text => "Plain",
|
24
|
+
:width => 100,
|
25
|
+
:height => 100
|
26
|
+
)
|
27
|
+
|
28
|
+
bbformat = workbook.add_format(
|
29
|
+
:color => 'red',
|
30
|
+
:font => 'Lucida Calligraphy'
|
31
|
+
)
|
32
|
+
|
33
|
+
bbformat.set_bold
|
34
|
+
bbformat.set_underline
|
35
|
+
bbformat.set_italic
|
36
|
+
|
37
|
+
decor = workbook.add_shape(
|
38
|
+
:type => 'smileyFace',
|
39
|
+
:text => 'Decorated',
|
40
|
+
:rotation => 45,
|
41
|
+
:width => 200,
|
42
|
+
:height => 100,
|
43
|
+
:format => bbformat,
|
44
|
+
:line_type => 'sysDot',
|
45
|
+
:line_weight => 3,
|
46
|
+
:fill => 'FFFF00',
|
47
|
+
:line => '3366FF'
|
48
|
+
)
|
49
|
+
|
50
|
+
worksheet.insert_shape('A1', plain, 50, 50)
|
51
|
+
worksheet.insert_shape('A1', decor, 250, 50)
|
52
|
+
|
53
|
+
workbook.close
|
data/examples/shape3.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# scale shapes in an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape3.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
normal = workbook.add_shape(
|
20
|
+
:name => 'chip',
|
21
|
+
:type => 'diamond',
|
22
|
+
:text => 'Normal',
|
23
|
+
:width => 100,
|
24
|
+
:height => 100
|
25
|
+
)
|
26
|
+
|
27
|
+
worksheet.insert_shape('A1', normal, 50, 50)
|
28
|
+
normal[:text] = 'Scaled 3w x 2h'
|
29
|
+
normal[:name] = 'Hope'
|
30
|
+
worksheet.insert_shape('A1', normal, 250, 50, 3, 2)
|
31
|
+
|
32
|
+
workbook.close
|
data/examples/shape4.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# demonstrate stenciling in an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape4.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
worksheet.hide_gridlines(2)
|
20
|
+
|
21
|
+
type = 'rect'
|
22
|
+
shape = workbook.add_shape(
|
23
|
+
:type => type,
|
24
|
+
:width => 90,
|
25
|
+
:height => 90
|
26
|
+
)
|
27
|
+
|
28
|
+
(1..10).each do |n|
|
29
|
+
# Change the last 5 rectangles to stars. Previously
|
30
|
+
# inserted shapes stay as rectangles.
|
31
|
+
type = 'star5' if n == 6
|
32
|
+
shape[:type] = type
|
33
|
+
shape[:text] = "#{type} #{n}"
|
34
|
+
worksheet.insert_shape('A1', shape, n * 100, 50)
|
35
|
+
end
|
36
|
+
|
37
|
+
stencil = workbook.add_shape(
|
38
|
+
:stencil => 1, # The default.
|
39
|
+
:width => 90,
|
40
|
+
:height => 90,
|
41
|
+
:text => 'started as a box'
|
42
|
+
)
|
43
|
+
worksheet.insert_shape('A1', stencil, 100, 150)
|
44
|
+
|
45
|
+
stencil[:stencil] = 0
|
46
|
+
worksheet.insert_shape('A1', stencil, 200, 150)
|
47
|
+
worksheet.insert_shape('A1', stencil, 300, 150)
|
48
|
+
|
49
|
+
# Ooopa! Changed my mind.
|
50
|
+
# Change the rectangle to an ellipse (circle),
|
51
|
+
# for the last two shapes.
|
52
|
+
stencil[:type] = 'ellipse'
|
53
|
+
stencil[:text] = 'Now its a circle'
|
54
|
+
|
55
|
+
workbook.close
|
data/examples/shape5.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# add shapes (objects and top/bottom connectors) to an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape5.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
s1 = workbook.add_shape(
|
20
|
+
:type => 'ellipse',
|
21
|
+
:width => 60,
|
22
|
+
:height => 60
|
23
|
+
)
|
24
|
+
worksheet.insert_shape('A1', s1, 50, 50)
|
25
|
+
|
26
|
+
s2 = workbook.add_shape(
|
27
|
+
:type => 'plus',
|
28
|
+
:width => 20,
|
29
|
+
:height => 20
|
30
|
+
)
|
31
|
+
worksheet.insert_shape('A1', s2, 250, 200)
|
32
|
+
|
33
|
+
# Create a connector to link the two shapes.
|
34
|
+
cxn_shape = workbook.add_shape(:type => 'bentConnector3')
|
35
|
+
|
36
|
+
# Link the start of the connector to the right side.
|
37
|
+
cxn_shape[:start] = s1[:id]
|
38
|
+
cxn_shape[:start_index] = 4 # 4th connection pt, clockwise from top(0).
|
39
|
+
cxn_shape[:start_side] = 'b' # r)ight or b)ottom.
|
40
|
+
|
41
|
+
# Link the end of the connector to the left side.
|
42
|
+
cxn_shape[:end] = s2[:id]
|
43
|
+
cxn_shape[:end_index] = 0 # clockwise from top(0).
|
44
|
+
cxn_shape[:end_side] = 't' # t)op.
|
45
|
+
|
46
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
47
|
+
|
48
|
+
workbook.close
|
data/examples/shape6.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# add shapes (objects and right/left connectors) to an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape6.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
s1 = workbook.add_shape(
|
20
|
+
:type => 'chevron',
|
21
|
+
:width => 60,
|
22
|
+
:height => 60
|
23
|
+
)
|
24
|
+
worksheet.insert_shape('A1', s1, 50, 50)
|
25
|
+
|
26
|
+
s2 = workbook.add_shape(
|
27
|
+
:type => 'pentagon',
|
28
|
+
:width => 20,
|
29
|
+
:height => 20
|
30
|
+
)
|
31
|
+
worksheet.insert_shape('A1', s2, 250, 200)
|
32
|
+
|
33
|
+
# Create a connector to link the two shapes.
|
34
|
+
cxn_shape = workbook.add_shape(:type => 'curvedConnector3')
|
35
|
+
|
36
|
+
# Link the start of the connector to the right side.
|
37
|
+
cxn_shape[:start] = s1[:id]
|
38
|
+
cxn_shape[:start_index] = 2 # 2nd connection pt, clockwise from top(0).
|
39
|
+
cxn_shape[:start_side] = 'r' # r)ight or b)ottom.
|
40
|
+
|
41
|
+
# Link the end of the connector to the left side.
|
42
|
+
cxn_shape[:end] = s2[:id]
|
43
|
+
cxn_shape[:end_index] = 4 # 4th connection pt, clockwise from top(0).
|
44
|
+
cxn_shape[:end_side] = 'l' # l)eft or t)op.
|
45
|
+
|
46
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
47
|
+
|
48
|
+
workbook.close
|
data/examples/shape7.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# add shapes and one-to-many connectors to an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape7.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
# Add a circle, with centered text. c is for circle, not center.
|
20
|
+
cw = 60
|
21
|
+
ch = 60
|
22
|
+
cx = 210
|
23
|
+
cy = 190
|
24
|
+
|
25
|
+
ellipse = workbook.add_shape(
|
26
|
+
:type => 'ellipse',
|
27
|
+
:id => 2,
|
28
|
+
:text => "Hello\nWorld",
|
29
|
+
:width => cw,
|
30
|
+
:height => ch
|
31
|
+
)
|
32
|
+
worksheet.insert_shape('A1', ellipse, cx, cy)
|
33
|
+
|
34
|
+
# Add a plus sign at 4 different positions around the circle.
|
35
|
+
pw = 20
|
36
|
+
ph = 20
|
37
|
+
px = 120
|
38
|
+
py = 250
|
39
|
+
|
40
|
+
plus = workbook.add_shape(
|
41
|
+
:type => 'plus',
|
42
|
+
:id => 3,
|
43
|
+
:width => pw,
|
44
|
+
:height => ph
|
45
|
+
)
|
46
|
+
|
47
|
+
p1 = worksheet.insert_shape('A1', plus, 350, 350)
|
48
|
+
p2 = worksheet.insert_shape('A1', plus, 150, 350)
|
49
|
+
p3 = worksheet.insert_shape('A1', plus, 350, 150)
|
50
|
+
plus[:adjustments] = 35 # change shape of plus symbol.
|
51
|
+
p4 = worksheet.insert_shape('A1', plus, 150, 150)
|
52
|
+
|
53
|
+
cxn_shape = workbook.add_shape(:type => 'bentConnector3', :fill => 0)
|
54
|
+
|
55
|
+
cxn_shape[:start] = ellipse[:id]
|
56
|
+
cxn_shape[:start_index] = 4 # 4th connection pt, clockwise from top(0).
|
57
|
+
cxn_shape[:start_side] = 'b' # r)ight or b)ottom.
|
58
|
+
|
59
|
+
cxn_shape[:end] = p1[:id]
|
60
|
+
cxn_shape[:end_index] = 0
|
61
|
+
cxn_shape[:end_side] = 't' # l)eft or t)op.
|
62
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
63
|
+
|
64
|
+
cxn_shape[:end] = p2[:id]
|
65
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
66
|
+
|
67
|
+
cxn_shape[:end] = p3[:id]
|
68
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
69
|
+
|
70
|
+
cxn_shape[:end] = p4[:id]
|
71
|
+
cxn_shape[:adjustments] = [-50, 45, 120]
|
72
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
73
|
+
|
74
|
+
workbook.close
|
data/examples/shape8.rb
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# -*- coding: utf-8 -*-
|
3
|
+
|
4
|
+
#######################################################################
|
5
|
+
#
|
6
|
+
# A simple example of how to use the WriteXLSX gem to
|
7
|
+
# add shapes and one-to-many connectors to an Excel xlsx file.
|
8
|
+
#
|
9
|
+
# reverse('c'), May 2012, John McNamara, jmcnamara@cpan.org
|
10
|
+
# converted to Ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
11
|
+
#
|
12
|
+
|
13
|
+
require 'rubygems'
|
14
|
+
require 'write_xlsx'
|
15
|
+
|
16
|
+
workbook = WriteXLSX.new('shape8.xlsx')
|
17
|
+
worksheet = workbook.add_worksheet
|
18
|
+
|
19
|
+
# Add a circle, with centered text. c is for circle, not center.
|
20
|
+
cw = 60
|
21
|
+
ch = 60
|
22
|
+
cx = 210
|
23
|
+
cy = 190
|
24
|
+
|
25
|
+
ellipse = workbook.add_shape(
|
26
|
+
:type => 'ellipse',
|
27
|
+
:id => 2,
|
28
|
+
:text => "Hello\nWorld",
|
29
|
+
:width => cw,
|
30
|
+
:height => ch
|
31
|
+
)
|
32
|
+
worksheet.insert_shape('A1', ellipse, cx, cy)
|
33
|
+
|
34
|
+
# Add a plus sign at 4 different positionos around the circle.
|
35
|
+
pw = 20
|
36
|
+
ph = 20
|
37
|
+
px = 120
|
38
|
+
py = 250
|
39
|
+
|
40
|
+
plus = workbook.add_shape(
|
41
|
+
:type => 'plus',
|
42
|
+
:id => 3,
|
43
|
+
:width => pw,
|
44
|
+
:height => ph
|
45
|
+
)
|
46
|
+
|
47
|
+
p1 = worksheet.insert_shape('A1', plus, 350, 150)
|
48
|
+
p2 = worksheet.insert_shape('A1', plus, 350, 350)
|
49
|
+
p3 = worksheet.insert_shape('A1', plus, 150, 350)
|
50
|
+
p4 = worksheet.insert_shape('A1', plus, 150, 150)
|
51
|
+
|
52
|
+
cxn_shape = workbook.add_shape(:type => 'bentConnector3', :fill => 0)
|
53
|
+
|
54
|
+
cxn_shape[:start] = ellipse[:id]
|
55
|
+
cxn_shape[:start_index] = 2 # 2nd connection pt, clockwise from top(0).
|
56
|
+
cxn_shape[:start_side] = 'r' # r)ight or b)ottom.
|
57
|
+
|
58
|
+
cxn_shape[:end] = p1[:id]
|
59
|
+
cxn_shape[:end_index] = 3 # 3rd connection point on plus, right side
|
60
|
+
cxn_shape[:end_side] = 'l' # l)eft or t)op.
|
61
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
62
|
+
|
63
|
+
cxn_shape[:end] = p2[:id]
|
64
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
65
|
+
|
66
|
+
cxn_shape[:end] = p3[:id]
|
67
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
68
|
+
|
69
|
+
cxn_shape[:end] = p4[:id]
|
70
|
+
cxn_shape[:adjustments] = [-50, 45, 120]
|
71
|
+
worksheet.insert_shape('A1', cxn_shape, 0, 0)
|
72
|
+
|
73
|
+
workbook.close
|
@@ -0,0 +1,241 @@
|
|
1
|
+
#######################################################################
|
2
|
+
#
|
3
|
+
# A simple example of how to use the WriteXLSX gem to
|
4
|
+
# add all shapes (as currently implemented) to an Excel xlsx file.
|
5
|
+
#
|
6
|
+
# The list at the end consists of all the shape types defined as
|
7
|
+
# ST_ShapeType in ECMA-376, Office Open XML File Formats Part 4.
|
8
|
+
#
|
9
|
+
# The grouping by worksheet name is for illustration only. It isn't
|
10
|
+
# part of the ECMA-376 standard.
|
11
|
+
#
|
12
|
+
# reverse(c), May 2012, John McNamara, jmcnamara@cpan.org
|
13
|
+
# converted to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
|
14
|
+
#
|
15
|
+
require 'write_xlsx'
|
16
|
+
|
17
|
+
shapes_list = <<EOS
|
18
|
+
Action actionButtonBackPrevious
|
19
|
+
Action actionButtonBeginning
|
20
|
+
Action actionButtonBlank
|
21
|
+
Action actionButtonDocument
|
22
|
+
Action actionButtonEnd
|
23
|
+
Action actionButtonForwardNext
|
24
|
+
Action actionButtonHelp
|
25
|
+
Action actionButtonHome
|
26
|
+
Action actionButtonInformation
|
27
|
+
Action actionButtonMovie
|
28
|
+
Action actionButtonReturn
|
29
|
+
Action actionButtonSound
|
30
|
+
Arrow bentArrow
|
31
|
+
Arrow bentUpArrow
|
32
|
+
Arrow circularArrow
|
33
|
+
Arrow curvedDownArrow
|
34
|
+
Arrow curvedLeftArrow
|
35
|
+
Arrow curvedRightArrow
|
36
|
+
Arrow curvedUpArrow
|
37
|
+
Arrow downArrow
|
38
|
+
Arrow leftArrow
|
39
|
+
Arrow leftCircularArrow
|
40
|
+
Arrow leftRightArrow
|
41
|
+
Arrow leftRightCircularArrow
|
42
|
+
Arrow leftRightUpArrow
|
43
|
+
Arrow leftUpArrow
|
44
|
+
Arrow notchedRightArrow
|
45
|
+
Arrow quadArrow
|
46
|
+
Arrow rightArrow
|
47
|
+
Arrow stripedRightArrow
|
48
|
+
Arrow swooshArrow
|
49
|
+
Arrow upArrow
|
50
|
+
Arrow upDownArrow
|
51
|
+
Arrow uturnArrow
|
52
|
+
Basic blockArc
|
53
|
+
Basic can
|
54
|
+
Basic chevron
|
55
|
+
Basic cube
|
56
|
+
Basic decagon
|
57
|
+
Basic diamond
|
58
|
+
Basic dodecagon
|
59
|
+
Basic donut
|
60
|
+
Basic ellipse
|
61
|
+
Basic funnel
|
62
|
+
Basic gear6
|
63
|
+
Basic gear9
|
64
|
+
Basic heart
|
65
|
+
Basic heptagon
|
66
|
+
Basic hexagon
|
67
|
+
Basic homePlate
|
68
|
+
Basic lightningBolt
|
69
|
+
Basic line
|
70
|
+
Basic lineInv
|
71
|
+
Basic moon
|
72
|
+
Basic nonIsoscelesTrapezoid
|
73
|
+
Basic noSmoking
|
74
|
+
Basic octagon
|
75
|
+
Basic parallelogram
|
76
|
+
Basic pentagon
|
77
|
+
Basic pie
|
78
|
+
Basic pieWedge
|
79
|
+
Basic plaque
|
80
|
+
Basic rect
|
81
|
+
Basic round1Rect
|
82
|
+
Basic round2DiagRect
|
83
|
+
Basic round2SameRect
|
84
|
+
Basic roundRect
|
85
|
+
Basic rtTriangle
|
86
|
+
Basic smileyFace
|
87
|
+
Basic snip1Rect
|
88
|
+
Basic snip2DiagRect
|
89
|
+
Basic snip2SameRect
|
90
|
+
Basic snipRoundRect
|
91
|
+
Basic star10
|
92
|
+
Basic star12
|
93
|
+
Basic star16
|
94
|
+
Basic star24
|
95
|
+
Basic star32
|
96
|
+
Basic star4
|
97
|
+
Basic star5
|
98
|
+
Basic star6
|
99
|
+
Basic star7
|
100
|
+
Basic star8
|
101
|
+
Basic sun
|
102
|
+
Basic teardrop
|
103
|
+
Basic trapezoid
|
104
|
+
Basic triangle
|
105
|
+
Callout accentBorderCallout1
|
106
|
+
Callout accentBorderCallout2
|
107
|
+
Callout accentBorderCallout3
|
108
|
+
Callout accentCallout1
|
109
|
+
Callout accentCallout2
|
110
|
+
Callout accentCallout3
|
111
|
+
Callout borderCallout1
|
112
|
+
Callout borderCallout2
|
113
|
+
Callout borderCallout3
|
114
|
+
Callout callout1
|
115
|
+
Callout callout2
|
116
|
+
Callout callout3
|
117
|
+
Callout cloudCallout
|
118
|
+
Callout downArrowCallout
|
119
|
+
Callout leftArrowCallout
|
120
|
+
Callout leftRightArrowCallout
|
121
|
+
Callout quadArrowCallout
|
122
|
+
Callout rightArrowCallout
|
123
|
+
Callout upArrowCallout
|
124
|
+
Callout upDownArrowCallout
|
125
|
+
Callout wedgeEllipseCallout
|
126
|
+
Callout wedgeRectCallout
|
127
|
+
Callout wedgeRoundRectCallout
|
128
|
+
Chart chartPlus
|
129
|
+
Chart chartStar
|
130
|
+
Chart chartX
|
131
|
+
Connector bentConnector2
|
132
|
+
Connector bentConnector3
|
133
|
+
Connector bentConnector4
|
134
|
+
Connector bentConnector5
|
135
|
+
Connector curvedConnector2
|
136
|
+
Connector curvedConnector3
|
137
|
+
Connector curvedConnector4
|
138
|
+
Connector curvedConnector5
|
139
|
+
Connector straightConnector1
|
140
|
+
FlowChart flowChartAlternateProcess
|
141
|
+
FlowChart flowChartCollate
|
142
|
+
FlowChart flowChartConnector
|
143
|
+
FlowChart flowChartDecision
|
144
|
+
FlowChart flowChartDelay
|
145
|
+
FlowChart flowChartDisplay
|
146
|
+
FlowChart flowChartDocument
|
147
|
+
FlowChart flowChartExtract
|
148
|
+
FlowChart flowChartInputOutput
|
149
|
+
FlowChart flowChartInternalStorage
|
150
|
+
FlowChart flowChartMagneticDisk
|
151
|
+
FlowChart flowChartMagneticDrum
|
152
|
+
FlowChart flowChartMagneticTape
|
153
|
+
FlowChart flowChartManualInput
|
154
|
+
FlowChart flowChartManualOperation
|
155
|
+
FlowChart flowChartMerge
|
156
|
+
FlowChart flowChartMultidocument
|
157
|
+
FlowChart flowChartOfflineStorage
|
158
|
+
FlowChart flowChartOffpageConnector
|
159
|
+
FlowChart flowChartOnlineStorage
|
160
|
+
FlowChart flowChartOr
|
161
|
+
FlowChart flowChartPredefinedProcess
|
162
|
+
FlowChart flowChartPreparation
|
163
|
+
FlowChart flowChartProcess
|
164
|
+
FlowChart flowChartPunchedCard
|
165
|
+
FlowChart flowChartPunchedTape
|
166
|
+
FlowChart flowChartSort
|
167
|
+
FlowChart flowChartSummingJunction
|
168
|
+
FlowChart flowChartTerminator
|
169
|
+
Math mathDivide
|
170
|
+
Math mathEqual
|
171
|
+
Math mathMinus
|
172
|
+
Math mathMultiply
|
173
|
+
Math mathNotEqual
|
174
|
+
Math mathPlus
|
175
|
+
Star_Banner arc
|
176
|
+
Star_Banner bevel
|
177
|
+
Star_Banner bracePair
|
178
|
+
Star_Banner bracketPair
|
179
|
+
Star_Banner chord
|
180
|
+
Star_Banner cloud
|
181
|
+
Star_Banner corner
|
182
|
+
Star_Banner diagStripe
|
183
|
+
Star_Banner doubleWave
|
184
|
+
Star_Banner ellipseRibbon
|
185
|
+
Star_Banner ellipseRibbon2
|
186
|
+
Star_Banner foldedCorner
|
187
|
+
Star_Banner frame
|
188
|
+
Star_Banner halfFrame
|
189
|
+
Star_Banner horizontalScroll
|
190
|
+
Star_Banner irregularSeal1
|
191
|
+
Star_Banner irregularSeal2
|
192
|
+
Star_Banner leftBrace
|
193
|
+
Star_Banner leftBracket
|
194
|
+
Star_Banner leftRightRibbon
|
195
|
+
Star_Banner plus
|
196
|
+
Star_Banner ribbon
|
197
|
+
Star_Banner ribbon2
|
198
|
+
Star_Banner rightBrace
|
199
|
+
Star_Banner rightBracket
|
200
|
+
Star_Banner verticalScroll
|
201
|
+
Star_Banner wave
|
202
|
+
Tabs cornerTabs
|
203
|
+
Tabs plaqueTabs
|
204
|
+
Tabs squareTabs
|
205
|
+
EOS
|
206
|
+
|
207
|
+
#
|
208
|
+
# main
|
209
|
+
#
|
210
|
+
|
211
|
+
workbook = WriteXLSX.new('shape_all.xlsx')
|
212
|
+
|
213
|
+
worksheet = nil
|
214
|
+
last_sheet = ''
|
215
|
+
row = 0
|
216
|
+
|
217
|
+
shapes_list.each_line do |line|
|
218
|
+
line = line.chomp
|
219
|
+
next unless line =~ /^\w/ # Skip blank lines and comments.
|
220
|
+
|
221
|
+
sheet, name = line.split(/\t/)
|
222
|
+
if last_sheet != sheet
|
223
|
+
worksheet = workbook.add_worksheet(sheet)
|
224
|
+
row = 2
|
225
|
+
end
|
226
|
+
last_sheet = sheet
|
227
|
+
shape = workbook.add_shape(
|
228
|
+
:type => name,
|
229
|
+
:text => name,
|
230
|
+
:width => 90,
|
231
|
+
:height => 90
|
232
|
+
)
|
233
|
+
|
234
|
+
# Connectors can not have labels, so write the connector name in the cell
|
235
|
+
# to the left.
|
236
|
+
worksheet.write(row, 0, name ) if sheet == 'Connector'
|
237
|
+
worksheet.insert_shape(row, 2, shape, 0, 0)
|
238
|
+
row += 5
|
239
|
+
end
|
240
|
+
|
241
|
+
workbook.close
|