axlsx 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/CHANGELOG.md +14 -0
  2. data/Gemfile +3 -7
  3. data/Gemfile.lock +17 -8
  4. data/README.md +88 -59
  5. data/axlsx.gemspec +9 -3
  6. data/doc/Axlsx.html +482 -248
  7. data/doc/Axlsx/App.html +237 -159
  8. data/doc/Axlsx/Axis.html +75 -51
  9. data/doc/Axlsx/Bar3DChart.html +75 -53
  10. data/doc/Axlsx/BarSeries.html +45 -31
  11. data/doc/Axlsx/Border.html +70 -50
  12. data/doc/Axlsx/BorderPr.html +80 -62
  13. data/doc/Axlsx/CatAxis.html +62 -43
  14. data/doc/Axlsx/CatAxisData.html +23 -16
  15. data/doc/Axlsx/Cell.html +2022 -393
  16. data/doc/Axlsx/CellAlignment.html +103 -75
  17. data/doc/Axlsx/CellProtection.html +44 -30
  18. data/doc/Axlsx/CellStyle.html +66 -46
  19. data/doc/Axlsx/Chart.html +159 -108
  20. data/doc/Axlsx/Color.html +73 -52
  21. data/doc/Axlsx/ContentType.html +20 -14
  22. data/doc/Axlsx/Core.html +29 -20
  23. data/doc/Axlsx/DataTypeValidator.html +27 -19
  24. data/doc/Axlsx/Default.html +39 -27
  25. data/doc/Axlsx/Drawing.html +104 -70
  26. data/doc/Axlsx/Fill.html +33 -23
  27. data/doc/Axlsx/Font.html +132 -98
  28. data/doc/Axlsx/GradientFill.html +70 -48
  29. data/doc/Axlsx/GradientStop.html +31 -21
  30. data/doc/Axlsx/GraphicFrame.html +40 -27
  31. data/doc/Axlsx/Line3DChart.html +62 -43
  32. data/doc/Axlsx/LineSeries.html +37 -25
  33. data/doc/Axlsx/Marker.html +63 -43
  34. data/doc/Axlsx/NumFmt.html +79 -65
  35. data/doc/Axlsx/OneCellAnchor.html +78 -54
  36. data/doc/Axlsx/Override.html +39 -27
  37. data/doc/Axlsx/Package.html +103 -163
  38. data/doc/Axlsx/Parser.html +549 -0
  39. data/doc/Axlsx/PatternFill.html +66 -51
  40. data/doc/Axlsx/Pic.html +230 -123
  41. data/doc/Axlsx/PictureLocking.html +1159 -0
  42. data/doc/Axlsx/Pie3DChart.html +23 -16
  43. data/doc/Axlsx/PieSeries.html +44 -30
  44. data/doc/Axlsx/RegexValidator.html +14 -10
  45. data/doc/Axlsx/Relationship.html +40 -27
  46. data/doc/Axlsx/Relationships.html +20 -14
  47. data/doc/Axlsx/RestrictionValidator.html +25 -17
  48. data/doc/Axlsx/Row.html +73 -53
  49. data/doc/Axlsx/Scaling.html +46 -31
  50. data/doc/Axlsx/SerAxis.html +49 -33
  51. data/doc/Axlsx/Series.html +51 -35
  52. data/doc/Axlsx/SeriesTitle.html +14 -10
  53. data/doc/Axlsx/Styles.html +210 -156
  54. data/doc/Axlsx/TableStyle.html +47 -32
  55. data/doc/Axlsx/TableStyleElement.html +75 -61
  56. data/doc/Axlsx/TableStyles.html +42 -28
  57. data/doc/Axlsx/Title.html +36 -25
  58. data/doc/Axlsx/TwoCellAnchor.html +83 -58
  59. data/doc/Axlsx/ValAxis.html +35 -24
  60. data/doc/Axlsx/ValAxisData.html +13 -9
  61. data/doc/Axlsx/View3D.html +64 -43
  62. data/doc/Axlsx/Workbook.html +305 -147
  63. data/doc/Axlsx/Worksheet.html +567 -271
  64. data/doc/Axlsx/Xf.html +114 -77
  65. data/doc/_index.html +15 -1
  66. data/doc/class_list.html +1 -1
  67. data/doc/css/style.css +1 -1
  68. data/doc/file.LICENSE.html +25 -21
  69. data/doc/file.README.html +89 -66
  70. data/doc/index.html +89 -66
  71. data/doc/js/app.js +4 -4
  72. data/doc/method_list.html +717 -413
  73. data/doc/top-level-namespace.html +1 -1
  74. data/examples/example.rb +52 -25
  75. data/examples/follow_20111202.xlsx +0 -0
  76. data/lib/axlsx.rb +14 -1
  77. data/lib/axlsx/drawing/chart.rb +20 -4
  78. data/lib/axlsx/drawing/drawing.rb +1 -1
  79. data/lib/axlsx/drawing/pic.rb +5 -2
  80. data/lib/axlsx/drawing/picture_locking.rb +72 -0
  81. data/lib/axlsx/package.rb +9 -7
  82. data/lib/axlsx/stylesheet/color.rb +19 -9
  83. data/lib/axlsx/stylesheet/styles.rb +2 -0
  84. data/lib/axlsx/util/constants.rb +6 -0
  85. data/lib/axlsx/util/parser.rb +43 -0
  86. data/lib/axlsx/version.rb +1 -1
  87. data/lib/axlsx/workbook/workbook.rb +21 -1
  88. data/lib/axlsx/workbook/worksheet/cell.rb +159 -7
  89. data/lib/axlsx/workbook/worksheet/row.rb +4 -2
  90. data/lib/axlsx/workbook/worksheet/worksheet.rb +38 -4
  91. data/test/drawing/tc_picture_locking.rb +73 -0
  92. data/test/rels/tc_relationships.rb +0 -1
  93. data/test/stylesheet/tc_styles.rb +0 -12
  94. data/test/tc_package.rb +5 -3
  95. data/test/workbook/tc_workbook.rb +7 -0
  96. data/test/workbook/worksheet/tc_cell.rb +102 -1
  97. data/test/workbook/worksheet/tc_worksheet.rb +17 -0
  98. metadata +79 -19
  99. data/doc/Axlsx/Ar.html +0 -196
  100. data/doc/Axlsx/Ar/ClassMethods.html +0 -188
  101. data/doc/Axlsx/Ar/InstanceMethods.html +0 -108
  102. data/doc/Axlsx/Ar/SingletonMethods.html +0 -312
