write_xlsx 0.85.9 → 1.09.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1390) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +53 -1
  4. data/Changes +242 -0
  5. data/LICENSE.txt +1 -1
  6. data/README.md +5 -5
  7. data/examples/a_simple.rb +2 -7
  8. data/examples/add_vba_project.rb +1 -1
  9. data/examples/array_formula.rb +1 -1
  10. data/examples/background.rb +19 -0
  11. data/examples/chart_area.rb +5 -2
  12. data/examples/chart_bar.rb +5 -2
  13. data/examples/chart_clustered.rb +1 -1
  14. data/examples/chart_column.rb +5 -2
  15. data/examples/chart_combined.rb +4 -2
  16. data/examples/chart_data_labels.rb +320 -0
  17. data/examples/chart_data_table.rb +9 -3
  18. data/examples/chart_data_tools.rb +25 -7
  19. data/examples/chart_doughnut.rb +17 -5
  20. data/examples/chart_gauge.rb +73 -0
  21. data/examples/chart_line.rb +90 -12
  22. data/examples/chart_pareto.rb +1 -1
  23. data/examples/chart_pie.rb +9 -3
  24. data/examples/chart_radar.rb +13 -4
  25. data/examples/chart_scatter.rb +5 -2
  26. data/examples/chart_secondary_axis.rb +5 -2
  27. data/examples/chart_stock.rb +1 -1
  28. data/examples/chart_styles.rb +1 -1
  29. data/examples/colors.rb +48 -1
  30. data/examples/comments2.rb +1 -1
  31. data/examples/conditional_format.rb +79 -1
  32. data/examples/data_validate.rb +8 -8
  33. data/examples/date_time.rb +1 -1
  34. data/examples/demo.rb +5 -8
  35. data/examples/formats.rb +1 -1
  36. data/examples/headers.rb +1 -1
  37. data/examples/hide_row_col.rb +1 -1
  38. data/examples/hide_sheet.rb +1 -1
  39. data/examples/hyperlink1.rb +5 -12
  40. data/examples/ignore_errors.rb +39 -0
  41. data/examples/indent.rb +1 -1
  42. data/examples/keep_leading_zeros.rb +17 -0
  43. data/examples/macros.rb +1 -1
  44. data/examples/merge1.rb +1 -1
  45. data/examples/merge2.rb +1 -1
  46. data/examples/merge3.rb +1 -1
  47. data/examples/merge4.rb +1 -1
  48. data/examples/merge5.rb +1 -1
  49. data/examples/merge6.rb +1 -1
  50. data/examples/outline.rb +1 -1
  51. data/examples/outline_collapsed.rb +1 -1
  52. data/examples/panes.rb +2 -2
  53. data/examples/properties.rb +1 -1
  54. data/examples/regions.rb +1 -1
  55. data/examples/rich_strings.rb +1 -1
  56. data/examples/right_to_left.rb +1 -1
  57. data/examples/shape1.rb +1 -1
  58. data/examples/shape2.rb +1 -1
  59. data/examples/shape3.rb +1 -1
  60. data/examples/shape4.rb +1 -1
  61. data/examples/shape5.rb +1 -1
  62. data/examples/shape6.rb +1 -1
  63. data/examples/shape7.rb +1 -1
  64. data/examples/shape8.rb +1 -1
  65. data/examples/shape_all.rb +1 -1
  66. data/examples/sparklines1.rb +1 -1
  67. data/examples/sparklines2.rb +1 -1
  68. data/examples/stats.rb +1 -1
  69. data/examples/stats_ext.rb +1 -1
  70. data/examples/stocks.rb +1 -1
  71. data/examples/tab_colors.rb +2 -2
  72. data/examples/tables.rb +78 -43
  73. data/examples/update_range_format_with_params.rb +33 -0
  74. data/lib/write_xlsx/chart/area.rb +1 -1
  75. data/lib/write_xlsx/chart/axis.rb +37 -12
  76. data/lib/write_xlsx/chart/bar.rb +1 -1
  77. data/lib/write_xlsx/chart/caption.rb +3 -1
  78. data/lib/write_xlsx/chart/column.rb +1 -1
  79. data/lib/write_xlsx/chart/doughnut.rb +1 -1
  80. data/lib/write_xlsx/chart/legend.rb +14 -0
  81. data/lib/write_xlsx/chart/line.rb +16 -2
  82. data/lib/write_xlsx/chart/pie.rb +32 -15
  83. data/lib/write_xlsx/chart/radar.rb +1 -1
  84. data/lib/write_xlsx/chart/scatter.rb +1 -16
  85. data/lib/write_xlsx/chart/series.rb +138 -18
  86. data/lib/write_xlsx/chart/stock.rb +1 -1
  87. data/lib/write_xlsx/chart.rb +365 -277
  88. data/lib/write_xlsx/chartsheet.rb +38 -10
  89. data/lib/write_xlsx/drawing.rb +190 -71
  90. data/lib/write_xlsx/format.rb +41 -201
  91. data/lib/write_xlsx/package/app.rb +17 -5
  92. data/lib/write_xlsx/package/button.rb +8 -8
  93. data/lib/write_xlsx/package/comments.rb +73 -68
  94. data/lib/write_xlsx/package/conditional_format.rb +367 -46
  95. data/lib/write_xlsx/package/content_types.rb +28 -9
  96. data/lib/write_xlsx/package/core.rb +13 -11
  97. data/lib/write_xlsx/package/custom.rb +125 -0
  98. data/lib/write_xlsx/package/metadata.rb +159 -0
  99. data/lib/write_xlsx/package/packager.rb +48 -0
  100. data/lib/write_xlsx/package/relationships.rb +4 -4
  101. data/lib/write_xlsx/package/shared_strings.rb +6 -6
  102. data/lib/write_xlsx/package/styles.rb +102 -39
  103. data/lib/write_xlsx/package/table.rb +83 -36
  104. data/lib/write_xlsx/package/theme.rb +1 -1
  105. data/lib/write_xlsx/package/vml.rb +63 -62
  106. data/lib/write_xlsx/package/xml_writer_simple.rb +3 -2
  107. data/lib/write_xlsx/shape.rb +21 -18
  108. data/lib/write_xlsx/sheets.rb +18 -16
  109. data/lib/write_xlsx/sparkline.rb +341 -341
  110. data/lib/write_xlsx/utility.rb +414 -53
  111. data/lib/write_xlsx/version.rb +1 -1
  112. data/lib/write_xlsx/workbook.rb +396 -699
  113. data/lib/write_xlsx/worksheet/cell_data.rb +46 -3
  114. data/lib/write_xlsx/worksheet/data_validation.rb +53 -50
  115. data/lib/write_xlsx/worksheet/hyperlink.rb +29 -50
  116. data/lib/write_xlsx/worksheet/page_setup.rb +12 -12
  117. data/lib/write_xlsx/worksheet.rb +1043 -4366
  118. data/test/chart/test_add_series.rb +11 -1
  119. data/test/chart/test_process_names.rb +1 -1
  120. data/test/chart/test_write_a_latin.rb +1 -1
  121. data/test/chart/test_write_auto.rb +1 -1
  122. data/test/chart/test_write_ax_id.rb +1 -1
  123. data/test/chart/test_write_ax_pos.rb +1 -1
  124. data/test/chart/test_write_cross_ax.rb +1 -1
  125. data/test/chart/test_write_crosses.rb +1 -1
  126. data/test/chart/test_write_d_lbls.rb +1 -1
  127. data/test/chart/test_write_format_code.rb +1 -1
  128. data/test/chart/test_write_idx.rb +1 -1
  129. data/test/chart/test_write_label_align.rb +1 -1
  130. data/test/chart/test_write_label_offset.rb +1 -1
  131. data/test/chart/test_write_lang.rb +1 -1
  132. data/test/chart/test_write_layout.rb +1 -1
  133. data/test/chart/test_write_legend.rb +1 -1
  134. data/test/chart/test_write_legend_pos.rb +10 -2
  135. data/test/chart/test_write_major_gridlines.rb +1 -1
  136. data/test/chart/test_write_marker.rb +1 -1
  137. data/test/chart/test_write_marker_size.rb +1 -1
  138. data/test/chart/test_write_marker_value.rb +1 -1
  139. data/test/chart/test_write_num_cache.rb +1 -1
  140. data/test/chart/test_write_number_format.rb +2 -3
  141. data/test/chart/test_write_order.rb +1 -1
  142. data/test/chart/test_write_orientation.rb +1 -1
  143. data/test/chart/test_write_page_margins.rb +1 -1
  144. data/test/chart/test_write_page_setup.rb +1 -1
  145. data/test/chart/test_write_plot_vis_only.rb +1 -1
  146. data/test/chart/test_write_pt.rb +1 -1
  147. data/test/chart/test_write_pt_count.rb +1 -1
  148. data/test/chart/test_write_series_formula.rb +1 -1
  149. data/test/chart/test_write_style.rb +1 -1
  150. data/test/chart/test_write_symbol.rb +1 -1
  151. data/test/chart/test_write_tick_lbl_pos.rb +1 -1
  152. data/test/chart/test_write_v.rb +1 -1
  153. data/test/chartsheet/test_chartsheet01.rb +1 -1
  154. data/test/chartsheet/test_write_sheet_protection.rb +91 -0
  155. data/test/drawing/test_drawing_chart_01.rb +7 -3
  156. data/test/drawing/test_drawing_image_01.rb +13 -4
  157. data/test/drawing/test_drawing_shape_01.rb +9 -6
  158. data/test/drawing/test_drawing_shape_02.rb +13 -6
  159. data/test/drawing/test_drawing_shape_03.rb +9 -6
  160. data/test/drawing/test_drawing_shape_04.rb +9 -25
  161. data/test/drawing/test_drawing_shape_05.rb +9 -6
  162. data/test/drawing/test_drawing_shape_06.rb +12 -7
  163. data/test/drawing/test_drawing_shape_07.rb +12 -7
  164. data/test/drawing/test_write_a_graphic_frame_locks.rb +2 -2
  165. data/test/drawing/test_write_c_chart.rb +2 -2
  166. data/test/drawing/test_write_c_nv_graphic_frame_pr.rb +2 -2
  167. data/test/drawing/test_write_c_nv_pr.rb +2 -2
  168. data/test/drawing/test_write_col.rb +2 -2
  169. data/test/drawing/test_write_col_off.rb +2 -2
  170. data/test/drawing/test_write_pos.rb +2 -2
  171. data/test/drawing/test_write_row.rb +2 -2
  172. data/test/drawing/test_write_row_off.rb +2 -2
  173. data/test/drawing/{test_write_ext.rb → test_write_xdr_ext.rb} +3 -3
  174. data/test/drawing/test_write_xfrm_extension.rb +2 -2
  175. data/test/drawing/test_write_xfrm_offset.rb +2 -2
  176. data/test/helper.rb +8 -3
  177. data/test/package/app/test_app01.rb +1 -1
  178. data/test/package/app/test_app02.rb +1 -1
  179. data/test/package/app/test_app03.rb +1 -1
  180. data/test/package/comments/test_comments_01.rb +54 -0
  181. data/test/package/comments/test_comments_02.rb +54 -0
  182. data/test/package/content_types/test_content_types.rb +1 -1
  183. data/test/package/content_types/test_write_default.rb +1 -1
  184. data/test/package/content_types/test_write_override.rb +1 -1
  185. data/test/package/core/test_core01.rb +1 -1
  186. data/test/package/core/test_core02.rb +1 -1
  187. data/test/package/relationships/test_relationships.rb +1 -1
  188. data/test/package/relationships/test_sheet_rels.rb +1 -1
  189. data/test/package/shared_strings/test_shared_strings01.rb +1 -1
  190. data/test/package/shared_strings/test_shared_strings02.rb +1 -1
  191. data/test/package/shared_strings/test_write_si.rb +1 -7
  192. data/test/package/styles/test_styles_01.rb +1 -1
  193. data/test/package/styles/test_styles_02.rb +1 -1
  194. data/test/package/styles/test_styles_03.rb +1 -1
  195. data/test/package/styles/test_styles_04.rb +1 -1
  196. data/test/package/styles/test_styles_05.rb +1 -1
  197. data/test/package/styles/test_styles_06.rb +1 -1
  198. data/test/package/styles/test_styles_07.rb +1 -1
  199. data/test/package/styles/test_styles_08.rb +1 -1
  200. data/test/package/styles/test_styles_09.rb +1 -1
  201. data/test/package/table/test_table01.rb +3 -3
  202. data/test/package/table/test_table02.rb +2 -2
  203. data/test/package/table/test_table03.rb +2 -2
  204. data/test/package/table/test_table04.rb +2 -2
  205. data/test/package/table/test_table05.rb +2 -2
  206. data/test/package/table/test_table06.rb +2 -2
  207. data/test/package/table/test_table07.rb +2 -2
  208. data/test/package/table/test_table08.rb +2 -2
  209. data/test/package/table/test_table09.rb +2 -2
  210. data/test/package/table/test_table10.rb +2 -2
  211. data/test/package/table/test_table11.rb +2 -2
  212. data/test/package/table/test_table12.rb +2 -2
  213. data/test/package/table/test_table13.rb +1 -1
  214. data/test/package/table/test_write_auto_filter.rb +1 -1
  215. data/test/package/table/test_write_table_column.rb +1 -1
  216. data/test/package/table/test_write_table_style_info.rb +1 -1
  217. data/test/package/vml/test_write_auto_fill.rb +1 -1
  218. data/test/package/vml/test_write_div.rb +1 -1
  219. data/test/package/vml/test_write_idmap.rb +1 -1
  220. data/test/package/vml/test_write_path.rb +1 -1
  221. data/test/package/vml/test_write_shapelayout.rb +1 -1
  222. data/test/package/vml/test_write_shapetype.rb +1 -1
  223. data/test/package/vml/test_write_stroke.rb +1 -1
  224. data/test/perl_output/background.xlsx +0 -0
  225. data/test/perl_output/chart_data_labels.xlsx +0 -0
  226. data/test/perl_output/chart_gauge.xlsx +0 -0
  227. data/test/perl_output/chart_line.xlsx +0 -0
  228. data/test/perl_output/comments2.xlsx +0 -0
  229. data/test/perl_output/formats.xlsx +0 -0
  230. data/test/perl_output/ignore_errors.xlsx +0 -0
  231. data/test/perl_output/keep_leading_zeros.xlsx +0 -0
  232. data/test/perl_output/multi_line.xlsx +0 -0
  233. data/test/perl_output/tables.xlsx +0 -0
  234. data/test/regression/_test_hyperlink31.rb +26 -0
  235. data/test/regression/disabled_test_vml04.rb +1 -1
  236. data/test/regression/images/happy.jpg +0 -0
  237. data/test/regression/images/logo.gif +0 -0
  238. data/test/regression/images/logo.jpg +0 -0
  239. data/test/regression/images/red.gif +0 -0
  240. data/test/regression/images/red2.png +0 -0
  241. data/test/regression/images/red_208.png +0 -0
  242. data/test/regression/images/zero_dpi.jpg +0 -0
  243. data/test/regression/test_array_formula01.rb +1 -1
  244. data/test/regression/test_array_formula02.rb +1 -1
  245. data/test/regression/test_array_formula03.rb +36 -0
  246. data/test/regression/test_array_formula04.rb +31 -0
  247. data/test/regression/test_autofilter00.rb +1 -1
  248. data/test/regression/test_autofilter01.rb +1 -1
  249. data/test/regression/test_autofilter02.rb +1 -1
  250. data/test/regression/test_autofilter03.rb +1 -1
  251. data/test/regression/test_autofilter04.rb +1 -1
  252. data/test/regression/test_autofilter05.rb +1 -1
  253. data/test/regression/test_autofilter06.rb +1 -1
  254. data/test/regression/test_autofilter07.rb +1 -1
  255. data/test/regression/test_autofilter08.rb +110 -0
  256. data/test/regression/test_autofilter09.rb +110 -0
  257. data/test/regression/test_autofilter10.rb +110 -0
  258. data/test/regression/test_background01.rb +23 -0
  259. data/test/regression/test_background02.rb +23 -0
  260. data/test/regression/test_background03.rb +24 -0
  261. data/test/regression/test_background04.rb +25 -0
  262. data/test/regression/test_background05.rb +25 -0
  263. data/test/regression/test_background06.rb +31 -0
  264. data/test/regression/test_background07.rb +37 -0
  265. data/test/regression/test_button01.rb +1 -1
  266. data/test/regression/test_button02.rb +1 -1
  267. data/test/regression/test_button03.rb +1 -1
  268. data/test/regression/test_button04.rb +1 -1
  269. data/test/regression/test_button05.rb +1 -1
  270. data/test/regression/test_button06.rb +1 -1
  271. data/test/regression/test_button07.rb +1 -1
  272. data/test/regression/test_button08.rb +1 -1
  273. data/test/regression/test_button13.rb +1 -1
  274. data/test/regression/test_button14.rb +1 -1
  275. data/test/regression/test_chart_area01.rb +1 -1
  276. data/test/regression/test_chart_area02.rb +1 -1
  277. data/test/regression/test_chart_area03.rb +1 -1
  278. data/test/regression/test_chart_area04.rb +1 -1
  279. data/test/regression/test_chart_axis01.rb +1 -1
  280. data/test/regression/test_chart_axis02.rb +1 -1
  281. data/test/regression/test_chart_axis03.rb +1 -1
  282. data/test/regression/test_chart_axis04.rb +1 -1
  283. data/test/regression/test_chart_axis05.rb +1 -1
  284. data/test/regression/test_chart_axis06.rb +1 -1
  285. data/test/regression/test_chart_axis07.rb +1 -1
  286. data/test/regression/test_chart_axis08.rb +1 -1
  287. data/test/regression/test_chart_axis09.rb +1 -1
  288. data/test/regression/test_chart_axis10.rb +1 -1
  289. data/test/regression/test_chart_axis11.rb +1 -1
  290. data/test/regression/test_chart_axis12.rb +1 -1
  291. data/test/regression/test_chart_axis13.rb +1 -1
  292. data/test/regression/test_chart_axis14.rb +1 -1
  293. data/test/regression/test_chart_axis15.rb +1 -1
  294. data/test/regression/test_chart_axis16.rb +1 -1
  295. data/test/regression/test_chart_axis17.rb +1 -1
  296. data/test/regression/test_chart_axis18.rb +1 -1
  297. data/test/regression/test_chart_axis19.rb +1 -1
  298. data/test/regression/test_chart_axis20.rb +1 -1
  299. data/test/regression/test_chart_axis21.rb +1 -1
  300. data/test/regression/test_chart_axis22.rb +1 -1
  301. data/test/regression/test_chart_axis23.rb +1 -1
  302. data/test/regression/test_chart_axis24.rb +1 -1
  303. data/test/regression/test_chart_axis25.rb +1 -1
  304. data/test/regression/test_chart_axis26.rb +11 -9
  305. data/test/regression/test_chart_axis27.rb +2 -2
  306. data/test/regression/test_chart_axis28.rb +2 -2
  307. data/test/regression/test_chart_axis29.rb +2 -2
  308. data/test/regression/test_chart_axis30.rb +1 -1
  309. data/test/regression/test_chart_axis31.rb +1 -1
  310. data/test/regression/test_chart_axis32.rb +1 -1
  311. data/test/regression/test_chart_axis33.rb +2 -2
  312. data/test/regression/test_chart_axis34.rb +1 -1
  313. data/test/regression/test_chart_axis35.rb +1 -1
  314. data/test/regression/test_chart_axis36.rb +1 -1
  315. data/test/regression/test_chart_axis37.rb +1 -1
  316. data/test/regression/test_chart_axis38.rb +1 -1
  317. data/test/regression/test_chart_axis39.rb +1 -1
  318. data/test/regression/test_chart_axis40.rb +44 -0
  319. data/test/regression/test_chart_axis41.rb +48 -0
  320. data/test/regression/test_chart_axis42.rb +44 -0
  321. data/test/regression/test_chart_axis43.rb +44 -0
  322. data/test/regression/test_chart_axis44.rb +54 -0
  323. data/test/regression/test_chart_axis45.rb +54 -0
  324. data/test/regression/test_chart_axis46.rb +54 -0
  325. data/test/regression/test_chart_axis47.rb +52 -0
  326. data/test/regression/test_chart_axis48.rb +53 -0
  327. data/test/regression/test_chart_bar01.rb +1 -1
  328. data/test/regression/test_chart_bar02.rb +1 -1
  329. data/test/regression/test_chart_bar03.rb +1 -1
  330. data/test/regression/test_chart_bar04.rb +1 -1
  331. data/test/regression/test_chart_bar05.rb +1 -1
  332. data/test/regression/test_chart_bar06.rb +1 -1
  333. data/test/regression/test_chart_bar07.rb +1 -1
  334. data/test/regression/test_chart_bar08.rb +4 -1
  335. data/test/regression/test_chart_bar09.rb +1 -1
  336. data/test/regression/test_chart_bar10.rb +1 -1
  337. data/test/regression/test_chart_bar11.rb +4 -1
  338. data/test/regression/test_chart_bar12.rb +1 -1
  339. data/test/regression/test_chart_bar13.rb +1 -1
  340. data/test/regression/test_chart_bar14.rb +4 -1
  341. data/test/regression/test_chart_bar15.rb +1 -1
  342. data/test/regression/test_chart_bar16.rb +1 -1
  343. data/test/regression/test_chart_bar17.rb +1 -1
  344. data/test/regression/test_chart_bar18.rb +1 -1
  345. data/test/regression/test_chart_bar19.rb +1 -1
  346. data/test/regression/test_chart_bar20.rb +1 -1
  347. data/test/regression/test_chart_bar21.rb +1 -1
  348. data/test/regression/test_chart_bar22.rb +1 -1
  349. data/test/regression/test_chart_bar23.rb +1 -1
  350. data/test/regression/test_chart_bar24.rb +1 -1
  351. data/test/regression/test_chart_blank01.rb +1 -1
  352. data/test/regression/test_chart_blank02.rb +1 -1
  353. data/test/regression/test_chart_blank03.rb +1 -1
  354. data/test/regression/test_chart_blank04.rb +1 -1
  355. data/test/regression/test_chart_blank05.rb +1 -1
  356. data/test/regression/test_chart_blank06.rb +1 -1
  357. data/test/regression/test_chart_chartarea01.rb +1 -1
  358. data/test/regression/test_chart_chartarea02.rb +1 -1
  359. data/test/regression/test_chart_chartarea03.rb +1 -1
  360. data/test/regression/test_chart_chartarea04.rb +1 -1
  361. data/test/regression/test_chart_chartarea05.rb +17 -18
  362. data/test/regression/test_chart_chartarea06.rb +49 -0
  363. data/test/regression/test_chart_clustered01.rb +1 -1
  364. data/test/regression/test_chart_column01.rb +1 -1
  365. data/test/regression/test_chart_column02.rb +1 -1
  366. data/test/regression/test_chart_column03.rb +1 -1
  367. data/test/regression/test_chart_column04.rb +1 -1
  368. data/test/regression/test_chart_column05.rb +1 -1
  369. data/test/regression/test_chart_column06.rb +1 -1
  370. data/test/regression/test_chart_column07.rb +1 -1
  371. data/test/regression/test_chart_column08.rb +1 -1
  372. data/test/regression/test_chart_column09.rb +1 -1
  373. data/test/regression/test_chart_column10.rb +1 -1
  374. data/test/regression/test_chart_column11.rb +1 -1
  375. data/test/regression/test_chart_column12.rb +1 -1
  376. data/test/regression/test_chart_combined01.rb +1 -1
  377. data/test/regression/test_chart_combined02.rb +1 -1
  378. data/test/regression/test_chart_combined03.rb +1 -1
  379. data/test/regression/test_chart_combined04.rb +1 -1
  380. data/test/regression/test_chart_combined05.rb +1 -1
  381. data/test/regression/test_chart_combined06.rb +1 -1
  382. data/test/regression/test_chart_combined07.rb +1 -1
  383. data/test/regression/test_chart_combined08.rb +1 -1
  384. data/test/regression/test_chart_combined09.rb +50 -0
  385. data/test/regression/test_chart_combined10.rb +43 -0
  386. data/test/regression/test_chart_combined11.rb +63 -0
  387. data/test/regression/test_chart_crossing01.rb +2 -2
  388. data/test/regression/test_chart_crossing02.rb +1 -1
  389. data/test/regression/test_chart_crossing03.rb +1 -1
  390. data/test/regression/test_chart_crossing04.rb +1 -1
  391. data/test/regression/test_chart_crossing05.rb +46 -0
  392. data/test/regression/test_chart_crossing06.rb +46 -0
  393. data/test/regression/test_chart_data_labels01.rb +1 -1
  394. data/test/regression/test_chart_data_labels02.rb +1 -1
  395. data/test/regression/test_chart_data_labels03.rb +1 -1
  396. data/test/regression/test_chart_data_labels04.rb +1 -1
  397. data/test/regression/test_chart_data_labels05.rb +1 -1
  398. data/test/regression/test_chart_data_labels06.rb +1 -1
  399. data/test/regression/test_chart_data_labels07.rb +1 -1
  400. data/test/regression/test_chart_data_labels08.rb +1 -1
  401. data/test/regression/test_chart_data_labels09.rb +1 -1
  402. data/test/regression/test_chart_data_labels10.rb +1 -1
  403. data/test/regression/test_chart_data_labels11.rb +1 -1
  404. data/test/regression/test_chart_data_labels12.rb +1 -1
  405. data/test/regression/test_chart_data_labels13.rb +1 -1
  406. data/test/regression/test_chart_data_labels14.rb +1 -1
  407. data/test/regression/test_chart_data_labels15.rb +1 -1
  408. data/test/regression/test_chart_data_labels16.rb +1 -1
  409. data/test/regression/test_chart_data_labels17.rb +1 -1
  410. data/test/regression/test_chart_data_labels18.rb +1 -1
  411. data/test/regression/test_chart_data_labels19.rb +1 -1
  412. data/test/regression/test_chart_data_labels20.rb +1 -1
  413. data/test/regression/test_chart_data_labels21.rb +1 -1
  414. data/test/regression/test_chart_data_labels22.rb +1 -1
  415. data/test/regression/test_chart_data_labels23.rb +1 -1
  416. data/test/regression/test_chart_data_labels24.rb +1 -1
  417. data/test/regression/test_chart_data_labels25.rb +61 -0
  418. data/test/regression/test_chart_data_labels26.rb +44 -0
  419. data/test/regression/test_chart_data_labels27.rb +44 -0
  420. data/test/regression/test_chart_data_labels28.rb +52 -0
  421. data/test/regression/test_chart_data_labels29.rb +43 -0
  422. data/test/regression/test_chart_data_labels30.rb +46 -0
  423. data/test/regression/test_chart_data_labels31.rb +49 -0
  424. data/test/regression/test_chart_data_labels32.rb +54 -0
  425. data/test/regression/test_chart_data_labels33.rb +52 -0
  426. data/test/regression/test_chart_data_labels34.rb +54 -0
  427. data/test/regression/test_chart_data_labels35.rb +46 -0
  428. data/test/regression/test_chart_data_labels36.rb +54 -0
  429. data/test/regression/test_chart_data_labels37.rb +51 -0
  430. data/test/regression/test_chart_data_labels38.rb +54 -0
  431. data/test/regression/test_chart_data_labels39.rb +53 -0
  432. data/test/regression/test_chart_data_labels40.rb +53 -0
  433. data/test/regression/test_chart_data_labels41.rb +54 -0
  434. data/test/regression/test_chart_data_labels42.rb +58 -0
  435. data/test/regression/test_chart_data_labels43.rb +58 -0
  436. data/test/regression/test_chart_data_labels44.rb +56 -0
  437. data/test/regression/test_chart_data_labels45.rb +57 -0
  438. data/test/regression/test_chart_data_labels46.rb +61 -0
  439. data/test/regression/test_chart_data_labels47.rb +61 -0
  440. data/test/regression/test_chart_data_labels48.rb +55 -0
  441. data/test/regression/test_chart_data_labels49.rb +55 -0
  442. data/test/regression/test_chart_data_labels50.rb +57 -0
  443. data/test/regression/test_chart_date01.rb +1 -1
  444. data/test/regression/test_chart_date02.rb +1 -1
  445. data/test/regression/test_chart_date03.rb +1 -1
  446. data/test/regression/test_chart_date04.rb +1 -1
  447. data/test/regression/test_chart_date05.rb +1 -1
  448. data/test/regression/test_chart_display_units01.rb +1 -1
  449. data/test/regression/test_chart_display_units02.rb +1 -1
  450. data/test/regression/test_chart_display_units03.rb +1 -1
  451. data/test/regression/test_chart_display_units04.rb +1 -1
  452. data/test/regression/test_chart_display_units05.rb +1 -1
  453. data/test/regression/test_chart_display_units06.rb +1 -1
  454. data/test/regression/test_chart_display_units07.rb +1 -1
  455. data/test/regression/test_chart_display_units08.rb +1 -1
  456. data/test/regression/test_chart_display_units09.rb +1 -1
  457. data/test/regression/test_chart_display_units10.rb +1 -1
  458. data/test/regression/test_chart_display_units11.rb +1 -1
  459. data/test/regression/test_chart_display_units12.rb +1 -1
  460. data/test/regression/test_chart_doughnut01.rb +1 -1
  461. data/test/regression/test_chart_doughnut02.rb +1 -1
  462. data/test/regression/test_chart_doughnut03.rb +1 -1
  463. data/test/regression/test_chart_doughnut04.rb +1 -1
  464. data/test/regression/test_chart_doughnut05.rb +1 -1
  465. data/test/regression/test_chart_doughnut06.rb +1 -1
  466. data/test/regression/test_chart_doughnut07.rb +37 -0
  467. data/test/regression/test_chart_drop_lines01.rb +1 -1
  468. data/test/regression/test_chart_drop_lines02.rb +1 -1
  469. data/test/regression/test_chart_drop_lines03.rb +1 -1
  470. data/test/regression/test_chart_drop_lines04.rb +1 -1
  471. data/test/regression/test_chart_errorbars01.rb +1 -1
  472. data/test/regression/test_chart_errorbars02.rb +1 -1
  473. data/test/regression/test_chart_errorbars03.rb +1 -1
  474. data/test/regression/test_chart_errorbars04.rb +1 -1
  475. data/test/regression/test_chart_errorbars05.rb +1 -1
  476. data/test/regression/test_chart_errorbars06.rb +1 -1
  477. data/test/regression/test_chart_errorbars07.rb +1 -1
  478. data/test/regression/test_chart_errorbars08.rb +1 -1
  479. data/test/regression/test_chart_errorbars09.rb +1 -1
  480. data/test/regression/test_chart_errorbars10.rb +1 -1
  481. data/test/regression/test_chart_font01.rb +1 -1
  482. data/test/regression/test_chart_font02.rb +1 -1
  483. data/test/regression/test_chart_font03.rb +1 -1
  484. data/test/regression/test_chart_font04.rb +1 -1
  485. data/test/regression/test_chart_font05.rb +1 -1
  486. data/test/regression/test_chart_font06.rb +1 -1
  487. data/test/regression/test_chart_font07.rb +1 -1
  488. data/test/regression/test_chart_font08.rb +1 -1
  489. data/test/regression/test_chart_font09.rb +2 -2
  490. data/test/regression/test_chart_format01.rb +1 -1
  491. data/test/regression/test_chart_format02.rb +1 -1
  492. data/test/regression/test_chart_format03.rb +1 -1
  493. data/test/regression/test_chart_format04.rb +1 -1
  494. data/test/regression/test_chart_format05.rb +1 -1
  495. data/test/regression/test_chart_format06.rb +1 -1
  496. data/test/regression/test_chart_format07.rb +1 -1
  497. data/test/regression/test_chart_format08.rb +1 -1
  498. data/test/regression/test_chart_format09.rb +1 -1
  499. data/test/regression/test_chart_format10.rb +1 -1
  500. data/test/regression/test_chart_format11.rb +1 -1
  501. data/test/regression/test_chart_format12.rb +1 -1
  502. data/test/regression/test_chart_format13.rb +1 -1
  503. data/test/regression/test_chart_format14.rb +1 -1
  504. data/test/regression/test_chart_format15.rb +1 -1
  505. data/test/regression/test_chart_format16.rb +1 -1
  506. data/test/regression/test_chart_format17.rb +1 -1
  507. data/test/regression/test_chart_format18.rb +1 -1
  508. data/test/regression/test_chart_format19.rb +1 -1
  509. data/test/regression/test_chart_format20.rb +1 -1
  510. data/test/regression/test_chart_format21.rb +47 -0
  511. data/test/regression/test_chart_format22.rb +47 -0
  512. data/test/regression/test_chart_format23.rb +47 -0
  513. data/test/regression/test_chart_format24.rb +52 -0
  514. data/test/regression/test_chart_format25.rb +46 -0
  515. data/test/regression/test_chart_format26.rb +48 -0
  516. data/test/regression/test_chart_format27.rb +58 -0
  517. data/test/regression/test_chart_format28.rb +52 -0
  518. data/test/regression/test_chart_format29.rb +59 -0
  519. data/test/regression/test_chart_format30.rb +53 -0
  520. data/test/regression/test_chart_format31.rb +60 -0
  521. data/test/regression/test_chart_gap01.rb +1 -1
  522. data/test/regression/test_chart_gap02.rb +1 -1
  523. data/test/regression/test_chart_gap03.rb +1 -1
  524. data/test/regression/test_chart_gap04.rb +1 -1
  525. data/test/regression/test_chart_gap05.rb +1 -1
  526. data/test/regression/test_chart_gradient01.rb +1 -1
  527. data/test/regression/test_chart_gradient02.rb +1 -1
  528. data/test/regression/test_chart_gradient03.rb +1 -1
  529. data/test/regression/test_chart_gradient04.rb +1 -1
  530. data/test/regression/test_chart_gradient05.rb +1 -1
  531. data/test/regression/test_chart_gradient06.rb +1 -1
  532. data/test/regression/test_chart_gradient07.rb +1 -1
  533. data/test/regression/test_chart_gradient08.rb +1 -1
  534. data/test/regression/test_chart_gradient09.rb +1 -1
  535. data/test/regression/test_chart_gradient10.rb +1 -1
  536. data/test/regression/test_chart_gradient11.rb +1 -1
  537. data/test/regression/test_chart_gradient12.rb +1 -1
  538. data/test/regression/test_chart_gradient13.rb +1 -1
  539. data/test/regression/test_chart_gridlines01.rb +1 -1
  540. data/test/regression/test_chart_gridlines02.rb +1 -1
  541. data/test/regression/test_chart_gridlines03.rb +1 -1
  542. data/test/regression/test_chart_gridlines04.rb +5 -4
  543. data/test/regression/test_chart_gridlines05.rb +1 -1
  544. data/test/regression/test_chart_gridlines06.rb +1 -1
  545. data/test/regression/test_chart_gridlines07.rb +1 -1
  546. data/test/regression/test_chart_gridlines08.rb +9 -12
  547. data/test/regression/test_chart_gridlines09.rb +1 -1
  548. data/test/regression/test_chart_layout01.rb +1 -1
  549. data/test/regression/test_chart_layout02.rb +1 -1
  550. data/test/regression/test_chart_layout03.rb +1 -1
  551. data/test/regression/test_chart_layout04.rb +1 -1
  552. data/test/regression/test_chart_layout05.rb +1 -1
  553. data/test/regression/test_chart_layout06.rb +1 -1
  554. data/test/regression/test_chart_layout07.rb +1 -1
  555. data/test/regression/test_chart_layout08.rb +1 -1
  556. data/test/regression/test_chart_legend01.rb +1 -1
  557. data/test/regression/test_chart_legend02.rb +1 -1
  558. data/test/regression/test_chart_legend03.rb +41 -0
  559. data/test/regression/test_chart_legend04.rb +41 -0
  560. data/test/regression/test_chart_legend05.rb +41 -0
  561. data/test/regression/test_chart_legend06.rb +41 -0
  562. data/test/regression/test_chart_legend07.rb +38 -0
  563. data/test/regression/test_chart_line01.rb +1 -1
  564. data/test/regression/test_chart_line02.rb +1 -1
  565. data/test/regression/test_chart_line03.rb +1 -1
  566. data/test/regression/test_chart_line04.rb +1 -1
  567. data/test/regression/test_chart_line05.rb +43 -0
  568. data/test/regression/test_chart_line06.rb +43 -0
  569. data/test/regression/test_chart_name01.rb +1 -1
  570. data/test/regression/test_chart_name02.rb +1 -1
  571. data/test/regression/test_chart_name03.rb +1 -1
  572. data/test/regression/test_chart_order01.rb +1 -1
  573. data/test/regression/test_chart_order02.rb +1 -1
  574. data/test/regression/test_chart_order03.rb +1 -1
  575. data/test/regression/test_chart_pattern01.rb +49 -0
  576. data/test/regression/test_chart_pattern02.rb +106 -0
  577. data/test/regression/test_chart_pattern03.rb +105 -0
  578. data/test/regression/test_chart_pattern04.rb +105 -0
  579. data/test/regression/test_chart_pattern05.rb +105 -0
  580. data/test/regression/test_chart_pattern06.rb +105 -0
  581. data/test/regression/test_chart_pattern07.rb +105 -0
  582. data/test/regression/test_chart_pattern08.rb +105 -0
  583. data/test/regression/test_chart_pattern09.rb +57 -0
  584. data/test/regression/test_chart_pattern10.rb +57 -0
  585. data/test/regression/test_chart_pie01.rb +1 -1
  586. data/test/regression/test_chart_pie02.rb +1 -1
  587. data/test/regression/test_chart_pie03.rb +1 -1
  588. data/test/regression/test_chart_pie04.rb +1 -1
  589. data/test/regression/test_chart_pie05.rb +1 -1
  590. data/test/regression/test_chart_points01.rb +1 -1
  591. data/test/regression/test_chart_points02.rb +1 -1
  592. data/test/regression/test_chart_points03.rb +1 -1
  593. data/test/regression/test_chart_points04.rb +1 -1
  594. data/test/regression/test_chart_points05.rb +1 -1
  595. data/test/regression/test_chart_points06.rb +1 -1
  596. data/test/regression/test_chart_radar01.rb +1 -1
  597. data/test/regression/test_chart_radar02.rb +1 -1
  598. data/test/regression/test_chart_radar03.rb +1 -1
  599. data/test/regression/test_chart_scatter01.rb +1 -1
  600. data/test/regression/test_chart_scatter02.rb +1 -1
  601. data/test/regression/test_chart_scatter03.rb +1 -1
  602. data/test/regression/test_chart_scatter04.rb +1 -1
  603. data/test/regression/test_chart_scatter05.rb +1 -1
  604. data/test/regression/test_chart_scatter06.rb +1 -1
  605. data/test/regression/test_chart_scatter07.rb +1 -1
  606. data/test/regression/test_chart_scatter08.rb +1 -1
  607. data/test/regression/test_chart_scatter09.rb +1 -1
  608. data/test/regression/test_chart_scatter10.rb +1 -1
  609. data/test/regression/test_chart_scatter11.rb +1 -1
  610. data/test/regression/test_chart_scatter12.rb +1 -1
  611. data/test/regression/test_chart_scatter13.rb +1 -1
  612. data/test/regression/test_chart_scatter14.rb +1 -1
  613. data/test/regression/test_chart_scatter15.rb +1 -1
  614. data/test/regression/test_chart_size01.rb +1 -1
  615. data/test/regression/test_chart_size02.rb +1 -1
  616. data/test/regression/test_chart_size03.rb +5 -2
  617. data/test/regression/test_chart_size04.rb +1 -1
  618. data/test/regression/test_chart_size05.rb +1 -1
  619. data/test/regression/test_chart_sparse01.rb +1 -1
  620. data/test/regression/test_chart_stock01.rb +1 -1
  621. data/test/regression/test_chart_stock02.rb +1 -1
  622. data/test/regression/test_chart_str01.rb +1 -1
  623. data/test/regression/test_chart_str02.rb +1 -1
  624. data/test/regression/test_chart_table01.rb +1 -1
  625. data/test/regression/test_chart_table02.rb +1 -1
  626. data/test/regression/test_chart_table03.rb +56 -0
  627. data/test/regression/test_chart_title01.rb +1 -1
  628. data/test/regression/test_chart_title02.rb +1 -1
  629. data/test/regression/test_chartsheet01.rb +1 -1
  630. data/test/regression/test_chartsheet02.rb +1 -1
  631. data/test/regression/test_chartsheet03.rb +1 -1
  632. data/test/regression/test_chartsheet04.rb +1 -1
  633. data/test/regression/test_chartsheet05.rb +1 -1
  634. data/test/regression/test_chartsheet06.rb +1 -1
  635. data/test/regression/test_chartsheet07.rb +1 -1
  636. data/test/regression/test_chartsheet08.rb +1 -1
  637. data/test/regression/test_chartsheet09.rb +1 -1
  638. data/test/regression/test_comment01.rb +1 -1
  639. data/test/regression/test_comment02.rb +1 -1
  640. data/test/regression/test_comment03.rb +1 -1
  641. data/test/regression/test_comment04.rb +1 -1
  642. data/test/regression/test_comment06.rb +1 -1
  643. data/test/regression/test_comment07.rb +1 -1
  644. data/test/regression/test_comment08.rb +1 -1
  645. data/test/regression/test_comment09.rb +1 -1
  646. data/test/regression/test_comment10.rb +1 -1
  647. data/test/regression/test_comment11.rb +1 -1
  648. data/test/regression/test_comment12.rb +1 -1
  649. data/test/regression/test_comment13.rb +36 -0
  650. data/test/regression/test_comment14.rb +29 -0
  651. data/test/regression/test_comment15.rb +28 -0
  652. data/test/regression/test_comment16.rb +34 -0
  653. data/test/regression/test_cond_format01.rb +1 -1
  654. data/test/regression/test_cond_format02.rb +1 -1
  655. data/test/regression/test_cond_format03.rb +1 -1
  656. data/test/regression/test_cond_format04.rb +1 -1
  657. data/test/regression/test_cond_format05.rb +1 -1
  658. data/test/regression/test_cond_format06.rb +1 -1
  659. data/test/regression/test_cond_format07.rb +1 -1
  660. data/test/regression/test_cond_format08.rb +1 -1
  661. data/test/regression/test_cond_format10.rb +1 -1
  662. data/test/regression/test_cond_format11.rb +1 -1
  663. data/test/regression/test_cond_format12.rb +1 -1
  664. data/test/regression/test_cond_format13.rb +1 -1
  665. data/test/regression/test_cond_format14.rb +42 -0
  666. data/test/regression/test_cond_format15.rb +53 -0
  667. data/test/regression/test_cond_format16.rb +53 -0
  668. data/test/regression/test_cond_format17.rb +37 -0
  669. data/test/regression/test_cond_format18.rb +136 -0
  670. data/test/regression/test_cond_format19.rb +64 -0
  671. data/test/regression/test_cond_format20.rb +43 -0
  672. data/test/regression/test_custom_colors01.rb +1 -1
  673. data/test/regression/test_data_validation01.rb +1 -1
  674. data/test/regression/test_data_validation02.rb +1 -1
  675. data/test/regression/test_data_validation03.rb +1 -1
  676. data/test/regression/test_data_validation04.rb +2 -2
  677. data/test/regression/test_data_validation05.rb +2 -2
  678. data/test/regression/test_data_validation08.rb +24 -0
  679. data/test/regression/test_date_1904_01.rb +2 -2
  680. data/test/regression/test_date_1904_02.rb +1 -1
  681. data/test/regression/test_date_examples01.rb +1 -1
  682. data/test/regression/test_default_format01.rb +1 -1
  683. data/test/regression/test_default_row01.rb +1 -1
  684. data/test/regression/test_default_row02.rb +1 -1
  685. data/test/regression/test_default_row03.rb +1 -1
  686. data/test/regression/test_default_row04.rb +1 -1
  687. data/test/regression/test_default_row05.rb +32 -0
  688. data/test/regression/test_defined_name01.rb +1 -1
  689. data/test/regression/test_defined_name02.rb +1 -1
  690. data/test/regression/test_defined_name03.rb +1 -1
  691. data/test/regression/test_defined_name04.rb +15 -15
  692. data/test/regression/test_dynamic_array01.rb +25 -0
  693. data/test/regression/test_escapes01.rb +1 -1
  694. data/test/regression/test_escapes02.rb +1 -1
  695. data/test/regression/test_escapes03.rb +1 -1
  696. data/test/regression/test_escapes04.rb +4 -1
  697. data/test/regression/test_escapes05.rb +4 -1
  698. data/test/regression/test_escapes06.rb +1 -1
  699. data/test/regression/test_escapes07.rb +4 -1
  700. data/test/regression/test_escapes08.rb +4 -1
  701. data/test/regression/test_excel2003_style01.rb +1 -1
  702. data/test/regression/test_excel2003_style02.rb +1 -1
  703. data/test/regression/test_excel2003_style03.rb +1 -1
  704. data/test/regression/test_excel2003_style04.rb +1 -1
  705. data/test/regression/test_excel2003_style05.rb +1 -1
  706. data/test/regression/test_excel2003_style06.rb +1 -1
  707. data/test/regression/test_excel2003_style07.rb +1 -1
  708. data/test/regression/test_excel2003_style08.rb +1 -1
  709. data/test/regression/test_firstsheet01.rb +1 -1
  710. data/test/regression/test_fit_to_pages01.rb +1 -1
  711. data/test/regression/test_fit_to_pages02.rb +1 -1
  712. data/test/regression/test_fit_to_pages03.rb +1 -1
  713. data/test/regression/test_fit_to_pages04.rb +1 -1
  714. data/test/regression/test_fit_to_pages05.rb +1 -1
  715. data/test/regression/test_format01.rb +1 -1
  716. data/test/regression/test_format02.rb +1 -1
  717. data/test/regression/test_format03.rb +1 -1
  718. data/test/regression/test_format04.rb +1 -1
  719. data/test/regression/test_format05.rb +1 -1
  720. data/test/regression/test_format11.rb +1 -1
  721. data/test/regression/test_format12.rb +1 -1
  722. data/test/regression/test_format13.rb +31 -0
  723. data/test/regression/test_format14.rb +26 -0
  724. data/test/regression/test_format15.rb +26 -0
  725. data/test/regression/test_format16.rb +24 -0
  726. data/test/regression/test_format17.rb +24 -0
  727. data/test/regression/test_formula_results01.rb +1 -1
  728. data/test/regression/test_gridlines01.rb +1 -1
  729. data/test/regression/test_header01.rb +1 -1
  730. data/test/regression/test_header02.rb +1 -1
  731. data/test/regression/test_header03.rb +1 -1
  732. data/test/regression/test_header04.rb +30 -0
  733. data/test/regression/test_header_image01.rb +1 -1
  734. data/test/regression/test_header_image02.rb +1 -1
  735. data/test/regression/test_header_image03.rb +1 -1
  736. data/test/regression/test_header_image04.rb +1 -1
  737. data/test/regression/test_header_image05.rb +1 -1
  738. data/test/regression/test_header_image06.rb +1 -1
  739. data/test/regression/test_header_image07.rb +1 -1
  740. data/test/regression/test_header_image08.rb +1 -1
  741. data/test/regression/test_header_image09.rb +1 -1
  742. data/test/regression/test_header_image10.rb +1 -1
  743. data/test/regression/test_header_image11.rb +1 -1
  744. data/test/regression/test_header_image12.rb +1 -1
  745. data/test/regression/test_header_image13.rb +1 -1
  746. data/test/regression/test_header_image14.rb +1 -1
  747. data/test/regression/test_header_image15.rb +36 -0
  748. data/test/regression/test_header_image16.rb +42 -0
  749. data/test/regression/test_header_image17.rb +46 -0
  750. data/test/regression/test_header_image18.rb +48 -0
  751. data/test/regression/test_header_image19.rb +36 -0
  752. data/test/regression/test_hide01.rb +1 -1
  753. data/test/regression/test_hyperlink01.rb +4 -1
  754. data/test/regression/test_hyperlink02.rb +4 -1
  755. data/test/regression/test_hyperlink03.rb +5 -1
  756. data/test/regression/test_hyperlink04.rb +4 -1
  757. data/test/regression/test_hyperlink05.rb +4 -1
  758. data/test/regression/test_hyperlink06.rb +4 -1
  759. data/test/regression/test_hyperlink07.rb +4 -1
  760. data/test/regression/test_hyperlink08.rb +4 -1
  761. data/test/regression/test_hyperlink09.rb +4 -1
  762. data/test/regression/test_hyperlink10.rb +4 -1
  763. data/test/regression/test_hyperlink11.rb +4 -1
  764. data/test/regression/test_hyperlink12.rb +4 -1
  765. data/test/regression/test_hyperlink13.rb +4 -1
  766. data/test/regression/test_hyperlink14.rb +4 -1
  767. data/test/regression/test_hyperlink15.rb +4 -1
  768. data/test/regression/test_hyperlink16.rb +4 -1
  769. data/test/regression/test_hyperlink17.rb +4 -1
  770. data/test/regression/test_hyperlink18.rb +4 -1
  771. data/test/regression/test_hyperlink20.rb +4 -1
  772. data/test/regression/test_hyperlink21.rb +4 -1
  773. data/test/regression/test_hyperlink22.rb +27 -0
  774. data/test/regression/test_hyperlink23.rb +27 -0
  775. data/test/regression/test_hyperlink24.rb +27 -0
  776. data/test/regression/test_hyperlink25.rb +30 -0
  777. data/test/regression/test_hyperlink26.rb +30 -0
  778. data/test/regression/test_hyperlink27.rb +27 -0
  779. data/test/regression/test_hyperlink28.rb +50 -0
  780. data/test/regression/test_hyperlink29.rb +27 -0
  781. data/test/regression/test_hyperlink30.rb +36 -0
  782. data/test/regression/test_hyperlink32.rb +27 -0
  783. data/test/regression/test_hyperlink33.rb +28 -0
  784. data/test/regression/test_hyperlink34.rb +33 -0
  785. data/test/regression/test_hyperlink35.rb +39 -0
  786. data/test/regression/test_hyperlink36.rb +34 -0
  787. data/test/regression/test_hyperlink37.rb +33 -0
  788. data/test/regression/test_hyperlink38.rb +27 -0
  789. data/test/regression/test_hyperlink39.rb +27 -0
  790. data/test/regression/test_hyperlink40.rb +27 -0
  791. data/test/regression/test_hyperlink41.rb +27 -0
  792. data/test/regression/test_hyperlink42.rb +27 -0
  793. data/test/regression/test_hyperlink43.rb +27 -0
  794. data/test/regression/test_hyperlink44.rb +27 -0
  795. data/test/regression/test_hyperlink45.rb +27 -0
  796. data/test/regression/test_hyperlink47.rb +27 -0
  797. data/test/regression/test_hyperlink48.rb +31 -0
  798. data/test/regression/test_hyperlink49.rb +29 -0
  799. data/test/regression/test_hyperlink50.rb +27 -0
  800. data/test/regression/test_hyperlink51.rb +27 -0
  801. data/test/regression/test_ignore_error01.rb +23 -0
  802. data/test/regression/test_ignore_error02.rb +24 -0
  803. data/test/regression/test_ignore_error03.rb +26 -0
  804. data/test/regression/test_ignore_error04.rb +26 -0
  805. data/test/regression/test_ignore_error05.rb +32 -0
  806. data/test/regression/test_ignore_error06.rb +32 -0
  807. data/test/regression/test_image01.rb +1 -1
  808. data/test/regression/test_image02.rb +1 -1
  809. data/test/regression/test_image03.rb +1 -1
  810. data/test/regression/test_image04.rb +1 -1
  811. data/test/regression/test_image05.rb +1 -1
  812. data/test/regression/test_image06.rb +6 -6
  813. data/test/regression/test_image07.rb +1 -1
  814. data/test/regression/test_image08.rb +6 -5
  815. data/test/regression/test_image09.rb +1 -1
  816. data/test/regression/test_image10.rb +1 -1
  817. data/test/regression/test_image11.rb +1 -1
  818. data/test/regression/test_image12.rb +1 -1
  819. data/test/regression/test_image13.rb +1 -1
  820. data/test/regression/test_image14.rb +1 -1
  821. data/test/regression/test_image15.rb +5 -3
  822. data/test/regression/test_image16.rb +1 -1
  823. data/test/regression/test_image17.rb +1 -1
  824. data/test/regression/test_image18.rb +1 -1
  825. data/test/regression/test_image19.rb +1 -1
  826. data/test/regression/test_image22.rb +1 -1
  827. data/test/regression/test_image23.rb +1 -1
  828. data/test/regression/test_image24.rb +1 -1
  829. data/test/regression/test_image25.rb +1 -1
  830. data/test/regression/test_image26.rb +1 -1
  831. data/test/regression/test_image27.rb +1 -1
  832. data/test/regression/test_image28.rb +27 -0
  833. data/test/regression/test_image29.rb +27 -0
  834. data/test/regression/test_image30.rb +27 -0
  835. data/test/regression/test_image31.rb +30 -0
  836. data/test/regression/test_image32.rb +28 -0
  837. data/test/regression/test_image33.rb +32 -0
  838. data/test/regression/test_image35.rb +26 -0
  839. data/test/regression/test_image36.rb +26 -0
  840. data/test/regression/test_image44.rb +28 -0
  841. data/test/regression/test_image45.rb +29 -0
  842. data/test/regression/test_image46.rb +29 -0
  843. data/test/regression/test_image47.rb +28 -0
  844. data/test/regression/test_image48.rb +32 -0
  845. data/test/regression/test_image49.rb +38 -0
  846. data/test/regression/test_image50.rb +24 -0
  847. data/test/regression/test_image51.rb +30 -0
  848. data/test/regression/test_image52.rb +26 -0
  849. data/test/regression/test_image53.rb +26 -0
  850. data/test/regression/test_image54.rb +26 -0
  851. data/test/regression/test_image55.rb +27 -0
  852. data/test/regression/test_image56.rb +23 -0
  853. data/test/regression/test_image57.rb +23 -0
  854. data/test/regression/test_landscape01.rb +1 -1
  855. data/test/regression/test_macro01.rb +1 -1
  856. data/test/regression/test_merge_cells01.rb +1 -1
  857. data/test/regression/test_merge_range01.rb +1 -1
  858. data/test/regression/test_merge_range02.rb +1 -1
  859. data/test/regression/test_merge_range03.rb +1 -1
  860. data/test/regression/test_merge_range04.rb +1 -1
  861. data/test/regression/test_merge_range05.rb +1 -1
  862. data/test/regression/test_object_position01.rb +26 -0
  863. data/test/regression/test_object_position02.rb +26 -0
  864. data/test/regression/test_object_position03.rb +26 -0
  865. data/test/regression/test_object_position04.rb +44 -0
  866. data/test/regression/test_object_position06.rb +28 -0
  867. data/test/regression/test_object_position07.rb +28 -0
  868. data/test/regression/test_object_position08.rb +47 -0
  869. data/test/regression/test_object_position09.rb +50 -0
  870. data/test/regression/test_object_position10.rb +28 -0
  871. data/test/regression/test_object_position12.rb +25 -0
  872. data/test/regression/test_object_position13.rb +25 -0
  873. data/test/regression/test_object_position14.rb +25 -0
  874. data/test/regression/test_object_position15.rb +29 -0
  875. data/test/regression/test_object_position16.rb +29 -0
  876. data/test/regression/test_object_position17.rb +29 -0
  877. data/test/regression/test_object_position18.rb +29 -0
  878. data/test/regression/test_object_position19.rb +29 -0
  879. data/test/regression/test_object_position20.rb +29 -0
  880. data/test/regression/test_outline01.rb +1 -1
  881. data/test/regression/test_outline02.rb +1 -1
  882. data/test/regression/test_outline03.rb +1 -1
  883. data/test/regression/test_outline04.rb +1 -1
  884. data/test/regression/test_outline05.rb +1 -1
  885. data/test/regression/test_outline06.rb +1 -1
  886. data/test/regression/test_page_breaks01.rb +1 -1
  887. data/test/regression/test_page_breaks02.rb +1 -1
  888. data/test/regression/test_page_breaks03.rb +1 -1
  889. data/test/regression/test_page_breaks04.rb +1 -1
  890. data/test/regression/test_page_breaks05.rb +1 -1
  891. data/test/regression/test_page_breaks06.rb +1 -1
  892. data/test/regression/test_page_view01.rb +1 -1
  893. data/test/regression/test_panes01.rb +1 -1
  894. data/test/regression/test_print_across01.rb +1 -1
  895. data/test/regression/test_print_area01.rb +1 -1
  896. data/test/regression/test_print_area02.rb +1 -1
  897. data/test/regression/test_print_area03.rb +1 -1
  898. data/test/regression/test_print_area04.rb +1 -1
  899. data/test/regression/test_print_area05.rb +1 -1
  900. data/test/regression/test_print_area06.rb +1 -1
  901. data/test/regression/test_print_area07.rb +1 -1
  902. data/test/regression/test_print_options01.rb +1 -1
  903. data/test/regression/test_print_options02.rb +1 -1
  904. data/test/regression/test_print_options03.rb +1 -1
  905. data/test/regression/test_print_options04.rb +1 -1
  906. data/test/regression/test_print_options05.rb +1 -1
  907. data/test/regression/test_print_options06.rb +1 -1
  908. data/test/regression/test_print_options07.rb +1 -1
  909. data/test/regression/test_print_scale01.rb +1 -1
  910. data/test/regression/test_print_scale02.rb +1 -1
  911. data/test/regression/test_properties01.rb +2 -5
  912. data/test/regression/test_properties02.rb +25 -0
  913. data/test/regression/test_properties03.rb +26 -0
  914. data/test/regression/test_properties04.rb +61 -0
  915. data/test/regression/test_properties05.rb +30 -0
  916. data/test/regression/test_protect01.rb +1 -1
  917. data/test/regression/test_protect02.rb +1 -1
  918. data/test/regression/test_protect03.rb +1 -1
  919. data/test/regression/test_protect04.rb +32 -0
  920. data/test/regression/test_protect05.rb +35 -0
  921. data/test/regression/test_protect06.rb +35 -0
  922. data/test/regression/test_protect07.rb +23 -0
  923. data/test/regression/test_quote_name01.rb +1 -1
  924. data/test/regression/test_quote_name03.rb +1 -1
  925. data/test/regression/test_quote_name04.rb +1 -1
  926. data/test/regression/test_repeat01.rb +1 -1
  927. data/test/regression/test_repeat02.rb +1 -1
  928. data/test/regression/test_repeat03.rb +1 -1
  929. data/test/regression/test_repeat04.rb +1 -1
  930. data/test/regression/test_repeat05.rb +1 -1
  931. data/test/regression/test_rich_string01.rb +1 -1
  932. data/test/regression/test_rich_string02.rb +1 -1
  933. data/test/regression/test_rich_string03.rb +1 -1
  934. data/test/regression/test_rich_string04.rb +1 -1
  935. data/test/regression/test_rich_string05.rb +1 -1
  936. data/test/regression/test_rich_string06.rb +1 -1
  937. data/test/regression/test_rich_string07.rb +1 -1
  938. data/test/regression/test_rich_string08.rb +1 -1
  939. data/test/regression/test_rich_string09.rb +1 -1
  940. data/test/regression/test_rich_string10.rb +1 -1
  941. data/test/regression/test_rich_string11.rb +1 -1
  942. data/test/regression/test_rich_string12.rb +1 -1
  943. data/test/regression/test_row_col_format01.rb +1 -1
  944. data/test/regression/test_row_col_format02.rb +1 -1
  945. data/test/regression/test_row_col_format03.rb +1 -1
  946. data/test/regression/test_row_col_format04.rb +1 -1
  947. data/test/regression/test_row_col_format05.rb +1 -1
  948. data/test/regression/test_row_col_format06.rb +1 -1
  949. data/test/regression/test_row_col_format07.rb +1 -1
  950. data/test/regression/test_row_col_format08.rb +1 -1
  951. data/test/regression/test_row_col_format09.rb +1 -1
  952. data/test/regression/test_row_col_format10.rb +1 -1
  953. data/test/regression/test_row_col_format11.rb +1 -1
  954. data/test/regression/test_row_col_format12.rb +1 -1
  955. data/test/regression/test_row_col_format13.rb +1 -1
  956. data/test/regression/test_row_col_format14.rb +1 -1
  957. data/test/regression/test_selection01.rb +1 -1
  958. data/test/regression/test_selection02.rb +1 -1
  959. data/test/regression/test_set_column01.rb +1 -1
  960. data/test/regression/test_set_column02.rb +1 -1
  961. data/test/regression/test_set_column03.rb +1 -1
  962. data/test/regression/test_set_column04.rb +1 -1
  963. data/test/regression/test_set_column05.rb +1 -1
  964. data/test/regression/test_set_column06.rb +1 -1
  965. data/test/regression/test_set_column07.rb +1 -1
  966. data/test/regression/test_set_column08.rb +1 -1
  967. data/test/regression/test_set_column09.rb +1 -1
  968. data/test/regression/test_set_column10.rb +55 -0
  969. data/test/regression/test_set_column11.rb +48 -0
  970. data/test/regression/test_set_print_scale01.rb +1 -1
  971. data/test/regression/test_set_row01.rb +35 -0
  972. data/test/regression/test_set_row02.rb +35 -0
  973. data/test/regression/test_set_row03.rb +35 -0
  974. data/test/regression/test_set_row04.rb +35 -0
  975. data/test/regression/test_set_start_page01.rb +1 -1
  976. data/test/regression/test_set_start_page02.rb +1 -1
  977. data/test/regression/test_set_start_page03.rb +1 -1
  978. data/test/regression/test_shape01.rb +1 -1
  979. data/test/regression/test_shape02.rb +1 -1
  980. data/test/regression/test_shape03.rb +1 -1
  981. data/test/regression/test_shape04.rb +1 -1
  982. data/test/regression/test_shape_connect01.rb +5 -3
  983. data/test/regression/test_shape_connect02.rb +1 -1
  984. data/test/regression/test_shape_connect03.rb +1 -1
  985. data/test/regression/test_shape_connect04.rb +1 -1
  986. data/test/regression/test_shape_scale01.rb +1 -1
  987. data/test/regression/test_shape_stencil01.rb +1 -1
  988. data/test/regression/test_shared_strings01.rb +1 -1
  989. data/test/regression/test_shared_strings02.rb +1 -1
  990. data/test/regression/test_simple01.rb +1 -1
  991. data/test/regression/test_simple02.rb +1 -1
  992. data/test/regression/test_simple03.rb +1 -1
  993. data/test/regression/test_simple04.rb +1 -1
  994. data/test/regression/test_simple05.rb +1 -1
  995. data/test/regression/test_tab_color01.rb +1 -1
  996. data/test/regression/test_table01.rb +1 -1
  997. data/test/regression/test_table02.rb +1 -1
  998. data/test/regression/test_table03.rb +4 -1
  999. data/test/regression/test_table04.rb +4 -1
  1000. data/test/regression/test_table05.rb +4 -1
  1001. data/test/regression/test_table06.rb +4 -1
  1002. data/test/regression/test_table07.rb +1 -1
  1003. data/test/regression/test_table08.rb +1 -1
  1004. data/test/regression/test_table09.rb +1 -1
  1005. data/test/regression/test_table10.rb +1 -1
  1006. data/test/regression/test_table11.rb +1 -1
  1007. data/test/regression/test_table12.rb +1 -1
  1008. data/test/regression/test_table13.rb +1 -1
  1009. data/test/regression/test_table14.rb +1 -1
  1010. data/test/regression/test_table15.rb +1 -1
  1011. data/test/regression/test_table16.rb +1 -1
  1012. data/test/regression/test_table17.rb +1 -1
  1013. data/test/regression/test_table20.rb +34 -0
  1014. data/test/regression/test_table21.rb +36 -0
  1015. data/test/regression/test_table22.rb +32 -0
  1016. data/test/regression/test_table23.rb +56 -0
  1017. data/test/regression/test_table24.rb +27 -0
  1018. data/test/regression/test_table25.rb +27 -0
  1019. data/test/regression/test_table26.rb +38 -0
  1020. data/test/regression/test_tutorial01.rb +1 -1
  1021. data/test/regression/test_tutorial02.rb +1 -1
  1022. data/test/regression/test_tutorial03.rb +1 -1
  1023. data/test/regression/test_types02.rb +25 -0
  1024. data/test/regression/test_types08.rb +31 -0
  1025. data/test/regression/test_update_range_format_with_params.rb +42 -0
  1026. data/test/regression/test_urls_as_strings.rb +1 -1
  1027. data/test/regression/test_utf8_01.rb +1 -1
  1028. data/test/regression/test_utf8_03.rb +1 -1
  1029. data/test/regression/test_utf8_04.rb +1 -1
  1030. data/test/regression/test_utf8_05.rb +1 -1
  1031. data/test/regression/test_utf8_06.rb +1 -1
  1032. data/test/regression/test_utf8_07.rb +1 -1
  1033. data/test/regression/test_utf8_08.rb +1 -1
  1034. data/test/regression/test_utf8_09.rb +1 -1
  1035. data/test/regression/test_utf8_10.rb +1 -1
  1036. data/test/regression/test_utf8_11.rb +23 -0
  1037. data/test/regression/test_vml01.rb +1 -1
  1038. data/test/regression/test_vml02.rb +1 -1
  1039. data/test/regression/test_vml03.rb +1 -1
  1040. data/test/regression/xlsx_files/array_formula03.xlsx +0 -0
  1041. data/test/regression/xlsx_files/array_formula04.xlsx +0 -0
  1042. data/test/regression/xlsx_files/autofilter08.xlsx +0 -0
  1043. data/test/regression/xlsx_files/autofilter09.xlsx +0 -0
  1044. data/test/regression/xlsx_files/autofilter10.xlsx +0 -0
  1045. data/test/regression/xlsx_files/background01.xlsx +0 -0
  1046. data/test/regression/xlsx_files/background02.xlsx +0 -0
  1047. data/test/regression/xlsx_files/background03.xlsx +0 -0
  1048. data/test/regression/xlsx_files/background04.xlsx +0 -0
  1049. data/test/regression/xlsx_files/background05.xlsx +0 -0
  1050. data/test/regression/xlsx_files/background06.xlsx +0 -0
  1051. data/test/regression/xlsx_files/background07.xlsx +0 -0
  1052. data/test/regression/xlsx_files/chart_axis26.xlsx +0 -0
  1053. data/test/regression/xlsx_files/chart_axis27.xlsx +0 -0
  1054. data/test/regression/xlsx_files/chart_axis28.xlsx +0 -0
  1055. data/test/regression/xlsx_files/chart_axis29.xlsx +0 -0
  1056. data/test/regression/xlsx_files/chart_axis33.xlsx +0 -0
  1057. data/test/regression/xlsx_files/chart_axis40.xlsx +0 -0
  1058. data/test/regression/xlsx_files/chart_axis41.xlsx +0 -0
  1059. data/test/regression/xlsx_files/chart_axis42.xlsx +0 -0
  1060. data/test/regression/xlsx_files/chart_axis43.xlsx +0 -0
  1061. data/test/regression/xlsx_files/chart_axis44.xlsx +0 -0
  1062. data/test/regression/xlsx_files/chart_axis45.xlsx +0 -0
  1063. data/test/regression/xlsx_files/chart_axis46.xlsx +0 -0
  1064. data/test/regression/xlsx_files/chart_axis47.xlsx +0 -0
  1065. data/test/regression/xlsx_files/chart_axis48.xlsx +0 -0
  1066. data/test/regression/xlsx_files/chart_chartarea05.xlsx +0 -0
  1067. data/test/regression/xlsx_files/chart_chartarea06.xlsx +0 -0
  1068. data/test/regression/xlsx_files/chart_combined09.xlsx +0 -0
  1069. data/test/regression/xlsx_files/chart_combined10.xlsx +0 -0
  1070. data/test/regression/xlsx_files/chart_combined11.xlsx +0 -0
  1071. data/test/regression/xlsx_files/chart_crossing05.xlsx +0 -0
  1072. data/test/regression/xlsx_files/chart_crossing06.xlsx +0 -0
  1073. data/test/regression/xlsx_files/chart_data_labels25.xlsx +0 -0
  1074. data/test/regression/xlsx_files/chart_data_labels26.xlsx +0 -0
  1075. data/test/regression/xlsx_files/chart_data_labels27.xlsx +0 -0
  1076. data/test/regression/xlsx_files/chart_data_labels28.xlsx +0 -0
  1077. data/test/regression/xlsx_files/chart_data_labels29.xlsx +0 -0
  1078. data/test/regression/xlsx_files/chart_data_labels30.xlsx +0 -0
  1079. data/test/regression/xlsx_files/chart_data_labels31.xlsx +0 -0
  1080. data/test/regression/xlsx_files/chart_data_labels32.xlsx +0 -0
  1081. data/test/regression/xlsx_files/chart_data_labels33.xlsx +0 -0
  1082. data/test/regression/xlsx_files/chart_data_labels34.xlsx +0 -0
  1083. data/test/regression/xlsx_files/chart_data_labels35.xlsx +0 -0
  1084. data/test/regression/xlsx_files/chart_data_labels36.xlsx +0 -0
  1085. data/test/regression/xlsx_files/chart_data_labels37.xlsx +0 -0
  1086. data/test/regression/xlsx_files/chart_data_labels38.xlsx +0 -0
  1087. data/test/regression/xlsx_files/chart_data_labels39.xlsx +0 -0
  1088. data/test/regression/xlsx_files/chart_data_labels40.xlsx +0 -0
  1089. data/test/regression/xlsx_files/chart_data_labels41.xlsx +0 -0
  1090. data/test/regression/xlsx_files/chart_data_labels42.xlsx +0 -0
  1091. data/test/regression/xlsx_files/chart_data_labels43.xlsx +0 -0
  1092. data/test/regression/xlsx_files/chart_data_labels44.xlsx +0 -0
  1093. data/test/regression/xlsx_files/chart_data_labels45.xlsx +0 -0
  1094. data/test/regression/xlsx_files/chart_data_labels46.xlsx +0 -0
  1095. data/test/regression/xlsx_files/chart_data_labels47.xlsx +0 -0
  1096. data/test/regression/xlsx_files/chart_data_labels48.xlsx +0 -0
  1097. data/test/regression/xlsx_files/chart_data_labels49.xlsx +0 -0
  1098. data/test/regression/xlsx_files/chart_data_labels50.xlsx +0 -0
  1099. data/test/regression/xlsx_files/chart_doughnut07.xlsx +0 -0
  1100. data/test/regression/xlsx_files/chart_font09.xlsx +0 -0
  1101. data/test/regression/xlsx_files/chart_format21.xlsx +0 -0
  1102. data/test/regression/xlsx_files/chart_format22.xlsx +0 -0
  1103. data/test/regression/xlsx_files/chart_format23.xlsx +0 -0
  1104. data/test/regression/xlsx_files/chart_format24.xlsx +0 -0
  1105. data/test/regression/xlsx_files/chart_format25.xlsx +0 -0
  1106. data/test/regression/xlsx_files/chart_format26.xlsx +0 -0
  1107. data/test/regression/xlsx_files/chart_format27.xlsx +0 -0
  1108. data/test/regression/xlsx_files/chart_format28.xlsx +0 -0
  1109. data/test/regression/xlsx_files/chart_format29.xlsx +0 -0
  1110. data/test/regression/xlsx_files/chart_format30.xlsx +0 -0
  1111. data/test/regression/xlsx_files/chart_format31.xlsx +0 -0
  1112. data/test/regression/xlsx_files/chart_legend03.xlsx +0 -0
  1113. data/test/regression/xlsx_files/chart_legend04.xlsx +0 -0
  1114. data/test/regression/xlsx_files/chart_legend05.xlsx +0 -0
  1115. data/test/regression/xlsx_files/chart_legend06.xlsx +0 -0
  1116. data/test/regression/xlsx_files/chart_legend07.xlsx +0 -0
  1117. data/test/regression/xlsx_files/chart_line05.xlsx +0 -0
  1118. data/test/regression/xlsx_files/chart_line06.xlsx +0 -0
  1119. data/test/regression/xlsx_files/chart_pattern01.xlsx +0 -0
  1120. data/test/regression/xlsx_files/chart_pattern02.xlsx +0 -0
  1121. data/test/regression/xlsx_files/chart_pattern03.xlsx +0 -0
  1122. data/test/regression/xlsx_files/chart_pattern04.xlsx +0 -0
  1123. data/test/regression/xlsx_files/chart_pattern05.xlsx +0 -0
  1124. data/test/regression/xlsx_files/chart_pattern06.xlsx +0 -0
  1125. data/test/regression/xlsx_files/chart_pattern07.xlsx +0 -0
  1126. data/test/regression/xlsx_files/chart_pattern08.xlsx +0 -0
  1127. data/test/regression/xlsx_files/chart_pattern09.xlsx +0 -0
  1128. data/test/regression/xlsx_files/chart_pattern10.xlsx +0 -0
  1129. data/test/regression/xlsx_files/chart_table03.xlsx +0 -0
  1130. data/test/regression/xlsx_files/comment13.xlsx +0 -0
  1131. data/test/regression/xlsx_files/comment14.xlsx +0 -0
  1132. data/test/regression/xlsx_files/comment15.xlsx +0 -0
  1133. data/test/regression/xlsx_files/comment16.xlsx +0 -0
  1134. data/test/regression/xlsx_files/cond_format14.xlsx +0 -0
  1135. data/test/regression/xlsx_files/cond_format15.xlsx +0 -0
  1136. data/test/regression/xlsx_files/cond_format16.xlsx +0 -0
  1137. data/test/regression/xlsx_files/cond_format17.xlsx +0 -0
  1138. data/test/regression/xlsx_files/cond_format18.xlsx +0 -0
  1139. data/test/regression/xlsx_files/cond_format19.xlsx +0 -0
  1140. data/test/regression/xlsx_files/cond_format20.xlsx +0 -0
  1141. data/test/regression/xlsx_files/data_validation08.xlsx +0 -0
  1142. data/test/regression/xlsx_files/date_1904_01.xlsx +0 -0
  1143. data/test/regression/xlsx_files/default_row05.xlsx +0 -0
  1144. data/test/regression/xlsx_files/dynamic_array01.xlsx +0 -0
  1145. data/test/regression/xlsx_files/format13.xlsx +0 -0
  1146. data/test/regression/xlsx_files/format14.xlsx +0 -0
  1147. data/test/regression/xlsx_files/format15.xlsx +0 -0
  1148. data/test/regression/xlsx_files/format16.xlsx +0 -0
  1149. data/test/regression/xlsx_files/format17.xlsx +0 -0
  1150. data/test/regression/xlsx_files/header04.xlsx +0 -0
  1151. data/test/regression/xlsx_files/header_image15.xlsx +0 -0
  1152. data/test/regression/xlsx_files/header_image16.xlsx +0 -0
  1153. data/test/regression/xlsx_files/header_image17.xlsx +0 -0
  1154. data/test/regression/xlsx_files/header_image18.xlsx +0 -0
  1155. data/test/regression/xlsx_files/header_image19.xlsx +0 -0
  1156. data/test/regression/xlsx_files/hyperlink22.xlsx +0 -0
  1157. data/test/regression/xlsx_files/hyperlink23.xlsx +0 -0
  1158. data/test/regression/xlsx_files/hyperlink24.xlsx +0 -0
  1159. data/test/regression/xlsx_files/hyperlink25.xlsx +0 -0
  1160. data/test/regression/xlsx_files/hyperlink26.xlsx +0 -0
  1161. data/test/regression/xlsx_files/hyperlink27.xlsx +0 -0
  1162. data/test/regression/xlsx_files/hyperlink28.xlsx +0 -0
  1163. data/test/regression/xlsx_files/hyperlink29.xlsx +0 -0
  1164. data/test/regression/xlsx_files/hyperlink30.xlsx +0 -0
  1165. data/test/regression/xlsx_files/hyperlink31.xlsx +0 -0
  1166. data/test/regression/xlsx_files/hyperlink32.xlsx +0 -0
  1167. data/test/regression/xlsx_files/hyperlink33.xlsx +0 -0
  1168. data/test/regression/xlsx_files/hyperlink34.xlsx +0 -0
  1169. data/test/regression/xlsx_files/hyperlink35.xlsx +0 -0
  1170. data/test/regression/xlsx_files/hyperlink36.xlsx +0 -0
  1171. data/test/regression/xlsx_files/hyperlink37.xlsx +0 -0
  1172. data/test/regression/xlsx_files/hyperlink38.xlsx +0 -0
  1173. data/test/regression/xlsx_files/hyperlink39.xlsx +0 -0
  1174. data/test/regression/xlsx_files/hyperlink40.xlsx +0 -0
  1175. data/test/regression/xlsx_files/hyperlink41.xlsx +0 -0
  1176. data/test/regression/xlsx_files/hyperlink42.xlsx +0 -0
  1177. data/test/regression/xlsx_files/hyperlink43.xlsx +0 -0
  1178. data/test/regression/xlsx_files/hyperlink44.xlsx +0 -0
  1179. data/test/regression/xlsx_files/hyperlink45.xlsx +0 -0
  1180. data/test/regression/xlsx_files/hyperlink46.xlsx +0 -0
  1181. data/test/regression/xlsx_files/hyperlink47.xlsx +0 -0
  1182. data/test/regression/xlsx_files/hyperlink48.xlsx +0 -0
  1183. data/test/regression/xlsx_files/hyperlink49.xlsx +0 -0
  1184. data/test/regression/xlsx_files/hyperlink50.xlsx +0 -0
  1185. data/test/regression/xlsx_files/hyperlink51.xlsx +0 -0
  1186. data/test/regression/xlsx_files/ignore_error01.xlsx +0 -0
  1187. data/test/regression/xlsx_files/ignore_error02.xlsx +0 -0
  1188. data/test/regression/xlsx_files/ignore_error03.xlsx +0 -0
  1189. data/test/regression/xlsx_files/ignore_error04.xlsx +0 -0
  1190. data/test/regression/xlsx_files/ignore_error05.xlsx +0 -0
  1191. data/test/regression/xlsx_files/ignore_error06.xlsx +0 -0
  1192. data/test/regression/xlsx_files/image06.xlsx +0 -0
  1193. data/test/regression/xlsx_files/image28.xlsx +0 -0
  1194. data/test/regression/xlsx_files/image29.xlsx +0 -0
  1195. data/test/regression/xlsx_files/image30.xlsx +0 -0
  1196. data/test/regression/xlsx_files/image31.xlsx +0 -0
  1197. data/test/regression/xlsx_files/image32.xlsx +0 -0
  1198. data/test/regression/xlsx_files/image33.xlsx +0 -0
  1199. data/test/regression/xlsx_files/image35.xlsx +0 -0
  1200. data/test/regression/xlsx_files/image36.xlsx +0 -0
  1201. data/test/regression/xlsx_files/image44.xlsx +0 -0
  1202. data/test/regression/xlsx_files/image45.xlsx +0 -0
  1203. data/test/regression/xlsx_files/image46.xlsx +0 -0
  1204. data/test/regression/xlsx_files/image47.xlsx +0 -0
  1205. data/test/regression/xlsx_files/image48.xlsx +0 -0
  1206. data/test/regression/xlsx_files/image49.xlsx +0 -0
  1207. data/test/regression/xlsx_files/image50.xlsx +0 -0
  1208. data/test/regression/xlsx_files/image51.xlsx +0 -0
  1209. data/test/regression/xlsx_files/image52.xlsx +0 -0
  1210. data/test/regression/xlsx_files/image53.xlsx +0 -0
  1211. data/test/regression/xlsx_files/image54.xlsx +0 -0
  1212. data/test/regression/xlsx_files/image55.xlsx +0 -0
  1213. data/test/regression/xlsx_files/image56.xlsx +0 -0
  1214. data/test/regression/xlsx_files/image57.xlsx +0 -0
  1215. data/test/regression/xlsx_files/object_position01.xlsx +0 -0
  1216. data/test/regression/xlsx_files/object_position02.xlsx +0 -0
  1217. data/test/regression/xlsx_files/object_position03.xlsx +0 -0
  1218. data/test/regression/xlsx_files/object_position04.xlsx +0 -0
  1219. data/test/regression/xlsx_files/object_position06.xlsx +0 -0
  1220. data/test/regression/xlsx_files/object_position07.xlsx +0 -0
  1221. data/test/regression/xlsx_files/object_position08.xlsx +0 -0
  1222. data/test/regression/xlsx_files/object_position09.xlsx +0 -0
  1223. data/test/regression/xlsx_files/object_position10.xlsx +0 -0
  1224. data/test/regression/xlsx_files/object_position12.xlsx +0 -0
  1225. data/test/regression/xlsx_files/object_position13.xlsx +0 -0
  1226. data/test/regression/xlsx_files/object_position14.xlsx +0 -0
  1227. data/test/regression/xlsx_files/object_position15.xlsx +0 -0
  1228. data/test/regression/xlsx_files/object_position16.xlsx +0 -0
  1229. data/test/regression/xlsx_files/object_position17.xlsx +0 -0
  1230. data/test/regression/xlsx_files/object_position18.xlsx +0 -0
  1231. data/test/regression/xlsx_files/object_position19.xlsx +0 -0
  1232. data/test/regression/xlsx_files/object_position20.xlsx +0 -0
  1233. data/test/regression/xlsx_files/properties02.xlsx +0 -0
  1234. data/test/regression/xlsx_files/properties03.xlsx +0 -0
  1235. data/test/regression/xlsx_files/properties04.xlsx +0 -0
  1236. data/test/regression/xlsx_files/properties05.xlsx +0 -0
  1237. data/test/regression/xlsx_files/protect04.xlsx +0 -0
  1238. data/test/regression/xlsx_files/protect05.xlsx +0 -0
  1239. data/test/regression/xlsx_files/protect06.xlsx +0 -0
  1240. data/test/regression/xlsx_files/protect07.xlsx +0 -0
  1241. data/test/regression/xlsx_files/set_row01.xlsx +0 -0
  1242. data/test/regression/xlsx_files/set_row03.xlsx +0 -0
  1243. data/test/regression/xlsx_files/table18.xlsx +0 -0
  1244. data/test/regression/xlsx_files/table19.xlsx +0 -0
  1245. data/test/regression/xlsx_files/table21.xlsx +0 -0
  1246. data/test/regression/xlsx_files/table22.xlsx +0 -0
  1247. data/test/regression/xlsx_files/table23.xlsx +0 -0
  1248. data/test/regression/xlsx_files/table24.xlsx +0 -0
  1249. data/test/regression/xlsx_files/table25.xlsx +0 -0
  1250. data/test/regression/xlsx_files/table26.xlsx +0 -0
  1251. data/test/regression/xlsx_files/types02.xlsx +0 -0
  1252. data/test/regression/xlsx_files/types08.xlsx +0 -0
  1253. data/test/regression/xlsx_files/update_range_format_with_params.xlsx +0 -0
  1254. data/test/regression/xlsx_files/utf8_11.xlsx +0 -0
  1255. data/test/test_delete_files.rb +3 -3
  1256. data/test/test_example_match.rb +1342 -781
  1257. data/test/test_option_hash_for_workbook.rb +1 -1
  1258. data/test/test_xml_writer_simple.rb +1 -1
  1259. data/test/utility/test_range.rb +20 -0
  1260. data/test/workbook/test_check_sheetname.rb +51 -0
  1261. data/test/workbook/test_define_name.rb +1 -1
  1262. data/test/workbook/test_get_chart_range.rb +3 -5
  1263. data/test/workbook/test_sort_defined_names.rb +1 -1
  1264. data/test/workbook/test_workbook_01.rb +1 -1
  1265. data/test/workbook/test_workbook_02.rb +1 -1
  1266. data/test/workbook/test_workbook_03.rb +1 -1
  1267. data/test/workbook/test_worksheet_by_name.rb +35 -0
  1268. data/test/workbook/test_write_calc_pr.rb +1 -1
  1269. data/test/workbook/test_write_defined_name.rb +1 -1
  1270. data/test/workbook/test_write_defined_names.rb +1 -1
  1271. data/test/workbook/test_write_workbook_view.rb +117 -0
  1272. data/test/worksheet/test_calculate_spans.rb +1 -1
  1273. data/test/worksheet/test_cond_format_01.rb +1 -1
  1274. data/test/worksheet/test_cond_format_02.rb +1 -1
  1275. data/test/worksheet/test_cond_format_03.rb +1 -1
  1276. data/test/worksheet/test_cond_format_04.rb +1 -1
  1277. data/test/worksheet/test_cond_format_05.rb +1 -1
  1278. data/test/worksheet/test_cond_format_06.rb +1 -1
  1279. data/test/worksheet/test_cond_format_07.rb +1 -1
  1280. data/test/worksheet/test_cond_format_08.rb +1 -1
  1281. data/test/worksheet/test_cond_format_09.rb +1 -1
  1282. data/test/worksheet/test_cond_format_10.rb +1 -1
  1283. data/test/worksheet/test_cond_format_11.rb +1 -1
  1284. data/test/worksheet/test_cond_format_12.rb +1 -1
  1285. data/test/worksheet/test_cond_format_13.rb +1 -1
  1286. data/test/worksheet/test_cond_format_14.rb +1 -1
  1287. data/test/worksheet/test_cond_format_15.rb +1 -1
  1288. data/test/worksheet/test_cond_format_16.rb +1 -1
  1289. data/test/worksheet/test_cond_format_17.rb +1 -1
  1290. data/test/worksheet/test_cond_format_18.rb +1 -1
  1291. data/test/worksheet/test_cond_format_19.rb +1 -1
  1292. data/test/worksheet/test_cond_format_20.rb +1 -1
  1293. data/test/worksheet/test_cond_format_21.rb +90 -0
  1294. data/test/worksheet/test_cond_format_22.rb +266 -0
  1295. data/test/worksheet/test_cond_format_23.rb +242 -0
  1296. data/test/worksheet/test_cond_format_24.rb +303 -0
  1297. data/test/worksheet/test_convert_date_time_01.rb +1 -1
  1298. data/test/worksheet/test_convert_date_time_02.rb +1 -1
  1299. data/test/worksheet/test_convert_date_time_03.rb +1 -1
  1300. data/test/worksheet/test_convert_date_time_04.rb +1 -1
  1301. data/test/worksheet/test_data_bar_01.rb +53 -0
  1302. data/test/worksheet/test_data_bar_02.rb +79 -0
  1303. data/test/worksheet/test_data_bar_03.rb +147 -0
  1304. data/test/worksheet/test_data_bar_04.rb +145 -0
  1305. data/test/worksheet/test_data_bar_05.rb +147 -0
  1306. data/test/worksheet/test_data_bar_06.rb +145 -0
  1307. data/test/worksheet/test_data_bar_07.rb +146 -0
  1308. data/test/worksheet/test_data_bar_08.rb +54 -0
  1309. data/test/worksheet/test_data_bar_09.rb +80 -0
  1310. data/test/worksheet/test_data_bar_10.rb +165 -0
  1311. data/test/worksheet/test_data_bar_11.rb +167 -0
  1312. data/test/worksheet/test_data_bar_12.rb +104 -0
  1313. data/test/worksheet/test_extract_filter_tokens.rb +1 -1
  1314. data/test/worksheet/test_parse_filter_expression.rb +1 -1
  1315. data/test/worksheet/test_pixels_to_row_col.rb +46 -0
  1316. data/test/worksheet/test_position_object.rb +1 -1
  1317. data/test/worksheet/test_repeat_formula.rb +1 -1
  1318. data/test/worksheet/test_sparkline_01.rb +1 -1
  1319. data/test/worksheet/test_sparkline_02.rb +1 -1
  1320. data/test/worksheet/test_sparkline_03.rb +1 -1
  1321. data/test/worksheet/test_sparkline_04.rb +1 -1
  1322. data/test/worksheet/test_sparkline_05.rb +1 -1
  1323. data/test/worksheet/test_sparkline_06.rb +1 -1
  1324. data/test/worksheet/test_sparkline_07.rb +1 -1
  1325. data/test/worksheet/test_sparkline_08.rb +1 -1
  1326. data/test/worksheet/test_sparkline_09.rb +1 -1
  1327. data/test/worksheet/test_sparkline_10.rb +1 -1
  1328. data/test/worksheet/test_sparkline_11.rb +1 -1
  1329. data/test/worksheet/test_sparkline_12.rb +94 -0
  1330. data/test/worksheet/test_update_format_methods.rb +91 -0
  1331. data/test/worksheet/test_worksheet_01.rb +1 -1
  1332. data/test/worksheet/test_worksheet_02.rb +1 -1
  1333. data/test/worksheet/test_worksheet_03.rb +1 -1
  1334. data/test/worksheet/test_worksheet_04.rb +1 -1
  1335. data/test/worksheet/test_write_array_formula_01.rb +1 -8
  1336. data/test/worksheet/test_write_autofilter.rb +1 -1
  1337. data/test/worksheet/test_write_brk.rb +1 -1
  1338. data/test/worksheet/test_write_cell.rb +1 -1
  1339. data/test/worksheet/test_write_cell_value.rb +1 -1
  1340. data/test/worksheet/test_write_col_breaks.rb +1 -1
  1341. data/test/worksheet/test_write_col_info.rb +1 -1
  1342. data/test/worksheet/test_write_conditional_formatting.rb +1 -1
  1343. data/test/worksheet/test_write_custom_filter.rb +1 -1
  1344. data/test/worksheet/test_write_custom_filters.rb +1 -1
  1345. data/test/worksheet/test_write_data_validation_01.rb +1 -1
  1346. data/test/worksheet/test_write_data_validation_02.rb +59 -2
  1347. data/test/worksheet/test_write_dimension.rb +1 -1
  1348. data/test/worksheet/test_write_filter.rb +1 -1
  1349. data/test/worksheet/test_write_filter_column.rb +1 -1
  1350. data/test/worksheet/test_write_filters.rb +1 -1
  1351. data/test/worksheet/test_write_formula_does_not_change_formula_string.rb +1 -1
  1352. data/test/worksheet/test_write_header_footer.rb +1 -1
  1353. data/test/worksheet/test_write_hyperlink.rb +1 -8
  1354. data/test/worksheet/test_write_legacy_drawing.rb +1 -1
  1355. data/test/worksheet/test_write_merge_cell.rb +1 -1
  1356. data/test/worksheet/test_write_merge_cells.rb +1 -1
  1357. data/test/worksheet/test_write_methods.rb +68 -177
  1358. data/test/worksheet/test_write_page_margins.rb +1 -1
  1359. data/test/worksheet/test_write_page_set_up_pr.rb +1 -1
  1360. data/test/worksheet/test_write_page_setup.rb +1 -1
  1361. data/test/worksheet/test_write_pane.rb +1 -1
  1362. data/test/worksheet/test_write_phonetic_pr.rb +1 -1
  1363. data/test/worksheet/test_write_print_options.rb +1 -1
  1364. data/test/worksheet/test_write_row_breaks.rb +1 -1
  1365. data/test/worksheet/test_write_row_element.rb +1 -1
  1366. data/test/worksheet/test_write_selection.rb +1 -1
  1367. data/test/worksheet/test_write_sheet_calc_pr.rb +1 -1
  1368. data/test/worksheet/test_write_sheet_data.rb +1 -1
  1369. data/test/worksheet/test_write_sheet_format_pr.rb +1 -1
  1370. data/test/worksheet/test_write_sheet_pr.rb +1 -1
  1371. data/test/worksheet/test_write_sheet_protection.rb +1 -1
  1372. data/test/worksheet/test_write_sheet_view.rb +20 -2
  1373. data/test/worksheet/test_write_sheet_view1.rb +1 -1
  1374. data/test/worksheet/test_write_sheet_view2.rb +1 -1
  1375. data/test/worksheet/test_write_sheet_view3.rb +1 -1
  1376. data/test/worksheet/test_write_sheet_view4.rb +1 -1
  1377. data/test/worksheet/test_write_sheet_view5.rb +1 -1
  1378. data/test/worksheet/test_write_sheet_view6.rb +1 -1
  1379. data/test/worksheet/test_write_sheet_view7.rb +1 -1
  1380. data/test/worksheet/test_write_sheet_view8.rb +1 -1
  1381. data/test/worksheet/test_write_sheet_view9.rb +1 -1
  1382. data/test/worksheet/test_write_tab_color.rb +1 -1
  1383. data/test/worksheet/test_write_worksheet_attributes.rb +1 -1
  1384. data/write_xlsx.gemspec +4 -3
  1385. metadata +937 -18
  1386. data/test/package/comments/test_write_text_t.rb +0 -44
  1387. data/test/test_col_name.rb +0 -13
  1388. data/test/workbook/test_workbook_new.rb +0 -18
  1389. data/test/worksheet/test_write_multiline_string_with_url.rb +0 -30
  1390. data/test/worksheet/test_write_url.rb +0 -19
