axlsx 1.0.9 → 1.0.10a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/Gemfile +3 -0
  2. data/Gemfile.lock +24 -0
  3. data/README.md +86 -1
  4. data/axlsx.gemspec +6 -10
  5. data/doc/Axlsx.html +557 -360
  6. data/doc/Axlsx/App.html +347 -244
  7. data/doc/Axlsx/Ar.html +200 -0
  8. data/doc/Axlsx/Ar/ClassMethods.html +192 -0
  9. data/doc/Axlsx/Ar/InstanceMethods.html +109 -0
  10. data/doc/Axlsx/Ar/SingletonMethods.html +304 -0
  11. data/doc/Axlsx/Axis.html +131 -98
  12. data/doc/Axlsx/Bar3DChart.html +138 -106
  13. data/doc/Axlsx/BarSeries.html +73 -54
  14. data/doc/Axlsx/Border.html +114 -87
  15. data/doc/Axlsx/BorderPr.html +107 -82
  16. data/doc/Axlsx/CatAxis.html +93 -68
  17. data/doc/Axlsx/CatAxisData.html +47 -38
  18. data/doc/Axlsx/Cell.html +642 -148
  19. data/doc/Axlsx/CellAlignment.html +152 -111
  20. data/doc/Axlsx/CellProtection.html +63 -45
  21. data/doc/Axlsx/CellStyle.html +101 -73
  22. data/doc/Axlsx/Chart.html +238 -179
  23. data/doc/Axlsx/Color.html +75 -53
  24. data/doc/Axlsx/ContentType.html +34 -26
  25. data/doc/Axlsx/Core.html +54 -42
  26. data/doc/Axlsx/DataTypeValidator.html +39 -30
  27. data/doc/Axlsx/Default.html +59 -43
  28. data/doc/Axlsx/Drawing.html +176 -128
  29. data/doc/Axlsx/Fill.html +46 -33
  30. data/doc/Axlsx/Font.html +197 -147
  31. data/doc/Axlsx/GradientFill.html +114 -82
  32. data/doc/Axlsx/GradientStop.html +47 -33
  33. data/doc/Axlsx/GraphicFrame.html +78 -60
  34. data/doc/Axlsx/Line3DChart.html +125 -97
  35. data/doc/Axlsx/LineSeries.html +60 -44
  36. data/doc/Axlsx/Marker.html +98 -71
  37. data/doc/Axlsx/NumFmt.html +99 -80
  38. data/doc/Axlsx/OneCellAnchor.html +126 -94
  39. data/doc/Axlsx/Override.html +59 -43
  40. data/doc/Axlsx/Package.html +269 -134
  41. data/doc/Axlsx/PatternFill.html +93 -72
  42. data/doc/Axlsx/Pic.html +202 -152
  43. data/doc/Axlsx/Pie3DChart.html +39 -30
  44. data/doc/Axlsx/PieSeries.html +72 -53
  45. data/doc/Axlsx/RegexValidator.html +19 -14
  46. data/doc/Axlsx/Relationship.html +60 -43
  47. data/doc/Axlsx/Relationships.html +34 -26
  48. data/doc/Axlsx/RestrictionValidator.html +31 -22
  49. data/doc/Axlsx/Row.html +241 -67
  50. data/doc/Axlsx/Scaling.html +80 -59
  51. data/doc/Axlsx/SerAxis.html +71 -51
  52. data/doc/Axlsx/Series.html +179 -51
  53. data/doc/Axlsx/SeriesTitle.html +29 -24
  54. data/doc/Axlsx/Styles.html +354 -285
  55. data/doc/Axlsx/TableStyle.html +74 -54
  56. data/doc/Axlsx/TableStyleElement.html +99 -79
  57. data/doc/Axlsx/TableStyles.html +65 -47
  58. data/doc/Axlsx/Title.html +66 -51
  59. data/doc/Axlsx/TwoCellAnchor.html +129 -96
  60. data/doc/Axlsx/ValAxis.html +52 -38
  61. data/doc/Axlsx/ValAxisData.html +32 -27
  62. data/doc/Axlsx/View3D.html +111 -80
  63. data/doc/Axlsx/Workbook.html +333 -272
  64. data/doc/Axlsx/Worksheet.html +1018 -266
  65. data/doc/Axlsx/Xf.html +188 -134
  66. data/doc/_index.html +44 -8
  67. data/doc/class_list.html +1 -1
  68. data/doc/file.LICENSE.html +28 -23
  69. data/doc/file.README.html +180 -91
  70. data/doc/index.html +180 -91
  71. data/doc/method_list.html +541 -421
  72. data/doc/top-level-namespace.html +2 -2
  73. data/examples/example.rb +70 -13
  74. data/lib/axlsx.rb +1 -0
  75. data/lib/axlsx/ar.rb +72 -0
  76. data/lib/axlsx/package.rb +8 -1
  77. data/lib/axlsx/util/simple_typed_list.rb +5 -0
  78. data/lib/axlsx/version.rb +1 -1
  79. data/lib/axlsx/workbook/workbook.rb +4 -2
  80. data/lib/axlsx/workbook/worksheet/row.rb +15 -0
  81. data/lib/axlsx/workbook/worksheet/worksheet.rb +44 -1
  82. data/test/workbook/worksheet/tc_row.rb +6 -0
  83. data/test/workbook/worksheet/tc_worksheet.rb +36 -0
  84. metadata +103 -59
@@ -90,6 +90,13 @@
90
90
 
91
91
  </li>
92
92
 
93
+ <li>
94
+ <span class='object_link'><a href="Axlsx/Ar.html" title="Axlsx::Ar (module)">Ar</a></span>
95
+
96
+ <small>(Axlsx)</small>
97
+
98
+ </li>
99
+
93
100
  <li>