data/doc/class_list.html CHANGED
@@ -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><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/Parser.html" title="Axlsx::Parser (module)">Parser</a></span><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/PictureLocking.html" title="Axlsx::PictureLocking (class)">PictureLocking</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>
data/doc/css/style.css CHANGED
@@ -294,7 +294,7 @@ li.r2 { background: #fafafa; }
294
294
  #filecontents pre.code, .docstring pre.code { display: block; }
295
295
  .source_code .lines { padding-right: 12px; color: #555; text-align: right; }
296
296
  #filecontents pre.code, .docstring pre.code,
297
- .tags pre.example { padding: 5px 12px; margin-top: 4px; border: 1px solid #eef; background: #f5f5ff; }
297
+ .tags .example { padding: 5px 12px; margin-top: 4px; border: 1px solid #eef; background: #f5f5ff; }
298
298
  pre.code { color: #000; }
299
299
  pre.code .info.file { color: #555; }
300
300
  pre.code .val { color: #036A07; }
@@ -54,31 +54,35 @@
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
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
61
62
  copy of this software and associated documentation files (the
62
- Software), to deal in the Software without restriction, including
63
- without limitation the rights to use, copy, modify, merge, publish,
64
- distribute, sublicense, and/or sell copies of the Software, and to permit
65
- persons to whom the Software is furnished to do so, subject to the
66
- following conditions:</p>
67
-
68
- <p>The above copyright notice and this permission notice shall be included in
69
- all copies or substantial portions of the Software.</p>
70
-
71
- <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
72
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
73
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
74
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
75
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
76
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
77
- DEALINGS IN THE SOFTWARE.</p>
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>
78
82
  </div></div>
79
83
 
80
84
  <div id="footer">
81
- Generated on Wed Nov 30 08:53:35 2011 by
85
+ Generated on Mon Dec 5 14:21:06 2011 by
82
86
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
83
87
  0.7.3 (ruby-1.8.7).
84
88
  </div>
data/doc/file.README.html CHANGED
@@ -63,10 +63,10 @@
63
63
  <strong>Author</strong>: Randy Morgan <br/>
64
64
  <strong>Copyright</strong>: 2011 <br/>
65
65
  <strong>License</strong>: MIT License <br/>
66
- <strong>Latest Version</strong>: 1.0.10 <br/>
67
- <strong>Ruby Version</strong>: 1.8.7, 1.9.3</p>
66
+ <strong>Latest Version</strong>: 1.0.11 <br/>
67
+ <strong>Ruby Version</strong>: 1.8.7, 1.9.2, 1.9.3</p>
68
68
 
69
- <p><strong>Release Date</strong>: November 30th 2011</p>
69
+ <p><strong>Release Date</strong>: December 5th 2011</p>
70
70
 
71
71
  <h2>Synopsis</h2>
72
72
 
@@ -92,10 +92,16 @@ With Axlsx you can create worksheets with charts, images, automated column width
92
92
 
93
93
  <p>**5. Automatic column widths: Axlsx will automatically determine the appropriate width for your columns based on the content in the worksheet.</p>
94
94
 
95
- <p>**6. Support for both 1904 and 1900 epocs configurable in the workbook.</p>
95
+ <p>**6. Support for automatically formatted 1904 and 1900 epocs configurable in the workbook.</p>
96
96
 
97
97
  <p>**7. Add jpg, gif and png images to worksheets</p>
98
98
 
99
+ <p>**8. Refernce cells in your worksheet with "A1" and "A1:D4" style references or from the workbook using "Sheett1!A3:B4" style references</p>
100
+
101
+ <p>**9. Cell level style overrides for default and customized style object</p>
102
+
103
+ <p>**10. Support for formulas</p>
104
+
99
105
  <h2>Installing</h2>
100
106
 
101
107
  <p>To install Axlsx, use the following command:</p>
@@ -111,12 +117,25 @@ With Axlsx you can create worksheets with charts, images, automated column width
111
117
  <span class='require identifier id'>require</span> <span class='string val'>'axlsx'</span>
112
118
  </pre>
113
119
 
120
+ <p>Validation</p>
121
+
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='end end kw'>end</span>
127
+
128
+ <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>
129
+ <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>
130
+ <span class='end end kw'>end</span>
131
+ </pre>
132
+
114
133
  <p>A Simple Workbook</p>
115
134
 
116
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>
117
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>
118
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>
119
- <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>
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='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='rbrack token'>]</span>
120
139
  <span class='end end kw'>end</span>
121
140
  <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>
122
141
  </pre>
@@ -125,10 +144,11 @@ With Axlsx you can create worksheets with charts, images, automated column width
125
144
 
126
145
  <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>
127
146
  <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>
147
+ <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;A Simple Bar Chart&quot;</span><span class='rbrack token'>]</span>
128
148
  <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>
129
149
  <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>
130
- <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>
131
- <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>
150
+ <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='string val'>&quot;A4&quot;</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='string val'>&quot;F17&quot;</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='lbrack token'>[</span><span class='string val'>&quot;A1&quot;</span><span class='rbrack token'>]</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>
151
+ <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='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A3:C3&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A2:C2&quot;</span><span class='rbrack token'>]</span>
132
152
  <span class='end end kw'>end</span>
133
153
  <span class='end end kw'>end</span>
134
154
  <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>
@@ -138,26 +158,43 @@ With Axlsx you can create worksheets with charts, images, automated column width
138
158
 
139
159
  <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>
140
160
  <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>
141
- <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>
142
- <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>
143
- <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>
144
- <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>
161
+ <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='comma token'>,</span> <span class='string val'>&quot;Fourth&quot;</span><span class='rbrack token'>]</span>
162
+ <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='comma token'>,</span> <span class='string val'>&quot;=PRODUCT(A2:C2)&quot;</span><span class='rbrack token'>]</span>
163
+ <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>
164
+ <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='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A2:D2&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A1:D1&quot;</span><span class='rbrack token'>]</span>
145
165
  <span class='end end kw'>end</span>
146
166
  <span class='end end kw'>end</span>
147
167
  <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>
148
168
  </pre>
149
169
 
170
+ <p>Generating A Line Chart</p>
171
+
172
+ <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>
173
+ <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>
174
+ <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>
175
+ <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>
176
+ <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>
177
+ <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>
178
+ <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>
179
+ <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='lbrack token'>[</span><span class='string val'>&quot;B1:E1&quot;</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='lbrack token'>[</span><span class='string val'>&quot;A1&quot;</span><span class='rbrack token'>]</span>
180
+ <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='lbrack token'>[</span><span class='string val'>&quot;B2:E2&quot;</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='lbrack token'>[</span><span class='string val'>&quot;A2&quot;</span><span class='rbrack token'>]</span>
181
+ <span class='end end kw'>end</span>
182
+
183
+ <span class='end end kw'>end</span>
184
+ <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>
185
+ </pre>
186
+
150
187
  <p>Using Custom Styles</p>
151
188
 
152
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>
153
190
  <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>
154
- <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>
155
- <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>
191
+ <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;00&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;FF&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>
192
+ <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;0000FF&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;FF&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>
156
193
  <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>
157
194
  <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>
158
195
  <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>
159
196
  <span class='end end kw'>end</span>
160
- <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>
197
+ <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>
161
198
  </pre>
162
199
 
163
200
  <p>Using Custom Formatting and date1904</p>
@@ -172,50 +209,21 @@ With Axlsx you can create worksheets with charts, images, automated column width
172
209
  <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>
173
210
  <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>
174
211
  <span class='end end kw'>end</span>
175
- <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>
176
- </pre>
177
-
178
- <p>Validation</p>
179
-
180
- <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>
181
- <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>
182
- <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>
183
- <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>
184
- <span class='end end kw'>end</span>
185
-
186
- <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>
187
- <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>
188
- <span class='end end kw'>end</span>
189
- </pre>
190
-
191
- <p>Generating A Line Chart</p>
192
-
193
- <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>
194
- <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>
195
- <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>
196
- <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>
197
- <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>
198
- <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>
199
- <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>
200
- <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>
201
- <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>
202
- <span class='end end kw'>end</span>
203
-
204
- <span class='end end kw'>end</span>
205
212
  <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>
206
213
  </pre>
207
214
 
208
- <p>Adding an Image</p>
215
+ <p>Add an Image</p>
209
216
 
210
217
  <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>
211
218
  <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>
212
- <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>
219
+ <span class='img identifier id'>img</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='expand_path identifier id'>expand_path</span><span class='lparen token'>(</span><span class='string val'>'examples/image1.jpeg'</span><span class='rparen token'>)</span>
220
+ <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='img identifier id'>img</span><span class='comma token'>,</span> <span class='symbol val'>:noSelect=</span><span class='gt op'>&gt;</span><span class='true true kw'>true</span><span class='comma token'>,</span> <span class='symbol val'>:noMove=</span><span class='gt op'>&gt;</span><span class='true true kw'>true</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>
213
221
  <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>
214
222
  <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>
215
223
  <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>
216
224
  <span class='end end kw'>end</span>
217
225
  <span class='end end kw'>end</span>
218
- <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>
226
+ <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>
219
227
  </pre>
220
228
 
221
229
  <p>Asian Language Support</p>
@@ -226,7 +234,7 @@ With Axlsx you can create worksheets with charts, images, automated column width
226
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='string val'>&quot;华语/華語&quot;</span><span class='rbrack token'>]</span>
227
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='string val'>&quot;한국어/조선말&quot;</span><span class='rbrack token'>]</span>
228
236
  <span class='end end kw'>end</span>
229
- <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>
237
+ <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;example9.xlsx&quot;</span><span class='rparen token'>)</span>
230
238
  </pre>
231
239
 
232
240
  <p>Styling Columns</p>
@@ -252,13 +260,37 @@ With Axlsx you can create worksheets with charts, images, automated column width
252
260
  <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>
253
261
  <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>
254
262
  <span class='end end kw'>end</span>
255
- <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>
263
+ <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;00&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;FF&quot;</span>
256
264
  <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>
257
265
  <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>
258
266
  <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>
259
267
  <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>
260
268
  </pre>
261
269
 
270
+ <p>Using formula</p>
271
+
272
+ <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>
273
+ <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>
274
+ <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>
275
+ <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='comma token'>,</span> <span class='string val'>&quot;=SUM(A2:C2)&quot;</span><span class='rbrack token'>]</span>
276
+ <span class='end end kw'>end</span>
277
+ <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;example12.xlsx&quot;</span><span class='rparen token'>)</span>
278
+ </pre>
279
+
280
+ <p>Using cell specific styling and range / name based access</p>
281
+
282
+ <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>
283
+ <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='lparen token'>(</span><span class='symbol val'>:name=</span><span class='gt op'>&gt;</span><span class='string val'>'My Worksheet'</span><span class='rparen token'>)</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>
284
+ <span class='comment val'># cell level style overides when adding cells</span>
285
+ <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><span class='comma token'>,</span> <span class='symbol val'>:sz</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>16</span>
286
+ <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='comma token'>,</span> <span class='string val'>&quot;=SUM(A2:C2)&quot;</span><span class='rbrack token'>]</span>
287
+ <span class='comment val'># cell level style overrides via sheet range</span>
288
+ <span class='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A1:D1&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='color identifier id'>color</span> <span class='assign token'>=</span> <span class='string val'>&quot;FF0000&quot;</span><span class='rbrace token'>}</span>
289
+ <span class='end end kw'>end</span>
290
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='lbrack token'>[</span><span class='string val'>'My Worksheet!A1:D2'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='style identifier id'>style</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span> <span class='rbrace token'>}</span>
291
+ <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;example13.xlsx&quot;</span><span class='rparen token'>)</span>
292
+ </pre>
293
+
262
294
  <h3>Documentation</h3>