@@ -10,7 +10,7 @@ module Writexlsx
10
10
 
11
11
  class ColumnData
12
12
  attr_reader :id
13
- attr_accessor :name, :format, :formula
13
+ attr_accessor :name, :format, :formula, :name_format
14
14
  attr_accessor :total_string, :total_function
15
15
 
16
16
  def initialize(id, param = {})
@@ -20,6 +20,7 @@ module Writexlsx
20
20
  @total_function = ''
21
21
  @formula = ''
22
22
  @format = nil
23
+ @name_format = nil
23
24
  @user_data = param[id-1] if param
24
25
  end
25
26
  end
@@ -31,8 +32,9 @@ module Writexlsx
31
32
  @writer = Package::XMLWriterSimple.new
32
33
 
33
34
  @row1, @row2, @col1, @col2, @param = handle_args(*args)
34
- @columns = []
35
+ @columns = []
35
36
  @col_formats = []
37
+ @seen_name = {}
36
38
 
37
39
  # Set the data range rows (without the header and footer).
38
40
  @first_data_row = @row1
@@ -93,10 +95,20 @@ module Writexlsx
93
95
  if user_data[:header] && !user_data[:header].empty?
94
96
  col_data.name = user_data[:header]
95
97
  end
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
105
+ # Get the header format if defined.
106
+ col_data.name_format = user_data[:header_format]
107
+
96
108
  # Handle the column formula.
