axlsx-alt 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (330) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +9 -0
  3. data/.yardopts_guide +19 -0
  4. data/CHANGELOG.md +244 -0
  5. data/LICENSE +22 -0
  6. data/README.md +180 -0
  7. data/Rakefile +29 -0
  8. data/examples/2010_comments.rb +17 -0
  9. data/examples/anchor_swapping.rb +28 -0
  10. data/examples/auto_filter.rb +25 -0
  11. data/examples/basic_charts.rb +58 -0
  12. data/examples/chart_colors.rb +88 -0
  13. data/examples/colored_links.rb +59 -0
  14. data/examples/conditional_formatting/example_conditional_formatting.rb +89 -0
  15. data/examples/conditional_formatting/getting_barred.rb +37 -0
  16. data/examples/conditional_formatting/hitting_the_high_notes.rb +37 -0
  17. data/examples/conditional_formatting/scaled_colors.rb +39 -0
  18. data/examples/conditional_formatting/stop_and_go.rb +37 -0
  19. data/examples/data_validation.rb +67 -0
  20. data/examples/example.rb +885 -0
  21. data/examples/extractive.rb +45 -0
  22. data/examples/image1.jpeg +0 -0
  23. data/examples/ios_preview.rb +14 -0
  24. data/examples/merge_cells.rb +17 -0
  25. data/examples/no_grid_with_borders.rb +18 -0
  26. data/examples/page_setup.rb +11 -0
  27. data/examples/pivot_table.rb +39 -0
  28. data/examples/pivot_test.rb +63 -0
  29. data/examples/sheet_protection.rb +10 -0
  30. data/examples/skydrive/real_example.rb +63 -0
  31. data/examples/split.rb +16 -0
  32. data/examples/styles.rb +66 -0
  33. data/examples/underline.rb +13 -0
  34. data/examples/wrap_text.rb +21 -0
  35. data/lib/axlsx.rb +171 -0
  36. data/lib/axlsx/content_type/abstract_content_type.rb +32 -0
  37. data/lib/axlsx/content_type/content_type.rb +26 -0
  38. data/lib/axlsx/content_type/default.rb +25 -0
  39. data/lib/axlsx/content_type/override.rb +25 -0
  40. data/lib/axlsx/doc_props/app.rb +235 -0
  41. data/lib/axlsx/doc_props/core.rb +39 -0
  42. data/lib/axlsx/drawing/area_chart.rb +99 -0
  43. data/lib/axlsx/drawing/area_series.rb +110 -0
  44. data/lib/axlsx/drawing/ax_data_source.rb +26 -0
  45. data/lib/axlsx/drawing/axes.rb +61 -0
  46. data/lib/axlsx/drawing/axis.rb +190 -0
  47. data/lib/axlsx/drawing/bar_3D_chart.rb +151 -0
  48. data/lib/axlsx/drawing/bar_chart.rb +143 -0
  49. data/lib/axlsx/drawing/bar_series.rb +82 -0
  50. data/lib/axlsx/drawing/bubble_chart.rb +59 -0
  51. data/lib/axlsx/drawing/bubble_series.rb +63 -0
  52. data/lib/axlsx/drawing/cat_axis.rb +85 -0
  53. data/lib/axlsx/drawing/chart.rb +276 -0
  54. data/lib/axlsx/drawing/d_lbls.rb +90 -0
  55. data/lib/axlsx/drawing/drawing.rb +167 -0
  56. data/lib/axlsx/drawing/graphic_frame.rb +54 -0
  57. data/lib/axlsx/drawing/hyperlink.rb +100 -0
  58. data/lib/axlsx/drawing/line_3D_chart.rb +68 -0
  59. data/lib/axlsx/drawing/line_chart.rb +99 -0
  60. data/lib/axlsx/drawing/line_series.rb +110 -0
  61. data/lib/axlsx/drawing/marker.rb +84 -0
  62. data/lib/axlsx/drawing/num_data.rb +52 -0
  63. data/lib/axlsx/drawing/num_data_source.rb +62 -0
  64. data/lib/axlsx/drawing/num_val.rb +34 -0
  65. data/lib/axlsx/drawing/one_cell_anchor.rb +99 -0
  66. data/lib/axlsx/drawing/pic.rb +211 -0
  67. data/lib/axlsx/drawing/picture_locking.rb +42 -0
  68. data/lib/axlsx/drawing/pie_3D_chart.rb +47 -0
  69. data/lib/axlsx/drawing/pie_series.rb +74 -0
  70. data/lib/axlsx/drawing/scaling.rb +60 -0
  71. data/lib/axlsx/drawing/scatter_chart.rb +74 -0
  72. data/lib/axlsx/drawing/scatter_series.rb +98 -0
  73. data/lib/axlsx/drawing/ser_axis.rb +45 -0
  74. data/lib/axlsx/drawing/series.rb +69 -0
  75. data/lib/axlsx/drawing/series_title.rb +23 -0
  76. data/lib/axlsx/drawing/str_data.rb +42 -0
  77. data/lib/axlsx/drawing/str_val.rb +34 -0
  78. data/lib/axlsx/drawing/title.rb +96 -0
  79. data/lib/axlsx/drawing/two_cell_anchor.rb +97 -0
  80. data/lib/axlsx/drawing/val_axis.rb +37 -0
  81. data/lib/axlsx/drawing/view_3D.rb +115 -0
  82. data/lib/axlsx/drawing/vml_drawing.rb +42 -0
  83. data/lib/axlsx/drawing/vml_shape.rb +66 -0
  84. data/lib/axlsx/package.rb +358 -0
  85. data/lib/axlsx/rels/relationship.rb +137 -0
  86. data/lib/axlsx/rels/relationships.rb +32 -0
  87. data/lib/axlsx/stylesheet/border.rb +71 -0
  88. data/lib/axlsx/stylesheet/border_pr.rb +71 -0
  89. data/lib/axlsx/stylesheet/cell_alignment.rb +132 -0
  90. data/lib/axlsx/stylesheet/cell_protection.rb +41 -0
  91. data/lib/axlsx/stylesheet/cell_style.rb +72 -0
  92. data/lib/axlsx/stylesheet/color.rb +76 -0
  93. data/lib/axlsx/stylesheet/dxf.rb +79 -0
  94. data/lib/axlsx/stylesheet/fill.rb +35 -0
  95. data/lib/axlsx/stylesheet/font.rb +148 -0
  96. data/lib/axlsx/stylesheet/gradient_fill.rb +103 -0
  97. data/lib/axlsx/stylesheet/gradient_stop.rb +37 -0
  98. data/lib/axlsx/stylesheet/num_fmt.rb +86 -0
  99. data/lib/axlsx/stylesheet/pattern_fill.rb +73 -0
  100. data/lib/axlsx/stylesheet/styles.rb +420 -0
  101. data/lib/axlsx/stylesheet/table_style.rb +54 -0
  102. data/lib/axlsx/stylesheet/table_style_element.rb +77 -0
  103. data/lib/axlsx/stylesheet/table_styles.rb +46 -0
  104. data/lib/axlsx/stylesheet/xf.rb +147 -0
  105. data/lib/axlsx/util/accessors.rb +64 -0
  106. data/lib/axlsx/util/constants.rb +400 -0
  107. data/lib/axlsx/util/mime_type_utils.rb +11 -0
  108. data/lib/axlsx/util/options_parser.rb +16 -0
  109. data/lib/axlsx/util/parser.rb +44 -0
  110. data/lib/axlsx/util/serialized_attributes.rb +89 -0
  111. data/lib/axlsx/util/simple_typed_list.rb +179 -0
  112. data/lib/axlsx/util/storage.rb +146 -0
  113. data/lib/axlsx/util/validators.rb +312 -0
  114. data/lib/axlsx/version.rb +3 -0
  115. data/lib/axlsx/workbook/defined_name.rb +128 -0
  116. data/lib/axlsx/workbook/defined_names.rb +21 -0
  117. data/lib/axlsx/workbook/shared_strings_table.rb +77 -0
  118. data/lib/axlsx/workbook/workbook.rb +379 -0
  119. data/lib/axlsx/workbook/workbook_view.rb +80 -0
  120. data/lib/axlsx/workbook/workbook_views.rb +22 -0
  121. data/lib/axlsx/workbook/worksheet/auto_filter/auto_filter.rb +77 -0
  122. data/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb +94 -0
  123. data/lib/axlsx/workbook/worksheet/auto_filter/filters.rb +244 -0
  124. data/lib/axlsx/workbook/worksheet/break.rb +35 -0
  125. data/lib/axlsx/workbook/worksheet/cell.rb +478 -0
  126. data/lib/axlsx/workbook/worksheet/cell_serializer.rb +164 -0
  127. data/lib/axlsx/workbook/worksheet/cfvo.rb +60 -0
  128. data/lib/axlsx/workbook/worksheet/cfvos.rb +18 -0
  129. data/lib/axlsx/workbook/worksheet/col.rb +141 -0
  130. data/lib/axlsx/workbook/worksheet/col_breaks.rb +35 -0
  131. data/lib/axlsx/workbook/worksheet/color_scale.rb +110 -0
  132. data/lib/axlsx/workbook/worksheet/cols.rb +23 -0
  133. data/lib/axlsx/workbook/worksheet/comment.rb +90 -0
  134. data/lib/axlsx/workbook/worksheet/comments.rb +97 -0
  135. data/lib/axlsx/workbook/worksheet/conditional_formatting.rb +82 -0
  136. data/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb +220 -0
  137. data/lib/axlsx/workbook/worksheet/conditional_formattings.rb +25 -0
  138. data/lib/axlsx/workbook/worksheet/data_bar.rb +129 -0
  139. data/lib/axlsx/workbook/worksheet/data_validation.rb +246 -0
  140. data/lib/axlsx/workbook/worksheet/data_validations.rb +28 -0
  141. data/lib/axlsx/workbook/worksheet/date_time_converter.rb +30 -0
  142. data/lib/axlsx/workbook/worksheet/dimension.rb +64 -0
  143. data/lib/axlsx/workbook/worksheet/header_footer.rb +52 -0
  144. data/lib/axlsx/workbook/worksheet/icon_set.rb +81 -0
  145. data/lib/axlsx/workbook/worksheet/merged_cells.rb +37 -0
  146. data/lib/axlsx/workbook/worksheet/outline_pr.rb +33 -0
  147. data/lib/axlsx/workbook/worksheet/page_margins.rb +97 -0
  148. data/lib/axlsx/workbook/worksheet/page_set_up_pr.rb +44 -0
  149. data/lib/axlsx/workbook/worksheet/page_setup.rb +240 -0
  150. data/lib/axlsx/workbook/worksheet/pane.rb +139 -0
  151. data/lib/axlsx/workbook/worksheet/pivot_table.rb +289 -0
  152. data/lib/axlsx/workbook/worksheet/pivot_table_cache_definition.rb +66 -0
  153. data/lib/axlsx/workbook/worksheet/pivot_tables.rb +24 -0
  154. data/lib/axlsx/workbook/worksheet/print_options.rb +39 -0
  155. data/lib/axlsx/workbook/worksheet/protected_range.rb +47 -0
  156. data/lib/axlsx/workbook/worksheet/protected_ranges.rb +37 -0
  157. data/lib/axlsx/workbook/worksheet/rich_text.rb +55 -0
  158. data/lib/axlsx/workbook/worksheet/rich_text_run.rb +250 -0
  159. data/lib/axlsx/workbook/worksheet/row.rb +161 -0
  160. data/lib/axlsx/workbook/worksheet/row_breaks.rb +33 -0
  161. data/lib/axlsx/workbook/worksheet/selection.rb +101 -0
  162. data/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb +29 -0
  163. data/lib/axlsx/workbook/worksheet/sheet_data.rb +27 -0
  164. data/lib/axlsx/workbook/worksheet/sheet_format_pr.rb +60 -0
  165. data/lib/axlsx/workbook/worksheet/sheet_pr.rb +87 -0
  166. data/lib/axlsx/workbook/worksheet/sheet_protection.rb +118 -0
  167. data/lib/axlsx/workbook/worksheet/sheet_view.rb +213 -0
  168. data/lib/axlsx/workbook/worksheet/table.rb +102 -0
  169. data/lib/axlsx/workbook/worksheet/table_style_info.rb +49 -0
  170. data/lib/axlsx/workbook/worksheet/tables.rb +34 -0
  171. data/lib/axlsx/workbook/worksheet/worksheet.rb +756 -0
  172. data/lib/axlsx/workbook/worksheet/worksheet_comments.rb +58 -0
  173. data/lib/axlsx/workbook/worksheet/worksheet_drawing.rb +58 -0
  174. data/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb +74 -0
  175. data/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb +38 -0
  176. data/lib/schema/dc.xsd +118 -0
  177. data/lib/schema/dcmitype.xsd +52 -0
  178. data/lib/schema/dcterms.xsd +331 -0
  179. data/lib/schema/dml-chart.xsd +1499 -0
  180. data/lib/schema/dml-chartDrawing.xsd +146 -0
  181. data/lib/schema/dml-compatibility.xsd +14 -0
  182. data/lib/schema/dml-diagram.xsd +1091 -0
  183. data/lib/schema/dml-lockedCanvas.xsd +11 -0
  184. data/lib/schema/dml-main.xsd +3048 -0
  185. data/lib/schema/dml-picture.xsd +23 -0
  186. data/lib/schema/dml-spreadsheetDrawing.xsd +185 -0
  187. data/lib/schema/dml-wordprocessingDrawing.xsd +185 -0
  188. data/lib/schema/opc-contentTypes.xsd +42 -0
  189. data/lib/schema/opc-coreProperties.xsd +54 -0
  190. data/lib/schema/opc-digSig.xsd +49 -0
  191. data/lib/schema/opc-relationships.xsd +33 -0
  192. data/lib/schema/pml.xsd +1676 -0
  193. data/lib/schema/shared-additionalCharacteristics.xsd +28 -0
  194. data/lib/schema/shared-bibliography.xsd +144 -0
  195. data/lib/schema/shared-commonSimpleTypes.xsd +166 -0
  196. data/lib/schema/shared-customXmlDataProperties.xsd +25 -0
  197. data/lib/schema/shared-customXmlSchemaProperties.xsd +18 -0
  198. data/lib/schema/shared-documentPropertiesCustom.xsd +59 -0
  199. data/lib/schema/shared-documentPropertiesExtended.xsd +56 -0
  200. data/lib/schema/shared-documentPropertiesVariantTypes.xsd +195 -0
  201. data/lib/schema/shared-math.xsd +582 -0
  202. data/lib/schema/shared-relationshipReference.xsd +25 -0
  203. data/lib/schema/sml.xsd +4434 -0
  204. data/lib/schema/vml-main.xsd +569 -0
  205. data/lib/schema/vml-officeDrawing.xsd +509 -0
  206. data/lib/schema/vml-presentationDrawing.xsd +12 -0
  207. data/lib/schema/vml-spreadsheetDrawing.xsd +108 -0
  208. data/lib/schema/vml-wordprocessingDrawing.xsd +96 -0
  209. data/lib/schema/wml.xsd +3644 -0
  210. data/lib/schema/xml.xsd +116 -0
  211. data/test/benchmark.rb +72 -0
  212. data/test/content_type/tc_content_type.rb +76 -0
  213. data/test/content_type/tc_default.rb +16 -0
  214. data/test/content_type/tc_override.rb +14 -0
  215. data/test/doc_props/tc_app.rb +43 -0
  216. data/test/doc_props/tc_core.rb +42 -0
  217. data/test/drawing/tc_area_chart.rb +39 -0
  218. data/test/drawing/tc_area_series.rb +71 -0
  219. data/test/drawing/tc_axes.rb +8 -0
  220. data/test/drawing/tc_axis.rb +112 -0
  221. data/test/drawing/tc_bar_3D_chart.rb +71 -0
  222. data/test/drawing/tc_bar_chart.rb +71 -0
  223. data/test/drawing/tc_bar_series.rb +37 -0
  224. data/test/drawing/tc_bubble_chart.rb +44 -0
  225. data/test/drawing/tc_bubble_series.rb +21 -0
  226. data/test/drawing/tc_cat_axis.rb +31 -0
  227. data/test/drawing/tc_cat_axis_data.rb +27 -0
  228. data/test/drawing/tc_chart.rb +123 -0
  229. data/test/drawing/tc_d_lbls.rb +57 -0
  230. data/test/drawing/tc_data_source.rb +23 -0
  231. data/test/drawing/tc_drawing.rb +80 -0
  232. data/test/drawing/tc_graphic_frame.rb +27 -0
  233. data/test/drawing/tc_hyperlink.rb +64 -0
  234. data/test/drawing/tc_line_3d_chart.rb +47 -0
  235. data/test/drawing/tc_line_chart.rb +39 -0
  236. data/test/drawing/tc_line_series.rb +71 -0
  237. data/test/drawing/tc_marker.rb +44 -0
  238. data/test/drawing/tc_named_axis_data.rb +27 -0
  239. data/test/drawing/tc_num_data.rb +31 -0
  240. data/test/drawing/tc_num_val.rb +29 -0
  241. data/test/drawing/tc_one_cell_anchor.rb +66 -0
  242. data/test/drawing/tc_pic.rb +103 -0
  243. data/test/drawing/tc_picture_locking.rb +72 -0
  244. data/test/drawing/tc_pie_3D_chart.rb +28 -0
  245. data/test/drawing/tc_pie_series.rb +32 -0
  246. data/test/drawing/tc_scaling.rb +36 -0
  247. data/test/drawing/tc_scatter_chart.rb +48 -0
  248. data/test/drawing/tc_scatter_series.rb +56 -0
  249. data/test/drawing/tc_ser_axis.rb +31 -0
  250. data/test/drawing/tc_series.rb +23 -0
  251. data/test/drawing/tc_series_title.rb +33 -0
  252. data/test/drawing/tc_str_data.rb +18 -0
  253. data/test/drawing/tc_str_val.rb +30 -0
  254. data/test/drawing/tc_title.rb +54 -0
  255. data/test/drawing/tc_two_cell_anchor.rb +36 -0
  256. data/test/drawing/tc_val_axis.rb +24 -0
  257. data/test/drawing/tc_view_3D.rb +54 -0
  258. data/test/drawing/tc_vml_drawing.rb +25 -0
  259. data/test/drawing/tc_vml_shape.rb +106 -0
  260. data/test/profile.rb +24 -0
  261. data/test/rels/tc_relationship.rb +44 -0
  262. data/test/rels/tc_relationships.rb +37 -0
  263. data/test/stylesheet/tc_border.rb +37 -0
  264. data/test/stylesheet/tc_border_pr.rb +32 -0
  265. data/test/stylesheet/tc_cell_alignment.rb +81 -0
  266. data/test/stylesheet/tc_cell_protection.rb +29 -0
  267. data/test/stylesheet/tc_cell_style.rb +57 -0
  268. data/test/stylesheet/tc_color.rb +43 -0
  269. data/test/stylesheet/tc_dxf.rb +81 -0
  270. data/test/stylesheet/tc_fill.rb +18 -0
  271. data/test/stylesheet/tc_font.rb +121 -0
  272. data/test/stylesheet/tc_gradient_fill.rb +72 -0
  273. data/test/stylesheet/tc_gradient_stop.rb +31 -0
  274. data/test/stylesheet/tc_num_fmt.rb +30 -0
  275. data/test/stylesheet/tc_pattern_fill.rb +43 -0
  276. data/test/stylesheet/tc_styles.rb +235 -0
  277. data/test/stylesheet/tc_table_style.rb +44 -0
  278. data/test/stylesheet/tc_table_style_element.rb +45 -0
  279. data/test/stylesheet/tc_table_styles.rb +29 -0
  280. data/test/stylesheet/tc_xf.rb +120 -0
  281. data/test/tc_axlsx.rb +103 -0
  282. data/test/tc_helper.rb +12 -0
  283. data/test/tc_package.rb +245 -0
  284. data/test/util/tc_mime_type_utils.rb +13 -0
  285. data/test/util/tc_serialized_attributes.rb +19 -0
  286. data/test/util/tc_simple_typed_list.rb +77 -0
  287. data/test/util/tc_validators.rb +210 -0
  288. data/test/workbook/tc_defined_name.rb +49 -0
  289. data/test/workbook/tc_shared_strings_table.rb +59 -0
  290. data/test/workbook/tc_workbook.rb +160 -0
  291. data/test/workbook/tc_workbook_view.rb +50 -0
  292. data/test/workbook/worksheet/auto_filter/tc_auto_filter.rb +38 -0
  293. data/test/workbook/worksheet/auto_filter/tc_filter_column.rb +76 -0
  294. data/test/workbook/worksheet/auto_filter/tc_filters.rb +50 -0
  295. data/test/workbook/worksheet/tc_break.rb +49 -0
  296. data/test/workbook/worksheet/tc_cell.rb +387 -0
  297. data/test/workbook/worksheet/tc_cfvo.rb +31 -0
  298. data/test/workbook/worksheet/tc_col.rb +78 -0
  299. data/test/workbook/worksheet/tc_color_scale.rb +58 -0
  300. data/test/workbook/worksheet/tc_comment.rb +72 -0
  301. data/test/workbook/worksheet/tc_comments.rb +57 -0
  302. data/test/workbook/worksheet/tc_conditional_formatting.rb +224 -0
  303. data/test/workbook/worksheet/tc_data_bar.rb +46 -0
  304. data/test/workbook/worksheet/tc_data_validation.rb +265 -0
  305. data/test/workbook/worksheet/tc_date_time_converter.rb +124 -0
  306. data/test/workbook/worksheet/tc_header_footer.rb +151 -0
  307. data/test/workbook/worksheet/tc_icon_set.rb +45 -0
  308. data/test/workbook/worksheet/tc_outline_pr.rb +19 -0
  309. data/test/workbook/worksheet/tc_page_margins.rb +97 -0
  310. data/test/workbook/worksheet/tc_page_set_up_pr.rb +15 -0
  311. data/test/workbook/worksheet/tc_page_setup.rb +143 -0
  312. data/test/workbook/worksheet/tc_pane.rb +54 -0
  313. data/test/workbook/worksheet/tc_pivot_table.rb +135 -0
  314. data/test/workbook/worksheet/tc_pivot_table_cache_definition.rb +54 -0
  315. data/test/workbook/worksheet/tc_print_options.rb +72 -0
  316. data/test/workbook/worksheet/tc_protected_range.rb +17 -0
  317. data/test/workbook/worksheet/tc_rich_text.rb +44 -0
  318. data/test/workbook/worksheet/tc_rich_text_run.rb +172 -0
  319. data/test/workbook/worksheet/tc_row.rb +122 -0
  320. data/test/workbook/worksheet/tc_selection.rb +55 -0
  321. data/test/workbook/worksheet/tc_sheet_calc_pr.rb +18 -0
  322. data/test/workbook/worksheet/tc_sheet_format_pr.rb +88 -0
  323. data/test/workbook/worksheet/tc_sheet_pr.rb +49 -0
  324. data/test/workbook/worksheet/tc_sheet_protection.rb +117 -0
  325. data/test/workbook/worksheet/tc_sheet_view.rb +214 -0
  326. data/test/workbook/worksheet/tc_table.rb +67 -0
  327. data/test/workbook/worksheet/tc_table_style_info.rb +53 -0
  328. data/test/workbook/worksheet/tc_worksheet.rb +597 -0
  329. data/test/workbook/worksheet/tc_worksheet_hyperlink.rb +55 -0
  330. metadata +601 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9e1106fc7db2add6488d2731ee6e4a26c5e59d6dbeefdb41f3b226568751af7b