263
295
 
264
296
  <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>
@@ -274,24 +306,15 @@ With Axlsx you can create worksheets with charts, images, automated column width
274
306
  <h2>Changelog</h2>
275
307
 
276
308
  <ul>
277
- <li><p><strong>October.30.11</strong>: 1.0.10 release</p>
278
-
279
- <ul>
280
- <li>Updating gemspec to lower gem version requirements.</li>
281
- <li>Added row.style assignation for updating the cell style for an entire row</li>
282
- <li>Added col_style method to worksheet upate a the style for a column of cells</li>
283
- <li>Added cols for an easy reference to columns in a worksheet.</li>
284
- <li>prep for pre release of acts_as_xlsx gem</li>
285
- <li>added in travis.ci configuration and build status</li>
286
- <li>fixed out of range bug in time calculations for 32bit time.</li>
287
- <li>added i18n for active support</li>
288
- </ul>
289
- </li>
290
- <li><p><strong>October.26.11</strong>: 1.0.9 release</p>
309
+ <li><strong>December.5.11</strong>: 1.0.11 release
291
310
 
292
311
  <ul>
293
- <li>Updated to support ruby 1.9.3</li>
294
- <li>Updated to eliminate all warnings originating in this gem</li>
312
+ <li>Added [] methods to worksheet and workbook to provide name based access to cells.</li>
313
+ <li>Added support for functions as cell values</li>
314
+ <li>Updated color creation so that two character shorthand values can be used like 'FF' for 'FFFFFFFF' or 'D8' for 'FFD8D8D8'</li>
315
+ <li>Examples for all this fun stuff added to the readme</li>
316
+ <li>Clean up and support for 1.9.2 and travis integration</li>
317
+ <li>Added support for string based cell referencing to chart start_at and end_at. That means you can now use :start_at=>"A1" when using worksheet.add_chart, or chart.start_at ="A1" in addition to passing a cell or the x, y coordinates.</li>
295
318
  </ul>