94
101
  <span class='object_link'><a href="Axlsx/Axis.html" title="Axlsx::Axis (class)">Axis</a></span>
95
102
 
@@ -195,6 +202,13 @@
195
202
 
196
203
  </li>
197
204
 
205
+ <li>
206
+ <span class='object_link'><a href="Axlsx/Ar/ClassMethods.html" title="Axlsx::Ar::ClassMethods (module)">ClassMethods</a></span>
207
+
208
+ <small>(Axlsx::Ar)</small>
209
+
210
+ </li>
211
+
198
212
  <li>
199
213
  <span class='object_link'><a href="Axlsx/Color.html" title="Axlsx::Color (class)">Color</a></span>
200
214
 
@@ -300,6 +314,24 @@
300
314
  </ul>
301
315
 
302
316
 
317
+ <ul id="alpha_I" class="alpha">
318
+ <li class="letter">I</li>
319
+ <ul>
320
+
321
+ <li>
322
+ <span class='object_link'><a href="Axlsx/Ar/InstanceMethods.html" title="Axlsx::Ar::InstanceMethods (module)">InstanceMethods</a></span>
323
+
324
+ <small>(Axlsx::Ar)</small>
325
+
326
+ </li>
327
+
328
+ </ul>
329
+ </ul>
330
+
331
+
332
+ </td><td valign='top' width="33%">
333
+
334
+
303
335
  <ul id="alpha_L" class="alpha">
304
336
  <li class="letter">L</li>
305
337
  <ul>
@@ -322,9 +354,6 @@
322
354
  </ul>
323
355
 
324
356
 
325
- </td><td valign='top' width="33%">
326
-
327
-
328
357
  <ul id="alpha_M" class="alpha">
329
358
  <li class="letter">M</li>
330
359
  <ul>
@@ -495,6 +524,13 @@
495
524
 
496
525
  </li>
497
526
 
527
+ <li>
528
+ <span class='object_link'><a href="Axlsx/Ar/SingletonMethods.html" title="Axlsx::Ar::SingletonMethods (module)">SingletonMethods</a></span>
529
+
530
+ <small>(Axlsx::Ar)</small>
531
+
532
+ </li>
533
+
498
534
  <li>
499
535
  <span class='object_link'><a href="Axlsx/Styles.html" title="Axlsx::Styles (class)">Styles</a></span>
500
536
 
@@ -549,6 +585,9 @@
549
585
  </ul>
550
586
 
551
587
 
588
+ </td><td valign='top' width="33%">
589
+
590
+
552
591
  <ul id="alpha_V" class="alpha">
553
592
  <li class="letter">V</li>
554
593
  <ul>
@@ -578,9 +617,6 @@
578
617
  </ul>
579
618
 
580
619
 
581
- </td><td valign='top' width="33%">
582
-
583
-
584
620
  <ul id="alpha_W" class="alpha">
585
621
  <li class="letter">W</li>
586
622
  <ul>
@@ -626,9 +662,9 @@
626
662
  </div>
627
663
 
628
664
  <div id="footer">
629
- Generated on Sat Nov 26 13:16:35 2011 by
665
+ Generated on Sun Nov 27 21:54:10 2011 by
630
666
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
631
- 0.7.3 (ruby-1.9.3).
667
+ 0.7.3 (ruby-1.8.7).
632
668
  </div>
633
669
 
634
670
  </body>
@@ -39,7 +39,7 @@
39
39
 
40
40
  <ul id="full_list" class="class">
41
41
  <li><span class='object_link'><a href="top-level-namespace.html" title=" (root)">Top Level Namespace</a></span></li>