97
109
  handle_the_column_formula(
98
- col_data, col_num, user_data[:formula], user_data[:format]
99
- )
110
+ col_data, col_num, user_data[:formula], user_data[:format]
111
+ )
100
112
 
101
113
  # Handle the function for the total row.
102
114
  if user_data[:total_function]
@@ -105,8 +117,8 @@ module Writexlsx
105
117
  )
106
118
  elsif user_data[:total_string]
107
119
  total_label_only(
108
- @row2, col_num, col_data, user_data[:total_string], user_data[:format]
109
- )
120
+ @row2, col_num, col_data, user_data[:total_string], user_data[:format]
121
+ )
110
122
  end
111
123
 
112
124
  # Get the dxf format index.
@@ -123,7 +135,9 @@ module Writexlsx
123
135
 
124
136
  def write_the_column_headers_to_the_worksheet(col_num, col_data)
125
137
  if @param[:header_row] != 0
126
- @worksheet.write_string(@row1, col_num, col_data.name)
138
+ @worksheet.write_string(
139
+ @row1, col_num, col_data.name, col_data.name_format
140
+ )
127
141
  end
128
142
  end
129
143
 
@@ -167,7 +181,7 @@ module Writexlsx
167
181
  row1, row2 = row2, row1 if row1 > row2