296
319
  </li>
297
320
  </ul>
@@ -306,7 +329,7 @@ licensed under the MIT license. Please see the <a href="file.LICENSE.html" title
306
329
  </div></div>
307
330
 
308
331
  <div id="footer">
309
- Generated on Wed Nov 30 08:53:35 2011 by
332
+ Generated on Mon Dec 5 14:21:06 2011 by
310
333
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
311
334
  0.7.3 (ruby-1.8.7).
312
335
  </div>
data/doc/index.html CHANGED
@@ -63,10 +63,10 @@
63
63
  <strong>Author</strong>: Randy Morgan <br/>
64
64
  <strong>Copyright</strong>: 2011 <br/>
65
65
  <strong>License</strong>: MIT License <br/>
66
- <strong>Latest Version</strong>: 1.0.10 <br/>
67
- <strong>Ruby Version</strong>: 1.8.7, 1.9.3</p>
66
+ <strong>Latest Version</strong>: 1.0.11 <br/>
67
+ <strong>Ruby Version</strong>: 1.8.7, 1.9.2, 1.9.3</p>
68
68
 
69
- <p><strong>Release Date</strong>: November 30th 2011</p>
69
+ <p><strong>Release Date</strong>: December 5th 2011</p>
70
70
 
71
71
  <h2>Synopsis</h2>