42
- <li><a class='toggle'></a> <span class='object_link'><a href="Axlsx.html" title="Axlsx (module)">Axlsx</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Axlsx/App.html" title="Axlsx::App (class)">App</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Axis.html" title="Axlsx::Axis (class)">Axis</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Bar3DChart.html" title="Axlsx::Bar3DChart (class)">Bar3DChart</a></span> &lt; Chart<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/BarSeries.html" title="Axlsx::BarSeries (class)">BarSeries</a></span> &lt; Series<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Border.html" title="Axlsx::Border (class)">Border</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/BorderPr.html" title="Axlsx::BorderPr (class)">BorderPr</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CatAxis.html" title="Axlsx::CatAxis (class)">CatAxis</a></span> &lt; Axis<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CatAxisData.html" title="Axlsx::CatAxisData (class)">CatAxisData</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Cell.html" title="Axlsx::Cell (class)">Cell</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CellAlignment.html" title="Axlsx::CellAlignment (class)">CellAlignment</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CellProtection.html" title="Axlsx::CellProtection (class)">CellProtection</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CellStyle.html" title="Axlsx::CellStyle (class)">CellStyle</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Chart.html" title="Axlsx::Chart (class)">Chart</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Color.html" title="Axlsx::Color (class)">Color</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/ContentType.html" title="Axlsx::ContentType (class)">ContentType</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Core.html" title="Axlsx::Core (class)">Core</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/DataTypeValidator.html" title="Axlsx::DataTypeValidator (class)">DataTypeValidator</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Default.html" title="Axlsx::Default (class)">Default</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Drawing.html" title="Axlsx::Drawing (class)">Drawing</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Fill.html" title="Axlsx::Fill (class)">Fill</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Font.html" title="Axlsx::Font (class)">Font</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/GradientFill.html" title="Axlsx::GradientFill (class)">GradientFill</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/GradientStop.html" title="Axlsx::GradientStop (class)">GradientStop</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/GraphicFrame.html" title="Axlsx::GraphicFrame (class)">GraphicFrame</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Line3DChart.html" title="Axlsx::Line3DChart (class)">Line3DChart</a></span> &lt; Chart<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/LineSeries.html" title="Axlsx::LineSeries (class)">LineSeries</a></span> &lt; Series<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Marker.html" title="Axlsx::Marker (class)">Marker</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/NumFmt.html" title="Axlsx::NumFmt (class)">NumFmt</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/OneCellAnchor.html" title="Axlsx::OneCellAnchor (class)">OneCellAnchor</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Override.html" title="Axlsx::Override (class)">Override</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Package.html" title="Axlsx::Package (class)">Package</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/PatternFill.html" title="Axlsx::PatternFill (class)">PatternFill</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Pic.html" title="Axlsx::Pic (class)">Pic</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Pie3DChart.html" title="Axlsx::Pie3DChart (class)">Pie3DChart</a></span> &lt; Chart<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/PieSeries.html" title="Axlsx::PieSeries (class)">PieSeries</a></span> &lt; Series<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/RegexValidator.html" title="Axlsx::RegexValidator (class)">RegexValidator</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Relationship.html" title="Axlsx::Relationship (class)">Relationship</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Relationships.html" title="Axlsx::Relationships (class)">Relationships</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/RestrictionValidator.html" title="Axlsx::RestrictionValidator (class)">RestrictionValidator</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Row.html" title="Axlsx::Row (class)">Row</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Scaling.html" title="Axlsx::Scaling (class)">Scaling</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/SerAxis.html" title="Axlsx::SerAxis (class)">SerAxis</a></span> &lt; Axis<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Series.html" title="Axlsx::Series (class)">Series</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/SeriesTitle.html" title="Axlsx::SeriesTitle (class)">SeriesTitle</a></span> &lt; Title<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Styles.html" title="Axlsx::Styles (class)">Styles</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TableStyle.html" title="Axlsx::TableStyle (class)">TableStyle</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TableStyleElement.html" title="Axlsx::TableStyleElement (class)">TableStyleElement</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TableStyles.html" title="Axlsx::TableStyles (class)">TableStyles</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Title.html" title="Axlsx::Title (class)">Title</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TwoCellAnchor.html" title="Axlsx::TwoCellAnchor (class)">TwoCellAnchor</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/ValAxis.html" title="Axlsx::ValAxis (class)">ValAxis</a></span> &lt; Axis<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/ValAxisData.html" title="Axlsx::ValAxisData (class)">ValAxisData</a></span> &lt; CatAxisData<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/View3D.html" title="Axlsx::View3D (class)">View3D</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Workbook.html" title="Axlsx::Workbook (class)">Workbook</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Xf.html" title="Axlsx::Xf (class)">Xf</a></span> &lt; Object<small class='search_info'>Axlsx</small></li></ul>
42
+ <li><a class='toggle'></a> <span class='object_link'><a href="Axlsx.html" title="Axlsx (module)">Axlsx</a></span><small class='search_info'>Top Level Namespace</small></li><ul><li><span class='object_link'><a href="Axlsx/App.html" title="Axlsx::App (class)">App</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><a class='toggle'></a> <span class='object_link'><a href="Axlsx/Ar.html" title="Axlsx::Ar (module)">Ar</a></span><small class='search_info'>Axlsx</small></li><ul><li><span class='object_link'><a href="Axlsx/Ar/ClassMethods.html" title="Axlsx::Ar::ClassMethods (module)">ClassMethods</a></span><small class='search_info'>Axlsx::Ar</small></li><li><span class='object_link'><a href="Axlsx/Ar/InstanceMethods.html" title="Axlsx::Ar::InstanceMethods (module)">InstanceMethods</a></span><small class='search_info'>Axlsx::Ar</small></li><li><span class='object_link'><a href="Axlsx/Ar/SingletonMethods.html" title="Axlsx::Ar::SingletonMethods (module)">SingletonMethods</a></span><small class='search_info'>Axlsx::Ar</small></li></ul><li><span class='object_link'><a href="Axlsx/Axis.html" title="Axlsx::Axis (class)">Axis</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Bar3DChart.html" title="Axlsx::Bar3DChart (class)">Bar3DChart</a></span> &lt; Chart<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/BarSeries.html" title="Axlsx::BarSeries (class)">BarSeries</a></span> &lt; Series<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Border.html" title="Axlsx::Border (class)">Border</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/BorderPr.html" title="Axlsx::BorderPr (class)">BorderPr</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CatAxis.html" title="Axlsx::CatAxis (class)">CatAxis</a></span> &lt; Axis<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CatAxisData.html" title="Axlsx::CatAxisData (class)">CatAxisData</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Cell.html" title="Axlsx::Cell (class)">Cell</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CellAlignment.html" title="Axlsx::CellAlignment (class)">CellAlignment</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CellProtection.html" title="Axlsx::CellProtection (class)">CellProtection</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/CellStyle.html" title="Axlsx::CellStyle (class)">CellStyle</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Chart.html" title="Axlsx::Chart (class)">Chart</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Color.html" title="Axlsx::Color (class)">Color</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/ContentType.html" title="Axlsx::ContentType (class)">ContentType</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Core.html" title="Axlsx::Core (class)">Core</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/DataTypeValidator.html" title="Axlsx::DataTypeValidator (class)">DataTypeValidator</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Default.html" title="Axlsx::Default (class)">Default</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Drawing.html" title="Axlsx::Drawing (class)">Drawing</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Fill.html" title="Axlsx::Fill (class)">Fill</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Font.html" title="Axlsx::Font (class)">Font</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/GradientFill.html" title="Axlsx::GradientFill (class)">GradientFill</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/GradientStop.html" title="Axlsx::GradientStop (class)">GradientStop</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/GraphicFrame.html" title="Axlsx::GraphicFrame (class)">GraphicFrame</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Line3DChart.html" title="Axlsx::Line3DChart (class)">Line3DChart</a></span> &lt; Chart<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/LineSeries.html" title="Axlsx::LineSeries (class)">LineSeries</a></span> &lt; Series<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Marker.html" title="Axlsx::Marker (class)">Marker</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/NumFmt.html" title="Axlsx::NumFmt (class)">NumFmt</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/OneCellAnchor.html" title="Axlsx::OneCellAnchor (class)">OneCellAnchor</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Override.html" title="Axlsx::Override (class)">Override</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Package.html" title="Axlsx::Package (class)">Package</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/PatternFill.html" title="Axlsx::PatternFill (class)">PatternFill</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Pic.html" title="Axlsx::Pic (class)">Pic</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Pie3DChart.html" title="Axlsx::Pie3DChart (class)">Pie3DChart</a></span> &lt; Chart<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/PieSeries.html" title="Axlsx::PieSeries (class)">PieSeries</a></span> &lt; Series<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/RegexValidator.html" title="Axlsx::RegexValidator (class)">RegexValidator</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Relationship.html" title="Axlsx::Relationship (class)">Relationship</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Relationships.html" title="Axlsx::Relationships (class)">Relationships</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/RestrictionValidator.html" title="Axlsx::RestrictionValidator (class)">RestrictionValidator</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Row.html" title="Axlsx::Row (class)">Row</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Scaling.html" title="Axlsx::Scaling (class)">Scaling</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/SerAxis.html" title="Axlsx::SerAxis (class)">SerAxis</a></span> &lt; Axis<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Series.html" title="Axlsx::Series (class)">Series</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/SeriesTitle.html" title="Axlsx::SeriesTitle (class)">SeriesTitle</a></span> &lt; Title<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Styles.html" title="Axlsx::Styles (class)">Styles</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TableStyle.html" title="Axlsx::TableStyle (class)">TableStyle</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TableStyleElement.html" title="Axlsx::TableStyleElement (class)">TableStyleElement</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TableStyles.html" title="Axlsx::TableStyles (class)">TableStyles</a></span> &lt; SimpleTypedList<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Title.html" title="Axlsx::Title (class)">Title</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/TwoCellAnchor.html" title="Axlsx::TwoCellAnchor (class)">TwoCellAnchor</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/ValAxis.html" title="Axlsx::ValAxis (class)">ValAxis</a></span> &lt; Axis<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/ValAxisData.html" title="Axlsx::ValAxisData (class)">ValAxisData</a></span> &lt; CatAxisData<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/View3D.html" title="Axlsx::View3D (class)">View3D</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Workbook.html" title="Axlsx::Workbook (class)">Workbook</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span> &lt; Object<small class='search_info'>Axlsx</small></li><li><span class='object_link'><a href="Axlsx/Xf.html" title="Axlsx::Xf (class)">Xf</a></span> &lt; Object<small class='search_info'>Axlsx</small></li></ul>
43
43
 