168
182
  col1, col2 = col2, col1 if col1 > col2
169
183
 
170
- # The final hash contains the validation parameters.
184
+ # The final hash contains the validation parameters.
171
185
  param ||= {}
172
186
 
173
187
  # Turn on Excel's defaults.
@@ -175,6 +189,14 @@ module Writexlsx
175
189
  param[:header_row] ||= 1
176
190
  param[:autofilter] ||= 1
177
191
 
192
+ # Check that there are enough rows.
193
+ num_rows = row2 - row1
194
+ num_rows -= 1 if ptrue?(param[:header_row])
195
+
196
+ if num_rows < 0
197
+ raise "Must have at least one data row in in add_table()"
198
+ end
199
+
178
200
  # If the header row if off the default is to turn autofilter off.
179
201
  param[:autofilter] = 0 if param[:header_row] == 0
180
202
 
@@ -186,17 +208,17 @@ module Writexlsx
186
208
  # List of valid input parameters.
187
209
  def valid_table_parameter
188
210
  [
189
- :autofilter,
190
- :banded_columns,
191
- :banded_rows,
192
- :columns,
193
- :data,
194
- :first_column,
195
- :header_row,
196
- :last_column,
197
- :name,
198
- :style,
199
- :total_row
211
+ :autofilter,
212
+ :banded_columns,
213
+ :banded_rows,
214
+ :columns,
215
+ :data,
216
+ :first_column,
217
+ :header_row,
218
+ :last_column,
219
+ :name,
220
+ :style,
221
+ :total_row
200
222
  ]