72
72
 
@@ -92,10 +92,16 @@ With Axlsx you can create worksheets with charts, images, automated column width
92
92
 
93
93
  <p>**5. Automatic column widths: Axlsx will automatically determine the appropriate width for your columns based on the content in the worksheet.</p>
94
94
 
95
- <p>**6. Support for both 1904 and 1900 epocs configurable in the workbook.</p>
95
+ <p>**6. Support for automatically formatted 1904 and 1900 epocs configurable in the workbook.</p>
96
96
 
97
97
  <p>**7. Add jpg, gif and png images to worksheets</p>
98
98
 
99
+ <p>**8. Refernce cells in your worksheet with "A1" and "A1:D4" style references or from the workbook using "Sheett1!A3:B4" style references</p>
100
+
101
+ <p>**9. Cell level style overrides for default and customized style object</p>
102
+
103
+ <p>**10. Support for formulas</p>
104
+
99
105
  <h2>Installing</h2>
100
106
 
101
107
  <p>To install Axlsx, use the following command:</p>
@@ -111,12 +117,25 @@ With Axlsx you can create worksheets with charts, images, automated column width
111
117
  <span class='require identifier id'>require</span> <span class='string val'>'axlsx'</span>
112
118
  </pre>
113
119
 
120
+ <p>Validation</p>
121
+
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='end end kw'>end</span>
127
+
128
+ <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>
129
+ <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>
130
+ <span class='end end kw'>end</span>
131
+ </pre>
132
+
114
133
  <p>A Simple Workbook</p>