44
44
  </ul>
45
45
  </div>
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
7
  File: LICENSE
8
8
 
@@ -54,32 +54,37 @@
54
54
 
55
55
  <iframe id="search_frame"></iframe>
56
56
 
57
- <div id="content"><div id='filecontents'>
58
- <p>Copyright © 2011 Randy Morgan</p>
59
-
60
- <p>Permission is hereby granted, free of charge, to any person obtaining a
61
- copy of this software and associated documentation files (the “Software”),
62
- to deal in the Software without restriction, including without limitation
63
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
64
- and/or sell copies of the Software, and to permit persons to whom the
65
- Software is furnished to do so, subject to the following conditions:</p>
66
-
67
- <p>The above copyright notice and this permission notice shall be included in
68
- all copies or substantial portions of the Software.</p>
69
-
70
- <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
75
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
76
- DEALINGS IN THE SOFTWARE.</p>
57
+ <div id="content"><div id='filecontents'><p>
58
+ Copyright &#169; 2011 Randy Morgan
59
+ </p>
60
+ <p>
61
+ Permission is hereby granted, free of charge, to any person obtaining a
62
+ copy of this software and associated documentation files (the
63
+ &quot;Software&quot;), to deal in the Software without restriction,
64
+ including without limitation the rights to use, copy, modify, merge,
65
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
66
+ permit persons to whom the Software is furnished to do so, subject to the
67
+ following conditions:
68
+ </p>
69
+ <p>
70
+ The above copyright notice and this permission notice shall be included in
71
+ all copies or substantial portions of the Software.
72
+ </p>
73
+ <p>
74
+ THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
75
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
76
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
77
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
78
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
79
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
80
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
81
+ </p>
77
82
  </div></div>
78
83
 
79
84
  <div id="footer">
80
- Generated on Sat Nov 26 13:16:35 2011 by
85
+ Generated on Sun Nov 27 21:54:11 2011 by
81
86
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
82
- 0.7.3 (ruby-1.9.3).
87
+ 0.7.3 (ruby-1.8.7).
83
88
  </div>
84
89
 
85
90
  </body>
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -61,7 +61,7 @@
61
61
  <strong>Author</strong>: Randy Morgan <br/>
62
62
  <strong>Copyright</strong>: 2011 <br/>
63
63
  <strong>License</strong>: MIT License <br/>
64
- <strong>Latest Version</strong>: 1.0.9 <br/>
64
+ <strong>Latest Version</strong>: 1.0.10.a <br/>
65
65
  <strong>Ruby Version</strong>: 1.8.7 - 1.9.3 <br/>
66
66
  <strong>Release Date</strong>: November 26th 2011</p>
67
67
 
@@ -90,145 +90,225 @@ With Axlsx you can create worksheets with charts, images, automated column width
90
90
 
91
91
  <p>**7. Add jpg, gif and png images to worksheets</p>
92
92
 
93
+ <p>**8. Build in mixin with Active record. simply add acts_as_xlsx to you models and they will support to_xlsx</p>
94
+
93
95
  <h2>Installing</h2>