201
223
  end
202
224
 
@@ -226,6 +248,11 @@ module Writexlsx
226
248
  # Convert a table total function to a worksheet formula.
227
249
  #
228
250
  def table_function_to_formula(function, col_name)
251
+ col_name = col_name.gsub(/'/, "''").
252
+ gsub(/#/, "'#").
253
+ gsub(/\[/, "'[").
254
+ gsub(/\]/, "']")
255
+
229
256
  subtotals = {
230
257
  :average => 101,
231
258
  :countNums => 102,
@@ -268,7 +295,26 @@ module Writexlsx
268
295
  end
269
296
 
270
297
  def set_the_table_name
271
- @name = @param[:name] if @param[:name]
298
+ if @param[:name]
299
+ name = @param[:name]
300
+
301
+ # Raise if the name contains invalid chars as defined by Excel help.
302
+ if name !~ /^[\w\\][\w\\.]*$/ || name =~ /^\d/
303
+ raise "Invalid character in name '#{name} used in add_table()"
304
+ end
305
+
306
+ # Raise if the name looks like a cell name.
307
+ if name =~ /^[a-zA-Z][a-zA-Z]?[a-dA-D]?[0-9]+$/
308
+ ralse "Invalid name '#{name}' looks like a cell name in add_table()"
309
+ end
310
+
311
+ # Raise if the name looks like a R1C1.
312
+ if name =~ /^[rcRC]$/ || name =~ /^[rcRC]\d+[rcRC]\d+$/
313
+ raise "Invalid name '#{name}' like a RC cell ref in add_table()"
314
+ end
315
+
316
+ @name = @param[:name]
317
+ end
272
318
  end
273
319
 
274
320
  def set_the_table_and_autofilter_ranges
@@ -285,12 +331,12 @@ module Writexlsx
285
331
  xmlns = "#{schema}spreadsheetml/2006/main"
286
332
 
287
333
  attributes = [
288
- ['xmlns', xmlns],
289
- ['id', id],
290
- ['name', @name],
291
- ['displayName', @name],
292
- ['ref', @range]
293
- ]
334
+ ['xmlns', xmlns],
335
+ ['id', id],
336
+ ['name', @name],
337
+ ['displayName', @name],
338
+ ['ref', @range]
339
+ ]
294
340
 
295
341
  unless ptrue?(@header_row_count)
296
342
  attributes << ['headerRowCount', 0]
@@ -332,9 +378,9 @@ module Writexlsx
332
378
  #
333
379
  def write_table_column(col_data)
334
380
  attributes = [
335
- ['id', col_data.id],
336
- ['name', col_data.name]
337
- ]
381
+ ['id', col_data.id],
382
+ ['name', col_data.name]
383
+ ]
338
384
 
339
385
  if ptrue?(col_data.total_string)
340
386
  attributes << [:totalsRowLabel, col_data.total_string]
@@ -360,13 +406,14 @@ module Writexlsx
360
406
  # Write the <tableStyleInfo> element.
361
407
  #
362
408
  def write_table_style_info
363
- attributes = [
364
- ['name', @style],
365
- ['showFirstColumn', @show_first_col],
366
- ['showLastColumn', @show_last_col],
367
- ['showRowStripes', @show_row_stripes],
368
- ['showColumnStripes', @show_col_stripes]
369
- ]
409
+ attributes = []
410
+ if @style && @style != '' && @style != 'None'
411
+ attributes << ['name', @style]
412
+ end
413
+ attributes << ['showFirstColumn', @show_first_col]
414
+ attributes << ['showLastColumn', @show_last_col]
415
+ attributes << ['showRowStripes', @show_row_stripes]
416
+ attributes << ['showColumnStripes', @show_col_stripes]
370
417
 
371
418
  @writer.empty_tag('tableStyleInfo', attributes)
372
419
  end
@@ -36,7 +36,7 @@ module Writexlsx
36
36
  #
37
37
  def write_theme_file
38
38
  theme =
39
- %Q{<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
39
+ %Q{<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
40
40
  <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F497D"/></a:dk2><a:lt2><a:srgbClr val="EEECE1"/></a:lt2><a:accent1><a:srgbClr val="4F81BD"/></a:accent1><a:accent2><a:srgbClr val="C0504D"/></a:accent2><a:accent3><a:srgbClr val="9BBB59"/></a:accent3><a:accent4><a:srgbClr val="8064A2"/></a:accent4><a:accent5><a:srgbClr val="4BACC6"/></a:accent5><a:accent6><a:srgbClr val="F79646"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS Pゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="宋体"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS Pゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="宋体"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="1"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:shade val="51000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="80000"><a:schemeClr val="phClr"><a:shade val="93000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="94000"/><a:satMod val="135000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>}
41
41
  @writer.write(theme)
42
42
  end
@@ -17,9 +17,9 @@ module Writexlsx
17
17
  end
18
18
 
19
19
  def assemble_xml_file(
20
- data_id, vml_shape_id, comments_data,
21
- buttons_data, header_images_data = []
22
- )
20
+ data_id, vml_shape_id, comments_data,
21
+ buttons_data, header_images_data = []
22
+ )
23
23
  return unless @writer
24
24
 
25
25
  write_xml_namespace do
@@ -29,16 +29,16 @@ module Writexlsx
29
29
  z_index = 1
30
30
  unless buttons_data.empty?
31
31
  vml_shape_id, z_index =
32
- write_shape_type_and_shape(
33
- buttons_data,
34
- vml_shape_id, z_index) do
32
+ write_shape_type_and_shape(
33
+ buttons_data,
34
+ vml_shape_id, z_index) do
35
35
  write_button_shapetype
36
36
  end
37
37
  end
38
38
  unless comments_data.empty?
39
39
  write_shape_type_and_shape(
40
- comments_data,
41
- vml_shape_id, z_index) do
40
+ comments_data,
41
+ vml_shape_id, z_index) do
42
42
  write_comment_shapetype