115
134
 
116
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>
117
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>
118
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>
119
- <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>
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='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span><span class='rbrack token'>]</span>
120
139
  <span class='end end kw'>end</span>
121
140
  <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>
122
141
  </pre>
@@ -125,10 +144,11 @@ With Axlsx you can create worksheets with charts, images, automated column width
125
144
 
126
145
  <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>
127
146
  <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>
147
+ <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;A Simple Bar Chart&quot;</span><span class='rbrack token'>]</span>
128
148
  <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>
129
149
  <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>
130
- <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>
131
- <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>
150
+ <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='string val'>&quot;A4&quot;</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='string val'>&quot;F17&quot;</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='lbrack token'>[</span><span class='string val'>&quot;A1&quot;</span><span class='rbrack token'>]</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>
151
+ <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='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A3:C3&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A2:C2&quot;</span><span class='rbrack token'>]</span>
132
152
  <span class='end end kw'>end</span>
133
153
  <span class='end end kw'>end</span>
134
154
  <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>
@@ -138,26 +158,43 @@ With Axlsx you can create worksheets with charts, images, automated column width
138
158
 
139
159
  <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>
140
160
  <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>
141
- <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>
142
- <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>
143
- <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>
144
- <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>
161
+ <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='comma token'>,</span> <span class='string val'>&quot;Fourth&quot;</span><span class='rbrack token'>]</span>
162
+ <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='comma token'>,</span> <span class='string val'>&quot;=PRODUCT(A2:C2)&quot;</span><span class='rbrack token'>]</span>
163
+ <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>
164
+ <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='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A2:D2&quot;</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A1:D1&quot;</span><span class='rbrack token'>]</span>
145
165
  <span class='end end kw'>end</span>
146
166
  <span class='end end kw'>end</span>
147
167
  <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>
148
168
  </pre>
149
169
 