94
96
 
95
97
  <p>To install Axlsx, use the following command:</p>
96
98
 
97
- <pre class="code">$ gem install axlsx
99
+ <pre class="code">$ <span class='gem identifier id'>gem</span> <span class='install identifier id'>install</span> <span class='axlsx identifier id'>axlsx</span>
98
100
  </pre>
99
101
 
100
102
  <h2>Usage</h2>
101
103
 
102
104
  <h3>Examples</h3>
103
105
 
104
- <pre class="code"> <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rubygems</span><span class='tstring_end'>'</span></span>
105
- <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>axlsx</span><span class='tstring_end'>'</span></span>
106
+ <pre class="code"> <span class='require identifier id'>require</span> <span class='string val'>'rubygems'</span>
107
+ <span class='require identifier id'>require</span> <span class='string val'>'axlsx'</span>
106
108
  </pre>
107
109
 
108
110
  <p>A Simple Workbook</p>
109
111
 
110
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
111
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
112
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>First</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Second</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Third</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
113
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span>
114
- <span class='kw'>end</span>
115
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example1.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
112
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
113
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
114
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;First&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Second&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Third&quot;</span><span class='rbrack token'>]</span>
115
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>3</span><span class='rbrack token'>]</span>
116
+ <span class='end end kw'>end</span>
117
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example1.xlsx&quot;</span><span class='rparen token'>)</span>
116
118
  </pre>
117
119
 
118
120
  <p>Generating A Bar Chart</p>
119
121
 
120
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
121
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
122
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>First</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Second</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Third</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
123
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span>
124
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Bar3DChart</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:end_at</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='int'>5</span><span class='comma'>,</span> <span class='int'>15</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example 2: Chart</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span>
125
- <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=&gt;</span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=&gt;</span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span>
126
- <span class='kw'>end</span>
127
- <span class='kw'>end</span>
128
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example2.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
122
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
123
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
124
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;First&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Second&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Third&quot;</span><span class='rbrack token'>]</span>
125
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>3</span><span class='rbrack token'>]</span>
126
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Bar3DChart constant id'>Bar3DChart</span><span class='comma token'>,</span> <span class='symbol val'>:start_at</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>2</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:end_at</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='integer val'>15</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:title=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;example 2: Chart&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='chart identifier id'>chart</span><span class='bitor op'>|</span>
127
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='add_series identifier id'>add_series</span> <span class='symbol val'>:data=</span><span class='gt op'>&gt;</span><span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='comma token'>,</span> <span class='symbol val'>:labels=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span>
128
+ <span class='end end kw'>end</span>
129
+ <span class='end end kw'>end</span>
130
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example2.xlsx&quot;</span><span class='rparen token'>)</span>
129
131
  </pre>
130
132
 
131
133
  <p>Generating A Pie Chart</p>
132
134
 
133
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
134
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
135
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>First</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Second</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Third</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
136
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span>
137
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Pie3DChart</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:end_at</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='int'>5</span><span class='comma'>,</span> <span class='int'>15</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example 3: Pie Chart</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span>
138
- <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=&gt;</span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=&gt;</span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span>
139
- <span class='kw'>end</span>
140
- <span class='kw'>end</span>
141
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example3.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
135
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
136
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
137
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;First&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Second&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Third&quot;</span><span class='rbrack token'>]</span>
138
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>3</span><span class='rbrack token'>]</span>
139
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Pie3DChart constant id'>Pie3DChart</span><span class='comma token'>,</span> <span class='symbol val'>:start_at</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span><span class='integer val'>2</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:end_at</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='integer val'>15</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:title=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;example 3: Pie Chart&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='chart identifier id'>chart</span><span class='bitor op'>|</span>
140
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='add_series identifier id'>add_series</span> <span class='symbol val'>:data=</span><span class='gt op'>&gt;</span><span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='comma token'>,</span> <span class='symbol val'>:labels=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span>
141
+ <span class='end end kw'>end</span>
142
+ <span class='end end kw'>end</span>
143
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example3.xlsx&quot;</span><span class='rparen token'>)</span>
142
144
  </pre>
143
145
 
144
146
  <p>Using Custom Styles</p>
145
147
 
146
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
147
- <span class='id wb'>wb</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span>
148
- <span class='id black_cell'>black_cell</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=&gt;</span><span class='int'>14</span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=&gt;</span> <span class='lbrace'>{</span> <span class='symbol'>:horizontal</span><span class='op'>=&gt;</span> <span class='symbol'>:center</span> <span class='rbrace'>}</span>
149
- <span class='id blue_cell'>blue_cell</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>FF0000FF</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=&gt;</span><span class='int'>14</span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=&gt;</span> <span class='lbrace'>{</span> <span class='symbol'>:horizontal</span><span class='op'>=&gt;</span> <span class='symbol'>:center</span> <span class='rbrace'>}</span>
150
- <span class='id wb'>wb</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
151
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Text Autowidth</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Second</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Third</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='id black_cell'>black_cell</span><span class='comma'>,</span> <span class='id blue_cell'>blue_cell</span><span class='comma'>,</span> <span class='id black_cell'>black_cell</span><span class='rbracket'>]</span>
152
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=&gt;</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span>
153
- <span class='kw'>end</span>
154
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example4.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
148
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
149
+ <span class='wb identifier id'>wb</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span>
150
+ <span class='black_cell identifier id'>black_cell</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:bg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FF000000&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FFFFFFFF&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>&gt;</span><span class='integer val'>14</span><span class='comma token'>,</span> <span class='symbol val'>:alignment</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span> <span class='symbol val'>:horizontal=</span><span class='gt op'>&gt;</span> <span class='symbol val'>:center</span> <span class='rbrace token'>}</span>
151
+ <span class='blue_cell identifier id'>blue_cell</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:bg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FF0000FF&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FFFFFFFF&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>&gt;</span><span class='integer val'>14</span><span class='comma token'>,</span> <span class='symbol val'>:alignment</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span> <span class='symbol val'>:horizontal=</span><span class='gt op'>&gt;</span> <span class='symbol val'>:center</span> <span class='rbrace token'>}</span>
152
+ <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
153
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;Text Autowidth&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Second&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Third&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:style</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='black_cell identifier id'>black_cell</span><span class='comma token'>,</span> <span class='blue_cell identifier id'>blue_cell</span><span class='comma token'>,</span> <span class='black_cell identifier id'>black_cell</span><span class='rbrack token'>]</span>
154
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>3</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:style</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span>
155
+ <span class='end end kw'>end</span>
156
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example4.xlsx&quot;</span><span class='rparen token'>)</span>
155
157
  </pre>