43
43
  end
44
44
  end
@@ -84,9 +84,9 @@ module Writexlsx
84
84
  def xml_attributes
85
85
  schema = 'urn:schemas-microsoft-com:'
86
86
  [
87
- ['xmlns:v', "#{schema}vml"],
88
- ['xmlns:o', "#{schema}office:office"],
89
- ['xmlns:x', "#{schema}office:excel"]
87
+ ['xmlns:v', "#{schema}vml"],
88
+ ['xmlns:o', "#{schema}office:office"],
89
+ ['xmlns:x', "#{schema}office:excel"]
90
90
  ]
91
91
  end
92
92
 
@@ -95,8 +95,8 @@ module Writexlsx
95
95
  #
96
96
  def write_shapelayout(data_id)
97
97
  attributes = [
98
- ['v:ext', 'edit']
99
- ]
98
+ ['v:ext', 'edit']
99
+ ]
100
100
 
101
101
  @writer.tag_elements('o:shapelayout', attributes) do
102
102
  # Write the o:idmap element.
@@ -121,10 +121,10 @@ module Writexlsx
121
121
  #
122
122
  def write_comment_shapetype
123
123
  attributes = [
124
- ['id', '_x0000_t202'],
125
- ['coordsize', '21600,21600'],
126
- ['o:spt', 202],
127
- ['path', 'm,l,21600r21600,l21600,xe']
124
+ ['id', '_x0000_t202'],
125
+ ['coordsize', '21600,21600'],
126
+ ['o:spt', 202],
127
+ ['path', 'm,l,21600r21600,l21600,xe']
128
128
  ]