170
+ <p>Generating A Line Chart</p>
171
+
172
+ <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>
173
+ <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>
174
+ <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>
175
+ <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>
176
+ <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>
177
+ <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>
178
+ <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>
179
+ <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='lbrack token'>[</span><span class='string val'>&quot;B1:E1&quot;</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='lbrack token'>[</span><span class='string val'>&quot;A1&quot;</span><span class='rbrack token'>]</span>
180
+ <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='lbrack token'>[</span><span class='string val'>&quot;B2:E2&quot;</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='lbrack token'>[</span><span class='string val'>&quot;A2&quot;</span><span class='rbrack token'>]</span>
181
+ <span class='end end kw'>end</span>
182
+
183
+ <span class='end end kw'>end</span>
184
+ <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>
185
+ </pre>
186
+
150
187
  <p>Using Custom Styles</p>
151
188
 
152
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>
153
190
  <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>
154
- <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>
155
- <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>
191
+ <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;00&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;FF&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>
192
+ <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;0000FF&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;FF&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>
156
193
  <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>
157
194
  <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>
158
195
  <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>
159
196
  <span class='end end kw'>end</span>
160
- <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>
197
+ <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>
161
198
  </pre>
162
199
 
163
200
  <p>Using Custom Formatting and date1904</p>
@@ -172,50 +209,21 @@ With Axlsx you can create worksheets with charts, images, automated column width
172
209
  <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>
173
210
  <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>
174
211
  <span class='end end kw'>end</span>
175
- <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>
176
- </pre>
177
-
178
- <p>Validation</p>
179
-
180
- <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>
181
- <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>
182
- <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>
183
- <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>
184
- <span class='end end kw'>end</span>
185
-
186
- <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>
187
- <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>
188
- <span class='end end kw'>end</span>
189
- </pre>
190
-
191
- <p>Generating A Line Chart</p>
192
-
193
- <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>
194
- <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>
195
- <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>
196
- <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>
197
- <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>
198
- <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>
199
- <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>
200
- <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>
201
- <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>
202
- <span class='end end kw'>end</span>
203
-
204
- <span class='end end kw'>end</span>
205
212
  <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>
206
213
  </pre>
207
214
 
208
- <p>Adding an Image</p>
215
+ <p>Add an Image</p>
209
216
 
210
217
  <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>
211
218
  <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>
212
- <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>
219
+ <span class='img identifier id'>img</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='expand_path identifier id'>expand_path</span><span class='lparen token'>(</span><span class='string val'>'examples/image1.jpeg'</span><span class='rparen token'>)</span>
220
+ <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='img identifier id'>img</span><span class='comma token'>,</span> <span class='symbol val'>:noSelect=</span><span class='gt op'>&gt;</span><span class='true true kw'>true</span><span class='comma token'>,</span> <span class='symbol val'>:noMove=</span><span class='gt op'>&gt;</span><span class='true true kw'>true</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>
213
221
  <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>
214
222
  <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>
215
223
  <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>
216
224
  <span class='end end kw'>end</span>
217
225
  <span class='end end kw'>end</span>
218
- <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>
226
+ <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>
219
227
  </pre>
220
228
 
221
229
  <p>Asian Language Support</p>
@@ -226,7 +234,7 @@ With Axlsx you can create worksheets with charts, images, automated column width
226
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='string val'>&quot;华语/華語&quot;</span><span class='rbrack token'>]</span>
227
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='string val'>&quot;한국어/조선말&quot;</span><span class='rbrack token'>]</span>
228
236
  <span class='end end kw'>end</span>
229
- <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>
237
+ <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;example9.xlsx&quot;</span><span class='rparen token'>)</span>
230
238
  </pre>
231
239
 
232
240
  <p>Styling Columns</p>
@@ -252,13 +260,37 @@ With Axlsx you can create worksheets with charts, images, automated column width
252
260
  <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>
253
261
  <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>
254
262
  <span class='end end kw'>end</span>
255
- <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>
263
+ <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;00&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;FF&quot;</span>
256
264
  <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>
257
265
  <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>
258
266
  <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>
259
267
  <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>
260
268
  </pre>
261
269
 