156
158
 
157
159
  <p>Using Custom Formatting and date1904</p>
158
160
 
159
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
160
- <span class='id wb'>wb</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span>
161
- <span class='id date'>date</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>yyyy-mm-dd</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=&gt;</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span>
162
- <span class='id padded'>padded</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>00#</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=&gt;</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span>
163
- <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0%</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=&gt;</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span>
164
- <span class='id wb'>wb</span><span class='period'>.</span><span class='id date1904'>date1904</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># required for generation on mac
165
- </span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
166
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Custom Formatted Date</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Percent Formatted Float</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Padded Numbers</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=&gt;</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span>
167
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='const'>Time</span><span class='period'>.</span><span class='id now'>now</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>32</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='id date'>date</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='id padded'>padded</span><span class='rbracket'>]</span>
168
- <span class='kw'>end</span>
169
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example5.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
161
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
162
+ <span class='wb identifier id'>wb</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span>
163
+ <span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;yyyy-mm-dd&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span>
164
+ <span class='padded identifier id'>padded</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;00#&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span>
165
+ <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;0%&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span>
166
+ <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='assign token'>=</span> <span class='true true kw'>true</span> <span class='comment val'># required for generation on mac</span>
167
+ <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
168
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;Custom Formatted Date&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Percent Formatted Float&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Padded Numbers&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:style</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span>
169
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.2</span><span class='comma token'>,</span> <span class='integer val'>32</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:style</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='padded identifier id'>padded</span><span class='rbrack token'>]</span>
170
+ <span class='end end kw'>end</span>
171
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example5.xlsx&quot;</span><span class='rparen token'>)</span>
170
172
  </pre>
171
173
 
172
174
  <p>Validation</p>
173
175
 
174
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
175
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
176
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>First</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Second</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Third</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
177
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span>
178
- <span class='kw'>end</span>
176
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
177
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
178
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;First&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Second&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Third&quot;</span><span class='rbrack token'>]</span>
179
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>3</span><span class='rbrack token'>]</span>
180
+ <span class='end end kw'>end</span>
179
181
 
180
- <span class='id p'>p</span><span class='period'>.</span><span class='id validate'>validate</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id error'>error</span><span class='op'>|</span>
181
- <span class='id puts'>puts</span> <span class='id error'>error</span><span class='period'>.</span><span class='id inspect'>inspect</span>
182
- <span class='kw'>end</span>
182
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='validate identifier id'>validate</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='error identifier id'>error</span><span class='bitor op'>|</span>
183
+ <span class='puts identifier id'>puts</span> <span class='error identifier id'>error</span><span class='dot token'>.</span><span class='inspect identifier id'>inspect</span>
184
+ <span class='end end kw'>end</span>
183
185
  </pre>
184
186
 
185
187
  <p>Generating A Line Chart</p>
186
188
 
187
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
188
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
189
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>First</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='int'>5</span><span class='comma'>,</span> <span class='int'>7</span><span class='comma'>,</span> <span class='int'>9</span><span class='rbracket'>]</span>
190
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Second</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='int'>5</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>14</span><span class='comma'>,</span> <span class='int'>9</span><span class='rbracket'>]</span>
191
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Line3DChart</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example 6: Line Chart</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span>
192
- <span class='id chart'>chart</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>0</span><span class='comma'>,</span> <span class='int'>2</span>
193
- <span class='id chart'>chart</span><span class='period'>.</span><span class='id end_at'>end_at</span> <span class='int'>10</span><span class='comma'>,</span> <span class='int'>15</span>
194
- <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=&gt;</span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=&gt;</span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span><span class='period'>.</span><span class='id first'>first</span>
195
- <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=&gt;</span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=&gt;</span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='period'>.</span><span class='id first'>first</span>
196
- <span class='kw'>end</span>
197
-
198
- <span class='kw'>end</span>
199
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example6.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
189
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
190
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
191
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;First&quot;</span><span class='comma token'>,</span> <span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>5</span><span class='comma token'>,</span> <span class='integer val'>7</span><span class='comma token'>,</span> <span class='integer val'>9</span><span class='rbrack token'>]</span>
192
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;Second&quot;</span><span class='comma token'>,</span> <span class='integer val'>5</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>14</span><span class='comma token'>,</span> <span class='integer val'>9</span><span class='rbrack token'>]</span>
193
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Line3DChart constant id'>Line3DChart</span><span class='comma token'>,</span> <span class='symbol val'>:title=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;example 6: Line Chart&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='chart identifier id'>chart</span><span class='bitor op'>|</span>
194
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='start_at identifier id'>start_at</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='integer val'>2</span>
195
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='end_at identifier id'>end_at</span> <span class='integer val'>10</span><span class='comma token'>,</span> <span class='integer val'>15</span>
196
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='add_series identifier id'>add_series</span> <span class='symbol val'>:data=</span><span class='gt op'>&gt;</span><span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:title=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='dot token'>.</span><span class='first identifier id'>first</span>
197
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='add_series identifier id'>add_series</span> <span class='symbol val'>:data=</span><span class='gt op'>&gt;</span><span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:title=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='last identifier id'>last</span><span class='dot token'>.</span><span class='cells identifier id'>cells</span><span class='dot token'>.</span><span class='first identifier id'>first</span>
198
+ <span class='end end kw'>end</span>
199
+
200
+ <span class='end end kw'>end</span>
201
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example6.xlsx&quot;</span><span class='rparen token'>)</span>
200
202
  </pre>