4
+ data.tar.gz: 1fa7b547cebe3f288da5bf3cee9e2038353e1836a4e50798019af69fc844a0ec
5
+ SHA512:
6
+ metadata.gz: 0bbf541972293c4af4c85672eb0c78214a7dcb9a0cee7e3e2e29247cb257ae5cf082a5abdbd34ee0a7d2bb9f223ff3b595a3e449d2b6f902b0e0d40c99f5e177
7
+ data.tar.gz: 7ca7afb3fbdc7172dc0662cbde14203a690948794c113b1999b87086df9eb8d21e8f0f539ae0f33e2f39f57eb21c95b4c131dd23f8d66a7ddc98113813f0a44d
@@ -0,0 +1,9 @@
1
+ --protected
2
+ --no-private
3
+ --title "AXLSX"
4
+ --readme README.md
5
+ --markup markdown
6
+ --markup-provider kramdown
7
+ -
8
+ CHANGELOG.md
9
+ LICENSE
@@ -0,0 +1,19 @@
1
+ -t guide
2
+ --title YARD
3
+ -o doc_guide
4
+ --exclude /server/templates/
5
+ --exclude /yard/rubygems/
6
+ --asset docs/images:images
7
+ -
8
+ docs/WhatsNew.md
9
+ docs/GettingStarted.md
10
+ docs/Overview.md
11
+ docs/CodeObjects.md
12
+ docs/Tags.md
13
+ docs/Parser.md
14
+ docs/Handlers.md
15
+ docs/Templates.md
16
+ docs/Glossary.md
17
+ ChangeLog
18
+ LICENSE
19
+ LEGAL
@@ -0,0 +1,244 @@
1
+ CHANGELOG
2
+ ---------
3
+ - **April.1.17**:3.0.0-pre
4
+ - Support for ruby versions limited to officially supported version
5
+ - Updates to dependency gems, especially nokogiri and ruby-zip
6
+ - Patch options parsing for two cell anchor
7
+ - Remove support for depreciated worksheet members
8
+ - **November.25.12**:1.3.4
9
+ - Support for headers and footers for worksheets
10
+ - bug fix: Properly escape hyperlink urls
11
+ - Improvements in color_scale generation for conditional formatting
12
+ - Improvements in autowidth calculation.
13
+ - **November.8.12**:1.3.3
14
+ - Patched cell run styles for u and validation for family
15
+
16
+ - **November.5.12**:1.3.2
17
+ - MASSIVE REFACTORING
18
+ - Patch for apostrophes in worksheet names
19
+ - added sheet_by_name for workbook so you can now find your worksheets
20
+ by name
21
+ - added insert_worksheet so you can now add a worksheet to an
22
+ arbitrary position in the worksheets list.
23
+ - reduced memory consumption for package parts post serialization
24
+ - **September.30.12**: 1.3.1
25
+ - Improved control character handling
26
+ - Added stored auto filter values and date grouping items
27
+ - Improved support for autowidth when custom styles are applied
28
+ - Added support for table style info that lets you take advantage of
29
+ all the predefined table styles.
30
+ - Improved style management for fonts so they merge undefined values
31
+ from the initial master.
32
+ - **September.8.12**: 1.2.3
33
+ - enhance exponential float/bigdecimal values rendering as strings intead
34
+ of 'numbers' in excel.
35
+ - added support for :none option on chart axis labels
36
+ - added support for paper_size option on worksheet.page_setup
37
+ - **August.27.12**: 1.2.2
38
+ - minor patch for auto-filters
39
+ - minor documentation improvements.
40
+ - **August.12.12**: 1.2.1
41
+ - Add support for hyperlinks in worksheets
42
+ - Fix example that was using old style cell merging with concact.
43
+ - Fix bug that occurs when calculating the font_size for cells that use a user specified style which does not define sz
44
+ - **August.5.12**: 1.2.0
45
+ - rebuilt worksheet serialization to clean up the code base a bit.
46
+ - added data labels for charts
47
+ - added table header printing for each sheet via defined_name. This
48
+ means that when you print your worksheet, the header rows show for every page
49
+ - **July.??.12**: 1.1.9 release
50
+ - lots of code clean up for worksheet
51
+ - added in data labels for pie charts, line charts and bar charts.
52
+ - bugfix chard with data in a sheet that has a space in the name are
53
+ now auto updating formula based values
54
+ - **July.14.12**: 1.1.8 release
55
+ - added html entity encoding for sheet names. This allows you to use
56
+ characters like '<' and '&' in your sheet names.
57
+ - new - first round google docs interoperability
58
+ - added filter to strip out control characters from cell data.
59
+ - added in interop requirements so that charts are properly exported
60
+ to PDF from Libra Office
61
+ - various readability improvements and work standardizing attribute
62
+ names to snake_case. Aliases are provided for backward compatiblity
63
+ - **June.11.12**: 1.1.7 release
64
+ - fix chart rendering issue when label offset is specified as a
65
+ percentage in serialization and ensure that formula are not stored
66
+ in value caches
67
+ - fix bug that causes repair warnings when using a text only title reference.
68
+ - Add title property to axis so you can lable the x/y/series axis for
69
+ charts.
70
+ - Add sheet views with panes
71
+ - **May.30.12**: 1.1.6 release
72
+ - data protection with passwords for sheets
73
+ - cell level input validators
74
+ - added support for two cell anchors for images
75
+ - test coverage now back up to 100%
76
+ - bugfix for merge cell sorting algorithm
77
+ - added fit_to method for page_setup to simplify managing witdh/height
78
+ - added ph (phonetics) and s (style) attributes for row.
79
+ - resolved all warnings generating from this gem.
80
+ - improved comment relationship management for multiple comments
81
+ - **May.13.12**: 1.1.5 release
82
+ - MOAR print options! You can now specify paper size, orientation,
83
+ fit to width, page margings and gridlines for printing.
84
+ - Support for adding comments to your worksheets
85
+ - bugfix for applying style to empty cells
86
+ - bugfix for parsing formula with multiple '='
87
+
88
+ - **May.3.12:**: 1.1.4 release
89
+ - MOAR examples
90
+ - added outline level for rows and columns
91
+ - rebuild of numeric and axis data sources for charts
92
+ - added delete to axis
93
+ - added tick and label mark skipping for cat axis in charts
94
+ - bugfix for table headers method
95
+ - sane(er) defaults for chart positioning
96
+ - bugfix in val_axis_data to properly serialize value axis data. Excel does not mind as it reads from the sheet, but nokogiri has a fit if the elements are empty.
97
+ - Added support for specifying the color of data series in charts.
98
+ - bugfix using add_cell on row mismanaged calls to update_column_info.
99
+
100
+ - ** April.25.12:**: 1.1.3 release
101
+ - Primarily because I am stupid.....Updates to readme to properly report version, add in missing docs and restructure example directory.
102
+
103
+ - ** April.25.12:**: 1.1.2 release
104
+ - Conditional Formatting completely implemented.
105
+ - refactoring / documentation for Style#add_style
106
+ - added in label rotation for chart axis labels
107
+ - bugfix to properly assign style and type info to cells when only partial information is provided in the types/style option
108
+
109
+ - ** April.18.12**: 1.1.1 release
110
+ - bugfix for autowidth calculations across multiple rows
111
+ - bugfix for dimension calculations with nil cells.
112
+ - REMOVED RMAGICK dependency WOOT!
113
+ - Update readme to show screenshot of gem output.
114
+ - Cleanup benchmark and add benchmark rake task
115
+
116
+ - ** April.3.12**: 1.1.0 release
117
+ - bugfix patch name_to_indecies to properly handle extended ranges.
118
+ - bugfix properly serialize chart title.
119
+ - lower rake minimum requirement for 1.8.7 apps that don't want to move on to 0.9 NOTE this will be reverted for 2.0.0 with workbook parsing!
120
+ - Added Fit to Page printing
121
+ - added support for turning off gridlines in charts.
122
+ - added support for turning off gridlines in worksheet.
123
+ - bugfix some apps like libraoffice require apply[x] attributes to be true. applyAlignment is now properly set.
124
+ - added option use_autowidth. When this is false RMagick will not be loaded or used in the stack. However it is still a requirement in the gem.
125
+ - added border style specification to styles#add_style. See the example in the readme.
126
+ - Support for tables added in - Note: Pre 2011 versions of Mac office do not support this feature and will warn.
127
+ - Support for splatter charts added
128
+ - Major (like 7x faster!) performance updates.
129
+ - Gem now supports for JRuby 1.6.7, as well as experimental support for Rubinius
130
+
131
+ - ** March.5.12**: 1.0.18 release
132
+ https://github.com/randym/axlsx/compare/1.0.17...1.0.18
133
+ - bugfix custom borders are not properly applied when using styles.add_style
134
+ - interop worksheet names must be 31 characters or less or some versions of office complain about repairs
135
+ - added type support for :boolean and :date types cell values
136
+ - added support for fixed column widths
137
+ - added support for page_margins
138
+ - added << alias for add_row
139
+ - removed presetting of date1904 based on authoring platform. Now defaults to use 1900 epoch (date1904 = false)
140
+
141
+ - ** February.14.12**: 1.0.17 release
142
+ https://github.com/randym/axlsx/compare/1.0.16...1.0.17
143
+ - Added in support for serializing to StringIO
144
+ - Added in support for using shared strings table. This makes most of the features in axlsx interoperable with iWorks Numbers
145
+ - Added in support for fixed column_widths
146
+ - Removed unneeded dependencies on active-support and i18n
147
+
148
+ - ** February.2.12**: 1.0.16 release
149
+ https://github.com/randym/axlsx/compare/1.0.15...1.0.16
150
+ - Bug fix for schema file locations when validating in rails
151
+ - Added hyperlink to images
152
+ - date1904 now automatically set in BSD and mac environments
153
+ - removed whitespace/indentation from xml outputs
154
+ - col_style now skips rows that do not contain cells at the column index
155
+
156
+ - **January.6.12**: 1.0.15 release
157
+ https://github.com/randym/axlsx/compare/1.0.14...1.0.15
158
+ - Bug fix add_style specified number formats must be explicity applied for libraOffice
159
+ - performance improvements from ochko when creating cells with options.
160
+ - Bug fix setting types=>[:n] when adding a row incorrectly determines the cell type to be string as the value is null during creation.
161
+ - Release in preparation for password protection merge
162
+
163
+ - **December.14.11**: 1.0.14 release
164
+ - Added support for merging cells
165
+ - Added support for auto filters
166
+ - Improved auto width calculations
167
+ - Improved charts
168
+ - Updated examples to output to a single workbook with multiple sheets
169
+ - Added access to app and core package objects so you can set the creator and other properties of the package
170
+ - The beginning of password protected xlsx files - roadmapped for January release.
171
+
172
+ - **December.8.11**: 1.0.13 release
173
+ - Fixing .gemspec errors that caused gem to miss the lib directory. Sorry about that.
174
+
175
+ - **December.7.11**: 1.0.12 release
176
+ DO NOT USE THIS VERSION = THE GEM IS BROKEN
177
+ - changed dependency from 'zip' gem to 'rubyzip' and added conditional code to force binary encoding to resolve issue with excel 2011
178
+ - Patched bug in app.xml that would ignore user specified properties.
179
+ - **December.5.11**: 1.0.11 release
180
+ - Added [] methods to worksheet and workbook to provide name based access to cells.
181
+ - Added support for functions as cell values
182
+ - Updated color creation so that two character shorthand values can be used like 'FF' for 'FFFFFFFF' or 'D8' for 'FFD8D8D8'
183
+ - Examples for all this fun stuff added to the readme
184
+ - Clean up and support for 1.9.2 and travis integration
185
+ - Added support for string based cell referencing to chart start_at and end_at. That means you can now use :start_at=>"A1" when using worksheet.add_chart, or chart.start_at ="A1" in addition to passing a cell or the x, y coordinates.
186
+
187
+ - **October.30.11**: 1.0.10 release
188
+ - Updating gemspec to lower gem version requirements.
189
+ - Added row.style assignation for updating the cell style for an entire row
190
+ - Added col_style method to worksheet upate a the style for a column of cells
191
+ - Added cols for an easy reference to columns in a worksheet.
192
+ - prep for pre release of acts_as_xlsx gem
193
+ - added in travis.ci configuration and build status
194
+ - fixed out of range bug in time calculations for 32bit time.
195
+ - added i18n for active support
196
+
197
+ - **October.26.11**: 1.0.9 release
198
+ - Updated to support ruby 1.9.3
199
+ - Updated to eliminate all warnings originating in this gem
200
+
201
+ - **October.23.11**: 1.0.8 release
202
+ - Added support for images (jpg, gif, png) in worksheets.
203
+
204
+ - **October.23.11**: 1.0.7 released
205
+ - Added support for 3D options when creating a new chart. This lets you set the persective, rotation and other 3D attributes when using worksheet.add_chart
206
+ - Updated serialization write test to verify write permissions and warn if it cannot run the test due to permission restrcitions.
207
+ - updated rake to include build, genoc and deploy tasks.
208
+ - rebuilt documentation.
209
+ - moved version constant to its own file
210
+ - fixed bug in SerAxis that was requiring tickLblSkip and tickMarkSkip to be boolean. Should be unsigned int.
211
+ - Review and improve docs
212
+ - rebuild of anchor positioning to remove some spagetti code. Chart now supports a start_at and end_at method that accept an arrar for col/row positioning. See example6 for an example. You can still pass :start_at and :end_at options to worksheet.add_chart.
213
+ - Refactored cat and val axis data to keep series serialization a bit more DRY
214
+
215
+ ##October.22.11: 1.0.6 release
216
+ - Bumping version to include docs. Bug in gemspec pointing to incorrect directory.
217
+
218
+ ##October.22.11: 1.05
219
+ - Added support for line charts
220
+ - Updated examples and readme
221
+ - Updated series title to be a real title ** NOTE ** If you are accessing titles directly you will need to update text assignation.
222
+ chart.series.first.title = 'Your Title'
223
+ chart.series.first.title.text = 'Your Title'
224
+ With this change you can assign a cell for the series title
225
+ chart.series.title = sheet.rows.first.cells.first
226
+ If you are using the recommended
227
+ chart.add_series :data=>[], :labels=>[], :title
228
+ You do not have to change anything.
229
+ - BugFix: shape attribute for bar chart is now properly serialized
230
+ - BugFix: date1904 property now properly set for charts
231
+ - Added style property to charts
232
+ - Removed serialization write test as it most commonly fails when run from the gem's intalled directory
233
+
234
+ ##October.21.11: 1.0.4
235
+ - altered package to accept a filename string for serialization instead of a File object.
236
+ - Updated specs to conform
237
+ - More examples for readme
238
+
239
+
240
+ ##October.21.11: 1.0.3 release
241
+ - Updated documentation
242
+
243
+ ##October.20.11: 0.1.0 release
244
+
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2011, 2012 Randy Morgan
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,180 @@
1
+ Axlsx: Office Open XML Spreadsheet Generation
2
+ ====================================
3
+
4
+ [![Build Status](https://secure.travis-ci.org/fernandoluizao/axlsx-alt.svg?branch=master)](http://travis-ci.org/fernandoluizao/axlsx-alt/)
5
+
6
+ **Git**: [http://github.com/fernandoluizao/axlsx-alt](http://github.com/fernandoluizao/axlsx-alt)
7
+
8
+ **Author**: Randy Morgan
9
+
10
+ **License**: MIT License
11
+
12
+ **Latest Version**: 3.0.0
13
+
14
+ **Ruby Version**: 2.2+
15
+
16
+ **JRuby Version**: 1.9 modes
17
+
18
+ **Rubinius Version**: rubinius 3 * lower versions may run, this gem always tests against head.
19
+
20
+ If you are working with ActiveAdmin see:
21
+
22
+ [activeadmin-axlsx](http://github.com/randym/activeadmin-axlsx)
23
+
24
+ It provides a plugin and dsl for generating downloadable reports.
25
+
26
+ The examples directory contains a number of more specific examples as
27
+ well.
28
+
29
+ Synopsis
30
+ --------
31
+
32
+ Axlsx is an Office Open XML Spreadsheet generator for the Ruby programming language.
33
+ With Axlsx you can create excel worksheets with charts, images (with links), automated and fixed column widths, customized styles, functions, tables, conditional formatting, print options, comments, merged cells, auto filters, file and stream serialization as well as full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification.
34
+
35
+ ![Screen 1](https://github.com/randym/axlsx/raw/master/examples/sample.png)
36
+
37
+ Feature List
38
+ ------------
39
+
40
+ 1. Author xlsx documents: Axlsx is made to let you easily and quickly generate professional xlsx based reports that can be validated before serialization.
41
+
42
+ 2. Generate 3D Pie, Line, Scatter and Bar Charts: With Axlsx chart generation and management is as easy as a few lines of code. You can build charts based off data in your worksheet or generate charts without any data in your sheet at all. Customize gridlines, label rotation and series colors as well.
43
+
44
+ 3. Custom Styles: With guaranteed document validity, you can style borders, alignment, fills, fonts, and number formats in a single line of code. Those styles can be applied to an entire row, or a single cell anywhere in your workbook.
45
+
46
+ 4. Automatic type support: Axlsx will automatically determine the type of data you are generating. In this release Float, Integer, String, Date, Time and Boolean types are automatically identified and serialized to your spreadsheet.
47
+
48
+ 5. Automatic and fixed column widths: Axlsx will automatically determine the appropriate width for your columns based on the content in the worksheet, or use any value you specify for the really funky stuff.
49
+
50
+ 6. Support for automatically formatted 1904 and 1900 epochs configurable in the workbook.
51
+
52
+ 7. Add jpg, gif and png images to worksheets with hyperlinks
53
+
54
+ 8. Reference cells in your worksheet with "A1" and "A1:D4" style references or from the workbook using "Sheet1!A3:B4" style references
55
+
56
+ 9. Cell level style overrides for default and customized style objects
57
+
58
+ 10. Support for formulas, merging, row and column outlining as well as
59
+ cell level input data validation.
60
+
61
+ 12. Auto filtering tables with worksheet.auto_filter as well as support for Tables
62
+
63
+ 13. Export using shared strings or inline strings so we can inter-op with iWork Numbers (sans charts for now).
64
+
65
+ 14. Output to file or StringIO
66
+
67
+ 15. Support for page margins and print options
68
+
69
+ 16. Support for password and non password based sheet protection.
70
+
71
+ 17. First stage interoperability support for GoogleDocs, LibreOffice,
72
+ and Numbers
73
+
74
+ 18. Support for defined names, which gives you repeated header rows for printing.
75
+
76
+ 19. Data labels for charts as well as series color customization.
77
+
78
+ 20. Support for sheet headers and footers
79
+
80
+ 21. Pivot Tables
81
+
82
+ 22. Page Breaks
83
+
84
+ Installing
85
+ ----------
86
+
87
+ To install Axlsx, use the following command:
88
+
89
+ $ gem install axlsx-alt
90
+
91
+ Examples
92
+ ------
93
+
94
+ The example listing is getting overly large to maintain here.
95
+ If you are using Yard, you will be able to see the examples in line below.
96
+
97
+ Here's a teaser that kicks about 2% of what the gem can do.
98
+
99
+ ```ruby
100
+ Axlsx::Package.new do |p|
101
+ p.workbook.add_worksheet(:name => "Pie Chart") do |sheet|
102
+ sheet.add_row ["Simple Pie Chart"]
103
+ %w(first second third).each { |label| sheet.add_row [label, rand(24)+1] }
104
+ sheet.add_chart(Axlsx::Pie3DChart, :start_at => [0,5], :end_at => [10, 20], :title => "example 3: Pie Chart") do |chart|
105
+ chart.add_series :data => sheet["B2:B4"], :labels => sheet["A2:A4"], :colors => ['FF0000', '00FF00', '0000FF']
106
+ end
107
+ end
108
+ p.serialize('simple.xlsx')
109
+ end
110
+ ```
111
+
112
+ Please see the [examples](https://github.com/fernandoluizao/axlsx-alt/tree/master/examples/example.rb) for more.
113
+
114
+ {include:file:examples/example.rb}
115
+
116
+ There is much, much more you can do with this gem. If you get stuck, grab me on IRC or submit an issue to GitHub. Chances are that it has already been implemented. If it hasn't - let's take a look at adding it in.
117
+
118
+ Documentation
119
+ --------------
120
+
121
+ This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:
122
+
123
+ gem install yard kramdown
124
+
125
+ yard server -g
126
+
127
+ Specs
128
+ ------
129
+
130
+ This gem has 100% test coverage using test/unit. To execute tests for this gem, simply run rake in the gem directory.
131
+
132
+ Known interoperability issues.
133
+ ------------------------------
134
+
135
+ As axslx implements the Office Open XML (ECMA-376 spec) much of the
136
+ functionality is interoperable with other spreadsheet software. Below is
137
+ a listing of some known issues.
138
+
139
+ 1. Libre Office
140
+ - You must specify colors for your series. see examples/chart_colors.rb
141
+ for an example.
142
+ - You must use data in your sheet for charts. You cannot use hard coded
143
+ values.
144
+ - Chart axis and gridlines do not render. I have a feeling this is
145
+ related to themes, which axlsx does not implement at this time.
146
+
147
+ 2. Google Docs
148
+ - Images are known to not work with google docs
149
+ - border colors do not work
150
+
151
+ 3. Numbers
152
+ - you must set 'use_shared_strings' to true. This is most
153
+ conveniently done just before rendering by calling Package.use_shared_strings = true prior to serialization.
154
+
155
+ ```ruby
156
+ p = Axlsx::Package.new
157
+ p.workbook.add_worksheet(:name => "Basic Worksheet") do |sheet|
158
+ sheet.add_row ["First Column", "Second", "Third"]
159
+ sheet.add_row [1, 2, 3]
160
+ end
161
+ p.use_shared_strings = true
162
+ p.serialize('simple.xlsx')
163
+ ```
164
+ - charts do not render
165
+
166
+
167
+ Thanks!
168
+ -------
169
+
170
+ Open source software is a community effort. None of this could have been
171
+ done without the help of these awesome folks.
172
+
173
+ [contributors](https://github.com/randym/axlsx/graphs/contributors)
174
+
175
+ Copyright and License
176
+ ---------------------
177
+
178
+ Axlsx &copy; 2011-2013 by [Randy Morgan](mailto:digial.ipseity@gmail.com).
179
+
180
+ Axlsx is licensed under the MIT license. Please see the LICENSE document for more information.