270
+ <p>Using formula</p>
271
+
272
+ <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>
273
+ <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>
274
+ <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>
275
+ <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='comma token'>,</span> <span class='string val'>&quot;=SUM(A2:C2)&quot;</span><span class='rbrack token'>]</span>
276
+ <span class='end end kw'>end</span>
277
+ <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;example12.xlsx&quot;</span><span class='rparen token'>)</span>
278
+ </pre>
279
+
280
+ <p>Using cell specific styling and range / name based access</p>
281
+
282
+ <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>
283
+ <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='lparen token'>(</span><span class='symbol val'>:name=</span><span class='gt op'>&gt;</span><span class='string val'>'My Worksheet'</span><span class='rparen token'>)</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>
284
+ <span class='comment val'># cell level style overides when adding cells</span>
285
+ <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><span class='comma token'>,</span> <span class='symbol val'>:sz</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='integer val'>16</span>
286
+ <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='comma token'>,</span> <span class='string val'>&quot;=SUM(A2:C2)&quot;</span><span class='rbrack token'>]</span>
287
+ <span class='comment val'># cell level style overrides via sheet range</span>
288
+ <span class='sheet identifier id'>sheet</span><span class='lbrack token'>[</span><span class='string val'>&quot;A1:D1&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='color identifier id'>color</span> <span class='assign token'>=</span> <span class='string val'>&quot;FF0000&quot;</span><span class='rbrace token'>}</span>
289
+ <span class='end end kw'>end</span>
290
+ <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='lbrack token'>[</span><span class='string val'>'My Worksheet!A1:D2'</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span> <span class='c identifier id'>c</span><span class='dot token'>.</span><span class='style identifier id'>style</span> <span class='assign token'>=</span> <span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='STYLE_THIN_BORDER constant id'>STYLE_THIN_BORDER</span> <span class='rbrace token'>}</span>
291
+ <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;example13.xlsx&quot;</span><span class='rparen token'>)</span>
292
+ </pre>
293
+
262
294
  <h3>Documentation</h3>
263
295
 
264
296
  <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>
@@ -274,24 +306,15 @@ With Axlsx you can create worksheets with charts, images, automated column width
274
306
  <h2>Changelog</h2>
275
307
 
276
308
  <ul>
277
- <li><p><strong>October.30.11</strong>: 1.0.10 release</p>
278
-
279
- <ul>
280
- <li>Updating gemspec to lower gem version requirements.</li>
281
- <li>Added row.style assignation for updating the cell style for an entire row</li>
282
- <li>Added col_style method to worksheet upate a the style for a column of cells</li>
283
- <li>Added cols for an easy reference to columns in a worksheet.</li>
284
- <li>prep for pre release of acts_as_xlsx gem</li>
285
- <li>added in travis.ci configuration and build status</li>
286
- <li>fixed out of range bug in time calculations for 32bit time.</li>
287
- <li>added i18n for active support</li>
288
- </ul>
289
- </li>
290
- <li><p><strong>October.26.11</strong>: 1.0.9 release</p>
309
+ <li><strong>December.5.11</strong>: 1.0.11 release
291
310
 
292
311
  <ul>
293
- <li>Updated to support ruby 1.9.3</li>
294
- <li>Updated to eliminate all warnings originating in this gem</li>
312
+ <li>Added [] methods to worksheet and workbook to provide name based access to cells.</li>
313
+ <li>Added support for functions as cell values</li>
314
+ <li>Updated color creation so that two character shorthand values can be used like 'FF' for 'FFFFFFFF' or 'D8' for 'FFD8D8D8'</li>
315
+ <li>Examples for all this fun stuff added to the readme</li>
316
+ <li>Clean up and support for 1.9.2 and travis integration</li>
317
+ <li>Added support for string based cell referencing to chart start_at and end_at. That means you can now use :start_at=>"A1" when using worksheet.add_chart, or chart.start_at ="A1" in addition to passing a cell or the x, y coordinates.</li>
295
318
  </ul>
296
319
  </li>
297
320
  </ul>
@@ -306,7 +329,7 @@ licensed under the MIT license. Please see the <a href="file.LICENSE.html" title
306
329
  </div></div>
307
330
 
308
331
  <div id="footer">
309
- Generated on Wed Nov 30 08:53:35 2011 by
332
+ Generated on Mon Dec 5 14:21:05 2011 by
310
333
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
311
334
  0.7.3 (ruby-1.8.7).
312
335
  </div>