201
203
 
202
204
  <p>Adding an Image</p>
203
205
 
204
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
205
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
206
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_image'>add_image</span><span class='lparen'>(</span><span class='symbol'>:image_src</span> <span class='op'>=&gt;</span> <span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/image1.png</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id image'>image</span><span class='op'>|</span>
207
- <span class='id image'>image</span><span class='period'>.</span><span class='id width'>width</span><span class='op'>=</span><span class='int'>720</span>
208
- <span class='id image'>image</span><span class='period'>.</span><span class='id height'>height</span><span class='op'>=</span><span class='int'>666</span>
209
- <span class='id image'>image</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>2</span>
210
- <span class='kw'>end</span>
211
- <span class='kw'>end</span>
212
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example7.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
206
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
207
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
208
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_image identifier id'>add_image</span><span class='lparen token'>(</span><span class='symbol val'>:image_src</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lparen token'>(</span><span class='File constant id'>File</span><span class='dot token'>.</span><span class='dirname identifier id'>dirname</span><span class='lparen token'>(</span><span class='__FILE__ __file__ kw'>__FILE__</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='string val'>&quot;/image1.png&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='image identifier id'>image</span><span class='bitor op'>|</span>
209
+ <span class='image identifier id'>image</span><span class='dot token'>.</span><span class='width identifier id'>width</span><span class='assign token'>=</span><span class='integer val'>720</span>
210
+ <span class='image identifier id'>image</span><span class='dot token'>.</span><span class='height identifier id'>height</span><span class='assign token'>=</span><span class='integer val'>666</span>
211
+ <span class='image identifier id'>image</span><span class='dot token'>.</span><span class='start_at identifier id'>start_at</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>2</span>
212
+ <span class='end end kw'>end</span>
213
+ <span class='end end kw'>end</span>
214
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example7.xlsx&quot;</span><span class='rparen token'>)</span>
213
215
  </pre>
214
216
 
215
217
  <p>Asian Language Support</p>
216
218
 
217
- <pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span>
218
- <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span>
219
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>日本語</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
220
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>华语/華語</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
221
- <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>한국어/조선말</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
222
- <span class='kw'>end</span>
223
- <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>example8.xlsx</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
219
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
220
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
221
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;日本語&quot;</span><span class='rbrack token'>]</span>
222
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;华语/華語&quot;</span><span class='rbrack token'>]</span>
223
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>&quot;한국어/조선말&quot;</span><span class='rbrack token'>]</span>
224
+ <span class='end end kw'>end</span>
225
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example8.xlsx&quot;</span><span class='rparen token'>)</span>
226
+ </pre>
227
+
228
+ <p>Styling Columns</p>
229
+
230
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
231
+ <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:num_fmt</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>9</span>
232
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
233
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>'col 1'</span><span class='comma token'>,</span> <span class='string val'>'col 2'</span><span class='comma token'>,</span> <span class='string val'>'col 3'</span><span class='comma token'>,</span> <span class='string val'>'col 4'</span><span class='rbrack token'>]</span>
234
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.3</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span>
235
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.2</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span>
236
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.1</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span>
237
+ <span class='end end kw'>end</span>
238
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>&gt;</span><span class='integer val'>1</span>
239
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example10.xlsx&quot;</span><span class='rparen token'>)</span>
240
+ </pre>
241
+
242
+ <p>Styling Rows</p>
243
+
244
+ <pre class="code"> <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Package constant id'>Package</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
245
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='add_worksheet identifier id'>add_worksheet</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='sheet identifier id'>sheet</span><span class='bitor op'>|</span>
246
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='string val'>'col 1'</span><span class='comma token'>,</span> <span class='string val'>'col 2'</span><span class='comma token'>,</span> <span class='string val'>'col 3'</span><span class='comma token'>,</span> <span class='string val'>'col 4'</span><span class='rbrack token'>]</span>
247
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.3</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span>
248
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.2</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span>
249
+ <span class='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.1</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span>
250
+ <span class='end end kw'>end</span>
251
+ <span class='head identifier id'>head</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:bg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FF000000&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;FFFFFFFF&quot;</span>
252
+ <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:num_fmt</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>9</span>
253
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>&gt;</span><span class='integer val'>1</span>
254
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><span class='dot token'>.</span><span class='row_style identifier id'>row_style</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='head identifier id'>head</span>
255
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>&quot;example11.xlsx&quot;</span><span class='rparen token'>)</span>
256
+ </pre>
257
+
258
+ <p>Rails 3</p>
259
+
260
+ <pre class="code"> <span class='comment val'>#ImageMagick port needs to be confirgured --disable-openmp when using with rails3</span>
261
+ <span class='comment val'>#http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault</span>
262
+
263
+ <span class='comment val'>#Add the gem to your Gemfile and bundle install</span>
264
+ <span class='gem identifier id'>gem</span> <span class='string val'>'axlsx'</span>
265
+
266
+ <span class='comment val'># A Model that has id, name, title, content, vote, popularity, created_at and updated_at attributes </span>
267
+ <span class='class class kw'>class</span> <span class='Post constant id'>Post</span> <span class='lt op'>&lt;</span> <span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span>
268
+
269
+ <span class='comment val'># support for :include, :exclude, :only like ruport has not been implemented yet</span>
270
+ <span class='acts_as_axlsx identifier id'>acts_as_axlsx</span>
271
+
272
+ <span class='def def kw'>def</span> <span class='report identifier id'>report</span>
273
+ <span class='comment val'># First generate your package from the model</span>
274
+ <span class='comment val'># scopes, conditions etc are allowed but must be before the to_xlsx call.</span>
275
+ <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Post constant id'>Post</span><span class='dot token'>.</span><span class='to_xlsx identifier id'>to_xlsx</span>
276
+
277
+ <span class='comment val'># Add in some basic styles and formats</span>
278
+ <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='header identifier id'>header</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span>
279
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='s identifier id'>s</span><span class='bitor op'>|</span>
280
+ <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:num_fmt=</span><span class='gt op'>&gt;</span><span class='integer val'>9</span>
281
+ <span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>'yyyy/mm/dd'</span>
282
+ <span class='header identifier id'>header</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:bg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FF000000&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;FFFFFFFF&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:alignment</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrace token'>{</span><span class='symbol val'>:horizontal=</span><span class='gt op'>&gt;</span><span class='symbol val'>:center</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>&gt;</span><span class='integer val'>14</span>
283
+ <span class='end end kw'>end</span>
284
+
285
+ <span class='ws identifier id'>ws</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span>
286
+
287
+ <span class='comment val'># Update the row and columns style so they propery format data.</span>
288
+ <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='row_style identifier id'>row_style</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='header identifier id'>header</span><span class='rparen token'>)</span>
289
+ <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span><span class='lparen token'>(</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>&gt;</span><span class='integer val'>1</span><span class='rparen token'>)</span>
290
+ <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span><span class='lparen token'>(</span><span class='lparen token'>(</span><span class='float val'>6</span><span class='dot2 op'>..</span><span class='integer val'>7</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>&gt;</span><span class='integer val'>1</span><span class='rparen token'>)</span>
291
+
292
+ <span class='comment val'># Add a chart for good measure</span>
293
+ <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Bar3DChart constant id'>Bar3DChart</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='chart identifier id'>chart</span><span class='bitor op'>|</span>
294
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='title identifier id'>title</span><span class='assign token'>=</span><span class='string val'>'Post Votes'</span>
295
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='start_at identifier id'>start_at</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='size identifier id'>size</span>
296
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='end_at identifier id'>end_at</span> <span class='integer val'>4</span><span class='comma token'>,</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='size identifier id'>size</span><span class='plus op'>+</span><span class='integer val'>20</span>
297
+ <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='add_series identifier id'>add_series</span> <span class='symbol val'>:data</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span><span class='lbrack token'>[</span><span class='integer val'>4</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels=</span><span class='gt op'>&gt;</span><span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span>
298
+ <span class='end end kw'>end</span>
299
+
300
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>'posts.xlsx'</span><span class='rparen token'>)</span>
301
+ <span class='send_file identifier id'>send_file</span> <span class='string val'>'posts.xlsx'</span><span class='comma token'>,</span> <span class='symbol val'>:type=</span><span class='gt op'>&gt;</span><span class='string val'>&quot;application/xlsx&quot;</span><span class='comma token'>,</span> <span class='symbol val'>:x_sendfile=</span><span class='gt op'>&gt;</span><span class='true true kw'>true</span>
302
+ <span class='end end kw'>end</span>
303
+ <span class='end end kw'>end</span>
224
304
  </pre>
225
305
 
226
306
  <h3>Documentation</h3>
227
307
 
228
308
  <p>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:</p>
229
309
 
230
- <pre class="code"> <span class='id gem'>gem</span> <span class='id install'>install</span> <span class='id yard'>yard</span>
231
- <span class='id yard'>yard</span> <span class='id server'>server</span> <span class='op'>-</span><span class='id g'>g</span>
310
+ <pre class="code"> <span class='gem identifier id'>gem</span> <span class='install identifier id'>install</span> <span class='yard identifier id'>yard</span>
311
+ <span class='yard identifier id'>yard</span> <span class='server identifier id'>server</span> <span class='minus op'>-</span><span class='g identifier id'>g</span>
232
312
  </pre>
233
313
 
234
314
  <h3>Specs</h3>
@@ -238,7 +318,16 @@ With Axlsx you can create worksheets with charts, images, automated column width
238
318
  <h2>Changelog</h2>
239
319
 
240
320
  <ul>
241
- <li><strong>October.26.11</strong>: 1.0.9 release
321
+ <li><p><strong>October.27.11</strong>: 1.0.10.a release</p>
322
+
323
+ <ul>
324
+ <li>Updating gemspec to loosen up some of the gem requirements in the hope of maintaining compatibility with rails 2</li>
325
+ <li>Added acts_as_xlsx mixin for rails3 See Examples</li>
326
+ <li>Added row.style assignation for updating the cell style for an entire row</li>
327
+ <li>Added col_style method to worksheet upate a the style for a column of cells</li>
328
+ </ul>
329
+ </li>
330
+ <li><p><strong>October.26.11</strong>: 1.0.9 release</p>
242
331
 
243
332
  <ul>
244
333
  <li>Updated to support ruby 1.9.3</li>
@@ -257,9 +346,9 @@ licensed under the MIT license. Please see the <a href="file.LICENSE.html" title
257
346
  </div></div>
258
347
 
259
348
  <div id="footer">
260
- Generated on Sat Nov 26 13:16:35 2011 by
349
+ Generated on Sun Nov 27 21:54:11 2011 by
261
350
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
262
- 0.7.3 (ruby-1.9.3).
351
+ 0.7.3 (ruby-1.8.7).
263
352
  </div>
264
353
 
265
354
  </body>