129
129
 
130
130
  @writer.tag_elements('v:shapetype', attributes) do
@@ -140,11 +140,11 @@ module Writexlsx
140
140
  #
141
141
  def write_button_shapetype
142
142
  attributes = [
143
- ['id', '_x0000_t201'],
144
- ['coordsize', '21600,21600'],
145
- ['o:spt', 201],
146
- ['path', 'm,l,21600r21600,l21600,xe']
147
- ]
143
+ ['id', '_x0000_t201'],
144
+ ['coordsize', '21600,21600'],
145
+ ['o:spt', 201],
146
+ ['path', 'm,l,21600r21600,l21600,xe']
147
+ ]
148
148
 
149
149
  @writer.tag_elements('v:shapetype', attributes) do
150
150
  # Write the v:stroke element.
@@ -169,14 +169,14 @@ module Writexlsx
169
169
  stroked = 'f'
170
170
 
171
171
  attributes = [
172
- ['id', id],
173
- ['coordsize', coordsize],
174
- ['o:spt', spt],
175
- ['o:preferrelative', o_preferrelative],
176
- ['path', path],
177
- ['filled', filled],
178
- ['stroked', stroked]
179
- ]
172
+ ['id', id],
173
+ ['coordsize', coordsize],
174
+ ['o:spt', spt],
175
+ ['o:preferrelative', o_preferrelative],
176
+ ['path', path],
177
+ ['filled', filled],
178
+ ['stroked', stroked]
179
+ ]
180
180
 
181
181
  @writer.tag_elements('v:shapetype', attributes) do
182
182
  # Write the v:stroke element.
@@ -198,12 +198,12 @@ module Writexlsx
198
198
  #
199
199
  def write_button_path
200
200
  attributes = [
201
- ['shadowok', 'f'],
202
- ['o:extrusionok', 'f'],
203
- ['strokeok', 'f'],
204
- ['fillok', 'f'],
205
- ['o:connecttype', 'rect']
206
- ]
201
+ ['shadowok', 'f'],
202
+ ['o:extrusionok', 'f'],
203
+ ['strokeok', 'f'],
204
+ ['fillok', 'f'],
205
+ ['o:connecttype', 'rect']
206
+ ]
207
207
  @writer.empty_tag('v:path', attributes)
208
208
  end
209
209
 
@@ -216,10 +216,10 @@ module Writexlsx
216
216
  connecttype = 'rect'
217
217
 
218
218
  attributes = [
219
- ['o:extrusionok', extrusionok],
220
- ['gradientshapeok', gradientshapeok],
221
- ['o:connecttype', connecttype]
222
- ]
219
+ ['o:extrusionok', extrusionok],
220
+ ['gradientshapeok', gradientshapeok],
221
+ ['o:connecttype', connecttype]
222
+ ]
223
223
 
224
224
  @writer.empty_tag('v:path', attributes)
225
225
  end
@@ -229,9 +229,9 @@ module Writexlsx
229
229
  #
230
230
  def write_shapetype_lock
231
231
  attributes = [
232
- ['v:ext', 'edit'],
233
- ['shapetype', 't']
234
- ]
232
+ ['v:ext', 'edit'],
233
+ ['shapetype', 't']
234
+ ]
235
235
  @writer.empty_tag('o:lock', attributes)
236
236
  end
237
237
 
@@ -240,9 +240,9 @@ module Writexlsx
240
240
  #
241
241
  def write_rotation_lock
242
242
  attributes = [
243
- ['v:ext', 'edit'],
244
- ['rotation', 't']
245
- ]
243
+ ['v:ext', 'edit'],
244
+ ['rotation', 't']
245
+ ]
246
246
  @writer.empty_tag('o:lock', attributes)
247
247
  end
248
248
 
@@ -254,9 +254,9 @@ module Writexlsx
254
254
  aspectratio = 't'
255
255
 
256
256
  attributes = [
257
- ['v:ext', ext],
258
- ['aspectratio', aspectratio]
259
- ]
257
+ ['v:ext', ext],
258
+ ['aspectratio', aspectratio]
259
+ ]
260
260
 
261
261
  @writer.empty_tag('o:lock', attributes)
262
262
  end
@@ -277,6 +277,7 @@ module Writexlsx
277
277
  position = image_data[3]
278
278
  x_dpi = image_data[4]
279
279
  y_dpi = image_data[5]
280
+ ref_id = image_data[6]
280
281
 
281
282
  # Scale the height/width by the resolution, relative to 72dpi.
282
283
  width = width * 72.0 / x_dpi
@@ -294,20 +295,20 @@ module Writexlsx
294
295
  end
295
296
 
296
297
  style = [
297
- "position:absolute", "margin-left:0", "margin-top:0",
298
- "width:#{width}pt", "height:#{height}pt",
299
- "z-index:#{index}"
300
- ].join(';')
298
+ "position:absolute", "margin-left:0", "margin-top:0",
299
+ "width:#{width}pt", "height:#{height}pt",
300
+ "z-index:#{index}"
301
+ ].join(';')
301
302
  attributes = [
302
- ['id', position],
303
- ['o:spid', "_x0000_s#{id}"],
304
- ['type', type],
305
- ['style', style]
306
- ]
303
+ ['id', position],
304
+ ['o:spid', "_x0000_s#{id}"],
305
+ ['type', type],
306
+ ['style', style]
307
+ ]
307
308
 
308
309
  @writer.tag_elements('v:shape', attributes) do
309
310
  # Write the v:imagedata element.
310
- write_imagedata(index, name)
311
+ write_imagedata(ref_id, name)
311
312
 
312
313
  # Write the o:lock element.
313
314
  write_rotation_lock
@@ -319,9 +320,9 @@ module Writexlsx
319
320
  #
320
321
  def write_imagedata(index, o_title)
321
322
  attributes = [
322
- ['o:relid', "rId#{index}"],
323
- ['o:title', o_title]
324
- ]
323
+ ['o:relid', "rId#{index}"],
324
+ ['o:title', o_title]
325
+ ]
325
326
 
326
327
  @writer.empty_tag('v:imagedata', attributes)
327
328
  end
@@ -118,13 +118,14 @@ module Writexlsx
118
118
  end
119
119
 
120
120
  def escape_attributes(str = '')
121
- return str if !(str.to_s =~ /["&<>]/)
121
+ return str if !(str.to_s =~ /["&<>\n]/)
122
122
 
123
123
  str.
124
124
  gsub(/&/, "&amp;").
125
125
  gsub(/"/, "&quot;").
126
126
  gsub(/</, "&lt;").
127
- gsub(/>/, "&gt;")
127
+ gsub(/>/, "&gt;").
128
+ gsub(/\n/, "&#xA;")
128
129
  end
129
130
 
130
131
  def escape_data(str = '')
@@ -8,14 +8,14 @@ module Writexlsx
8
8
  # Used in conjunction with WriteXLSX.
9
9
  #
10
10
  # Copyright 2000-2012, John McNamara, jmcnamara@cpan.org
11
- # Converted to ruby by Hideo NAKAMURA, cxn03651@msj.biglobe.ne.jp
11
+ # Converted to ruby by Hideo NAKAMURA, nakamura.hideo@gmail.com
12
12
  #
13
13
  class Shape
14
14
  include Writexlsx::Utility
15
15
 
16
16
  attr_reader :edit_as, :type, :drawing
17
17
  attr_reader :tx_box, :fill, :line, :format
18
- attr_reader :align, :valign
18
+ attr_reader :align, :valign, :anchor
19
19
  attr_accessor :name, :connect, :type, :id, :start, :end, :rotation
20
20
  attr_accessor :flip_h, :flip_v, :adjustments, :palette, :text, :stencil
21
21
  attr_accessor :row_start, :row_end, :column_start, :column_end
@@ -154,15 +154,17 @@ module Writexlsx
154
154
  # EMUs per point. Therefore, 12,700 * 3 /4 = 9,525 EMUs per pixel.
155
155
  #
156
156
  def calc_position_emus(worksheet)
157
- c_start, r_start, xx1, yy1, c_end, r_end, xx2, yy2, x_abslt, y_abslt =
158
- worksheet.position_object_pixels(
159
- @column_start,
160
- @row_start,
161
- @x_offset,
162
- @y_offset,
163
- @width * @scale_x,
164
- @height * @scale_y
165
- )
157
+ c_start, r_start,
158
+ xx1, yy1, c_end, r_end,
159
+ xx2, yy2, x_abslt, y_abslt =
160
+ worksheet.position_object_pixels(
161
+ @column_start,
162
+ @row_start,
163
+ @x_offset,
164
+ @y_offset,
165
+ @width * @scale_x,
166
+ @height * @scale_y
167
+ )
166
168
 
167
169
  # Now that x2/y2 have been calculated with a potentially negative
168
170
  # width/height we use the absolute value and convert to EMUs.
@@ -183,11 +185,12 @@ module Writexlsx
183
185
  @y_abs = (y_abslt * 9_525).to_i
184
186
  end
185
187
 
186
- def set_position(row_start, column_start, x_offset, y_offset, x_scale, y_scale)
188
+ def set_position(row_start, column_start, x_offset, y_offset, x_scale, y_scale, anchor)
187
189
  @row_start = row_start
188
190
  @column_start = column_start
189
191
  @x_offset = x_offset || 0
190
192
  @y_offset = y_offset || 0
193
+ @anchor = anchor || 1
191
194
 
192
195
  # Override shape scale if supplied as an argument. Otherwise, use the
193
196
  # existing shape scale factors.
@@ -296,12 +299,12 @@ module Writexlsx
296
299
 
297
300
  def dimensions
298
301
  [
299
- @column_start, @row_start,
300
- @x1, @y1,
301
- @column_end, @row_end,
302
- @x2, @y2,
303
- @x_abs, @y_abs,
304
- @width_emu, @height_emu
302
+ @column_start, @row_start,
303
+ @x1, @y1,
304
+ @column_end, @row_end,
305
+ @x2, @y2,
306
+ @x_abs, @y_abs,
307
+ @width_emu, @height_emu
305
308
  ]
306
309
  end
307
310
  end
@@ -67,18 +67,18 @@ module Writexlsx
67
67
  vml = Package::Vml.new
68
68
  vml.set_xml_writer("#{dir}/vmlDrawing#{index}.vml")
69
69
  vml.assemble_xml_file(
70
- sheet.vml_data_id, sheet.vml_shape_id,
71
- sheet.sorted_comments, sheet.buttons_data
72
- )
70
+ sheet.vml_data_id, sheet.vml_shape_id,
71
+ sheet.sorted_comments, sheet.buttons_data
72
+ )
73
73
  index += 1
74
74
  end
75
75
  if sheet.has_header_vml?
76
76
  vml = Package::Vml.new
77
77
  vml.set_xml_writer("#{dir}/vmlDrawing#{index}.vml")
78
78
  vml.assemble_xml_file(
79
- sheet.vml_header_id, sheet.vml_header_id * 1024,
80
- [], [], sheet.header_images_data
81
- )
79
+ sheet.vml_header_id, sheet.vml_header_id * 1024,
80
+ [], [], sheet.header_images_data
81
+ )
82
82
  write_vml_drawing_rels_files(package_dir, sheet, index)
83
83
  index += 1
84
84
  end
@@ -106,16 +106,12 @@ module Writexlsx
106
106
  end
107
107
 
108
108
  def write_chartsheet_rels_files(package_dir)
109
- write_sheet_rels_files_base(chartsheets, "#{package_dir}/xl/chartsheets/_rels",
110
- 'sheet')
109
+ write_sheet_rels_files_base(
110
+ chartsheets, "#{package_dir}/xl/chartsheets/_rels", 'sheet'
111
+ )
111
112
  end
112
113
 
113
114
  def write_drawing_rels_files(package_dir)
114
- # write_rels_files_base(
115
- # self.reject { |sheet| sheet.drawing_links[0].empty? },
116
- # "#{package_dir}/xl/drawings/_rels",
117
-
118
- # )
119
115
  dir = "#{package_dir}/xl/drawings/_rels"
120
116
 
121
117
  index = 0
@@ -159,8 +155,9 @@ module Writexlsx
159
155
  end
160
156
 
161
157
  def write_worksheet_rels_files(package_dir)
162
- write_sheet_rels_files_base(worksheets, "#{package_dir}/xl/worksheets/_rels",
163
- 'sheet')
158
+ write_sheet_rels_files_base(
159
+ worksheets, "#{package_dir}/xl/worksheets/_rels", 'sheet'
160
+ )
164
161
  end
165
162
 
166
163
  def write_sheet_rels_files_base(sheets, dir, body)
@@ -230,10 +227,15 @@ module Writexlsx
230
227
  raise 'Invalid character []:*?/\\ in worksheet name: ' + name
231
228
  end
232
229
 
230
+ # Check that sheetname doesn't start or end with an apostrophe.
231
+ if name =~ /^'/ || name =~ /'$/
232
+ raise "Worksheet name #{name} cannot start or end with an "
233
+ end
234
+
233
235
  # Check that the worksheet name doesn't already exist since this is a fatal
234
236
  # error in Excel 97. The check must also exclude case insensitive matches.
235
237
  unless is_sheetname_uniq?(name)
236
- raise "Worksheet name '#{name}', with case ignored, is already used."
238
+ raise "apostropheWorksheet name '#{name}', with case ignored, is already used."
237
239
  end
238
240
  end
239
241