From 058faf2581970fa18c314ad07f5658adeca32c69 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 22:08:55 +0900 Subject: update to README --- .yardoc/checksums | 104 ++--- .yardoc/objects/root.dat | Bin 436803 -> 456043 bytes .yardoc/proxy_types | Bin 38 -> 49 bytes README.md | 9 +- doc/Axlsx.html | 905 ++++++++++++++---------------------- doc/Axlsx/App.html | 591 ++++++++++------------- doc/Axlsx/Ar.html | 26 +- doc/Axlsx/Ar/ClassMethods.html | 28 +- doc/Axlsx/Ar/InstanceMethods.html | 11 +- doc/Axlsx/Ar/SingletonMethods.html | 108 +++-- doc/Axlsx/Axis.html | 229 ++++----- doc/Axlsx/Bar3DChart.html | 244 +++++----- doc/Axlsx/BarSeries.html | 127 +++-- doc/Axlsx/Border.html | 201 ++++---- doc/Axlsx/BorderPr.html | 189 ++++---- doc/Axlsx/CatAxis.html | 161 +++---- doc/Axlsx/CatAxisData.html | 85 ++-- doc/Axlsx/Cell.html | 790 ++++++------------------------- doc/Axlsx/CellAlignment.html | 263 +++++------ doc/Axlsx/CellProtection.html | 108 ++--- doc/Axlsx/CellStyle.html | 174 +++---- doc/Axlsx/Chart.html | 417 +++++++---------- doc/Axlsx/Color.html | 128 +++-- doc/Axlsx/ContentType.html | 60 ++- doc/Axlsx/Core.html | 96 ++-- doc/Axlsx/DataTypeValidator.html | 69 ++- doc/Axlsx/Default.html | 102 ++-- doc/Axlsx/Drawing.html | 304 +++++------- doc/Axlsx/Fill.html | 79 ++-- doc/Axlsx/Font.html | 344 ++++++-------- doc/Axlsx/GradientFill.html | 196 ++++---- doc/Axlsx/GradientStop.html | 80 ++-- doc/Axlsx/GraphicFrame.html | 138 +++--- doc/Axlsx/Line3DChart.html | 222 ++++----- doc/Axlsx/LineSeries.html | 104 ++--- doc/Axlsx/Marker.html | 169 +++---- doc/Axlsx/NumFmt.html | 179 ++++--- doc/Axlsx/OneCellAnchor.html | 220 ++++----- doc/Axlsx/Override.html | 102 ++-- doc/Axlsx/Package.html | 274 +++++------ doc/Axlsx/PatternFill.html | 165 +++---- doc/Axlsx/Pic.html | 354 ++++++-------- doc/Axlsx/Pie3DChart.html | 69 ++- doc/Axlsx/PieSeries.html | 125 +++-- doc/Axlsx/RegexValidator.html | 33 +- doc/Axlsx/Relationship.html | 103 ++-- doc/Axlsx/Relationships.html | 60 ++- doc/Axlsx/RestrictionValidator.html | 53 +-- doc/Axlsx/Row.html | 201 ++++---- doc/Axlsx/Scaling.html | 139 +++--- doc/Axlsx/SerAxis.html | 122 ++--- doc/Axlsx/Series.html | 230 ++------- doc/Axlsx/SeriesTitle.html | 53 +-- doc/Axlsx/Styles.html | 639 ++++++++++++------------- doc/Axlsx/TableStyle.html | 128 +++-- doc/Axlsx/TableStyleElement.html | 178 ++++--- doc/Axlsx/TableStyles.html | 112 ++--- doc/Axlsx/Title.html | 117 ++--- doc/Axlsx/TwoCellAnchor.html | 225 ++++----- doc/Axlsx/ValAxis.html | 90 ++-- doc/Axlsx/ValAxisData.html | 59 ++- doc/Axlsx/View3D.html | 191 ++++---- doc/Axlsx/Workbook.html | 364 +++++++-------- doc/Axlsx/Worksheet.html | 795 +++++++++---------------------- doc/Axlsx/Xf.html | 322 ++++++------- doc/_index.html | 4 +- doc/file.LICENSE.html | 51 +- doc/file.README.html | 313 ++++++------- doc/index.html | 313 ++++++------- doc/method_list.html | 708 +++++++++++++--------------- doc/top-level-namespace.html | 4 +- lib/axlsx/ar.rb | 4 +- 72 files changed, 5684 insertions(+), 8276 deletions(-) diff --git a/.yardoc/checksums b/.yardoc/checksums index 00fbf8b8..09433d54 100644 --- a/.yardoc/checksums +++ b/.yardoc/checksums @@ -1,59 +1,59 @@ -lib/axlsx/stylesheet/table_styles.rb 805b00e2abd9b5e248590135067b6e43785e7240 -lib/axlsx/stylesheet/table_style.rb 3c3712b3958b6ae8f645971b0eb1fb92dd1dddbf -lib/axlsx/stylesheet/border_pr.rb e8094ee1f75f5028d2ec68dce1590ee68dbede21 -lib/axlsx/drawing/pie_3D_chart.rb f9c70bd12b697dcd51780f29c037d4659b48e479 -lib/axlsx/stylesheet/color.rb 442c205c92723c7b06f10e434ac03e2d09ab559f -lib/axlsx/drawing/marker.rb 8b8c5ef799c7f56288e2951058a93db020846ea9 -lib/axlsx/util/constants.rb 4dc8b1d765aa0593615a14c3761b0183be308908 -lib/axlsx/stylesheet/cell_protection.rb 483e77c51f96cb52a805668b0ed40f14bf163634 -lib/axlsx/stylesheet/cell_style.rb ceb0552421cb947584c1800c9aad43536fc7715d -lib/axlsx/drawing/series_title.rb 2638d611b790db9281108110623fd71e8e79fae0 -lib/axlsx/drawing/line_series.rb c7475484fd05284520a35806ff4562d125b2b3b8 -lib/axlsx/drawing/series.rb 168dbadedd446ff0f28bc9a5187b571d07a8936e +lib/axlsx.rb 13120de6532e630275e55e14c36079384fd213ea +lib/axlsx/ar.rb 5affca8439de161169b0e94b86cb8b67e0143798 lib/axlsx/package.rb 78577b6f7643ca94d34da5539d80f58b3adcabe5 -lib/axlsx/stylesheet/cell_alignment.rb 71118e51e1d11ab570fc89b8fbbd639b8023a39c -lib/axlsx/content_type/default.rb 1c1a700e266964877599e8fdd28adb6771576030 -lib/axlsx/drawing/title.rb 497e6ddeb153bb230f5bf9dc76e799b91ae2a8ed +lib/axlsx/version.rb 96e3c923077c58fafda56607ef9439e203721c2b +lib/axlsx/drawing/pic.rb d91e014f8e2604480437a434f714ad25d31acbff lib/axlsx/drawing/axis.rb 8eaf645e24c1fef43a475ceb28caf5116af25736 -lib/axlsx/stylesheet/table_style_element.rb 117b80432ed6191c81a9e07bd467281319d2b830 -lib/axlsx/content_type/content_type.rb 6c576e1618f99f7163fffa6b6e89e964653dcb5f -lib/axlsx/stylesheet/num_fmt.rb 796ee45611b89e8a670dcff3dd97ad9306f18048 -lib/axlsx/rels/relationships.rb 9c741e180796259bb378a789fd484fa1d8f04425 -lib/axlsx/ar.rb 81d786351c607bce3cf2035c0e3df880d731d33c -lib/axlsx.rb 13120de6532e630275e55e14c36079384fd213ea -lib/axlsx/drawing/graphic_frame.rb 271e897616d85ebc069820c0d6a7dd3a716deff2 -lib/axlsx/content_type/override.rb 43ff5dbbb01fbe0237a11c3da7fa5d8e1d5b67ef -lib/axlsx/drawing/pie_series.rb 66dfb2152f3b0e80b358c7af9061beb3c4ab984d -lib/axlsx/drawing/bar_series.rb ffe5dae5292d0324442b870fb1958847da6dde5e -lib/axlsx/stylesheet/gradient_fill.rb 298777d050500c2f1f53294d8c71fce867997b3d -lib/axlsx/workbook/worksheet/row.rb dbf8825d5959a4a1e14adf2f07c590329c4fe02c -lib/axlsx/util/simple_typed_list.rb 49fa9b98ef7fc0990b070509c8cf31ddcf93ec9e -lib/axlsx/workbook/workbook.rb 44a2cc7a807d47987b16b2577c9432480b07ff89 -lib/axlsx/drawing/view_3D.rb 8a83aed740c05d28aaa0e3430c7c4d2bbc44cc61 -lib/axlsx/stylesheet/fill.rb 44c473c7eafc37690cae9de2cc11543c992752ff +lib/axlsx/drawing/chart.rb bd437e8cb970bbd6df7488b2187199a1f0f3e376 +lib/axlsx/drawing/title.rb 497e6ddeb153bb230f5bf9dc76e799b91ae2a8ed +lib/axlsx/doc_props/app.rb c64077808d7cb6aa30472e15c600009a01f3f338 lib/axlsx/stylesheet/xf.rb 97e3c67007a182fc7df22e5c06f1510cfe5c11ac -lib/axlsx/drawing/two_cell_anchor.rb 18b904330ac186f497a2c8d13e0b0de881340e09 -lib/axlsx/stylesheet/styles.rb c5685e442e2a61f665e4aab479705bbc1889caed -lib/axlsx/drawing/val_axis.rb 8c1f847cff0b0c788c11b31ac55995566bef16b1 -lib/axlsx/drawing/cat_axis.rb fde414377386d8ee7d1574e96d77a28a991ea21c -lib/axlsx/stylesheet/font.rb 1ee29414f720d26b7d484a90d8ebdaa7ecda4fa6 +lib/axlsx/util/constants.rb 4dc8b1d765aa0593615a14c3761b0183be308908 +lib/axlsx/drawing/series.rb 168dbadedd446ff0f28bc9a5187b571d07a8936e +lib/axlsx/drawing/marker.rb 8b8c5ef799c7f56288e2951058a93db020846ea9 +lib/axlsx/doc_props/core.rb 90ebc8086f6606af02275c27068c359a5647faf0 +lib/axlsx/drawing/drawing.rb 69b5fe2e76d64958e6c6529cabf6d2f717b0df81 +lib/axlsx/stylesheet/fill.rb 44c473c7eafc37690cae9de2cc11543c992752ff +lib/axlsx/drawing/scaling.rb 75a7a015a715bdd25f615ecdbe084d841fdc6ad0 lib/axlsx/util/validators.rb c70f27b943d3711fbe1244a8311789a6fad7e31e -lib/axlsx/doc_props/app.rb c64077808d7cb6aa30472e15c600009a01f3f338 -lib/axlsx/workbook/worksheet/worksheet.rb 8f2dea71b5b95d700127958757301495a444e5c8 -lib/axlsx/workbook/worksheet/cell.rb 33974b3d9807738d33943321d7864d36e1d5bcf8 -lib/axlsx/rels/relationship.rb 8d279056b53ba22ff288187ff0f3d18273dcdcb7 -lib/axlsx/stylesheet/border.rb cee9b6982c4a946f7caa850090f72d0d7ce0a0d2 +lib/axlsx/stylesheet/font.rb 1ee29414f720d26b7d484a90d8ebdaa7ecda4fa6 +lib/axlsx/drawing/view_3D.rb 8a83aed740c05d28aaa0e3430c7c4d2bbc44cc61 +lib/axlsx/stylesheet/color.rb 442c205c92723c7b06f10e434ac03e2d09ab559f +lib/axlsx/drawing/cat_axis.rb fde414377386d8ee7d1574e96d77a28a991ea21c lib/axlsx/drawing/ser_axis.rb 1f4952403738e3089e30deb266b1385679d46096 -lib/axlsx/drawing/drawing.rb 69b5fe2e76d64958e6c6529cabf6d2f717b0df81 -lib/axlsx/drawing/chart.rb bd437e8cb970bbd6df7488b2187199a1f0f3e376 -lib/axlsx/version.rb 96e3c923077c58fafda56607ef9439e203721c2b -lib/axlsx/stylesheet/gradient_stop.rb 56c3c6b030bad35ee6cff7ad3cd9207048dd4e68 -lib/axlsx/drawing/val_axis_data.rb c57c0abf5abb4aca9fba774f20e2f2c04d3020e8 -lib/axlsx/drawing/cat_axis_data.rb f440010084afad99d97d31354f5b5a8ee8766e9b -lib/axlsx/doc_props/core.rb 90ebc8086f6606af02275c27068c359a5647faf0 -lib/axlsx/drawing/pic.rb d91e014f8e2604480437a434f714ad25d31acbff +lib/axlsx/drawing/val_axis.rb 8c1f847cff0b0c788c11b31ac55995566bef16b1 +lib/axlsx/workbook/workbook.rb 44a2cc7a807d47987b16b2577c9432480b07ff89 +lib/axlsx/stylesheet/styles.rb c5685e442e2a61f665e4aab479705bbc1889caed +lib/axlsx/stylesheet/border.rb cee9b6982c4a946f7caa850090f72d0d7ce0a0d2 +lib/axlsx/rels/relationship.rb 8d279056b53ba22ff288187ff0f3d18273dcdcb7 +lib/axlsx/drawing/bar_series.rb ffe5dae5292d0324442b870fb1958847da6dde5e +lib/axlsx/drawing/pie_series.rb 66dfb2152f3b0e80b358c7af9061beb3c4ab984d +lib/axlsx/rels/relationships.rb 9c741e180796259bb378a789fd484fa1d8f04425 +lib/axlsx/stylesheet/num_fmt.rb 796ee45611b89e8a670dcff3dd97ad9306f18048 +lib/axlsx/drawing/line_series.rb c7475484fd05284520a35806ff4562d125b2b3b8 +lib/axlsx/drawing/pie_3D_chart.rb f9c70bd12b697dcd51780f29c037d4659b48e479 +lib/axlsx/stylesheet/border_pr.rb e8094ee1f75f5028d2ec68dce1590ee68dbede21 +lib/axlsx/drawing/series_title.rb 2638d611b790db9281108110623fd71e8e79fae0 lib/axlsx/drawing/bar_3D_chart.rb 83de47e0e9a0c7b46bdc0ea255b50f9ee8a1d1a8 -lib/axlsx/drawing/scaling.rb 75a7a015a715bdd25f615ecdbe084d841fdc6ad0 -lib/axlsx/drawing/one_cell_anchor.rb 523ce88a5fd0245d119a6221ef88d629ed20c51e -lib/axlsx/stylesheet/pattern_fill.rb 9ba1cf8983ab9fba89ca9489fd04714eb6a94a2b +lib/axlsx/content_type/default.rb 1c1a700e266964877599e8fdd28adb6771576030 +lib/axlsx/stylesheet/cell_style.rb ceb0552421cb947584c1800c9aad43536fc7715d +lib/axlsx/content_type/override.rb 43ff5dbbb01fbe0237a11c3da7fa5d8e1d5b67ef +lib/axlsx/drawing/cat_axis_data.rb f440010084afad99d97d31354f5b5a8ee8766e9b +lib/axlsx/drawing/val_axis_data.rb c57c0abf5abb4aca9fba774f20e2f2c04d3020e8 lib/axlsx/drawing/line_3D_chart.rb 77bc8e6efbe42f8928fb6ffd3c2538ff99ec2444 +lib/axlsx/drawing/graphic_frame.rb 271e897616d85ebc069820c0d6a7dd3a716deff2 +lib/axlsx/util/simple_typed_list.rb 49fa9b98ef7fc0990b070509c8cf31ddcf93ec9e +lib/axlsx/workbook/worksheet/row.rb dbf8825d5959a4a1e14adf2f07c590329c4fe02c +lib/axlsx/stylesheet/table_style.rb 3c3712b3958b6ae8f645971b0eb1fb92dd1dddbf +lib/axlsx/stylesheet/pattern_fill.rb 9ba1cf8983ab9fba89ca9489fd04714eb6a94a2b +lib/axlsx/stylesheet/table_styles.rb 805b00e2abd9b5e248590135067b6e43785e7240 +lib/axlsx/workbook/worksheet/cell.rb 33974b3d9807738d33943321d7864d36e1d5bcf8 +lib/axlsx/drawing/one_cell_anchor.rb 523ce88a5fd0245d119a6221ef88d629ed20c51e +lib/axlsx/drawing/two_cell_anchor.rb 18b904330ac186f497a2c8d13e0b0de881340e09 +lib/axlsx/stylesheet/gradient_fill.rb 298777d050500c2f1f53294d8c71fce867997b3d +lib/axlsx/stylesheet/gradient_stop.rb 56c3c6b030bad35ee6cff7ad3cd9207048dd4e68 +lib/axlsx/stylesheet/cell_alignment.rb 71118e51e1d11ab570fc89b8fbbd639b8023a39c +lib/axlsx/content_type/content_type.rb 6c576e1618f99f7163fffa6b6e89e964653dcb5f +lib/axlsx/stylesheet/cell_protection.rb 483e77c51f96cb52a805668b0ed40f14bf163634 +lib/axlsx/workbook/worksheet/worksheet.rb 8f2dea71b5b95d700127958757301495a444e5c8 +lib/axlsx/stylesheet/table_style_element.rb 117b80432ed6191c81a9e07bd467281319d2b830 diff --git a/.yardoc/objects/root.dat b/.yardoc/objects/root.dat index 81dc9df0..316a9121 100644 Binary files a/.yardoc/objects/root.dat and b/.yardoc/objects/root.dat differ diff --git a/.yardoc/proxy_types b/.yardoc/proxy_types index 97e24d35..fce7e2fe 100644 Binary files a/.yardoc/proxy_types and b/.yardoc/proxy_types differ diff --git a/README.md b/README.md index d0d834f2..7ade0a98 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Axlsx: Office Open XML Spreadsheet Generation **License**: MIT License **Latest Version**: 1.0.10.a **Ruby Version**: 1.8.7 - 1.9.3 -**Release Date**: November 26th 2011 +**Release Date**: November 27th 2011 Synopsis -------- @@ -210,13 +210,13 @@ Rails 3 def report # First generate your package from the model # scopes, conditions etc are allowed but must be before the to_xlsx call. - p = Post.to_xlsx + p = Post.to_xlsx(:all, :style => {:border => Axlsx::STYLE_THIN_BORDER}) # Add in some basic styles and formats percent, date, header = nil, nil, nil p.workbook.styles do |s| - percent = s.add_style :num_fmt=>9 - date = s.add_style :format_code => 'yyyy/mm/dd' + percent = s.add_style :num_fmt=>9, :border => STYLE_THIN_BORDER + date = s.add_style :format_code => 'yyyy/mm/dd', :border => STYLE_THIN_BORDER header = s.add_style :bg_color => "FF000000", :fg_color => "FFFFFFFF", :alignment => {:horizontal=>:center}, :sz=>14 end @@ -260,6 +260,7 @@ Changelog - Added acts_as_xlsx mixin for rails3 See Examples - Added row.style assignation for updating the cell style for an entire row - Added col_style method to worksheet upate a the style for a column of cells + - Added cols for an easy reference to columns in a worksheet. - **October.26.11**: 1.0.9 release - Updated to support ruby 1.9.3 diff --git a/doc/Axlsx.html b/doc/Axlsx.html index 0dc974f7..956a23f1 100644 --- a/doc/Axlsx.html +++ b/doc/Axlsx.html @@ -81,15 +81,14 @@

Overview

-

-xlsx generation with charts, images, automated column width, customizable + +

xlsx generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going -to load on your client’s machine. -

+to load on your client's machine.

@@ -117,9 +116,8 @@ to load on your client’s machine.
VERSION =
-

-version -

+ +

version

@@ -129,15 +127,13 @@ version
-
"1.0.10a"
-
+
"1.0.10a"
ENCODING =
-

-XML Encoding -

+ +

XML Encoding

@@ -147,15 +143,13 @@ XML Encoding
-
"UTF-8"
-
+
"UTF-8"
XML_NS =
-

-spreadsheetML namespace -

+ +

spreadsheetML namespace

@@ -165,15 +159,13 @@ spreadsheetML namespace
-
"http://schemas.openxmlformats.org/spreadsheetml/2006/main"
-
+
"http://schemas.openxmlformats.org/spreadsheetml/2006/main"
XML_NS_T =
-

-content-types namespace -

+ +

content-types namespace

@@ -183,15 +175,13 @@ content-types namespace
-
"http://schemas.openxmlformats.org/package/2006/content-types"
-
+
"http://schemas.openxmlformats.org/package/2006/content-types"
APP_NS =
-

-extended-properties namespace -

+ +

extended-properties namespace

@@ -201,15 +191,13 @@ extended-properties namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
APP_NS_VT =
-

-doc props namespace -

+ +

doc props namespace

@@ -219,15 +207,13 @@ doc props namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
CORE_NS =
-

-core properties namespace -

+ +

core properties namespace

@@ -237,15 +223,13 @@ core properties namespace
-
"http://schemas.openxmlformats.org/package/2006/metadata/core-properties"
-
+
"http://schemas.openxmlformats.org/package/2006/metadata/core-properties"
CORE_NS_DC =
-

-dc elements (core) namespace -

+ +

dc elements (core) namespace

@@ -255,15 +239,13 @@ dc elements (core) namespace
-
"http://purl.org/dc/elements/1.1/"
-
+
"http://purl.org/dc/elements/1.1/"
CORE_NS_DCMIT =
-

-dcmit (core) namespcace -

+ +

dcmit (core) namespcace

@@ -273,15 +255,13 @@ dcmit (core) namespcace
-
"http://purl.org/dc/dcmitype/"
-
+
"http://purl.org/dc/dcmitype/"
CORE_NS_DCT =
-

-dc terms namespace -

+ +

dc terms namespace

@@ -291,15 +271,13 @@ dc terms namespace
-
"http://purl.org/dc/terms/"
-
+
"http://purl.org/dc/terms/"
CORE_NS_XSI =
-

-xml schema namespace -

+ +

xml schema namespace

@@ -309,15 +287,13 @@ xml schema namespace
-
"http://www.w3.org/2001/XMLSchema-instance"
-
+
"http://www.w3.org/2001/XMLSchema-instance"
XML_NS_XDR =
-

-spreadsheet drawing namespace -

+ +

spreadsheet drawing namespace

@@ -327,15 +303,13 @@ spreadsheet drawing namespace
-
"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"
-
+
"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"
XML_NS_A =
-

-drawing namespace -

+ +

drawing namespace

@@ -345,15 +319,13 @@ drawing namespace
-
"http://schemas.openxmlformats.org/drawingml/2006/main"
-
+
"http://schemas.openxmlformats.org/drawingml/2006/main"
XML_NS_C =
-

-chart namespace -

+ +

chart namespace

@@ -363,15 +335,13 @@ chart namespace
-
"http://schemas.openxmlformats.org/drawingml/2006/chart"
-
+
"http://schemas.openxmlformats.org/drawingml/2006/chart"
XML_NS_R =
-

-relationships namespace -

+ +

relationships namespace

@@ -381,15 +351,13 @@ relationships namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships"
RELS_R =
-

-relationships name space -

+ +

relationships name space

@@ -399,15 +367,13 @@ relationships name space
-
"http://schemas.openxmlformats.org/package/2006/relationships"
-
+
"http://schemas.openxmlformats.org/package/2006/relationships"
TABLE_R =
-

-table rels namespace -

+ +

table rels namespace

@@ -417,15 +383,13 @@ table rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"
WORKBOOK_R =
-

-workbook rels namespace -

+ +

workbook rels namespace

@@ -435,15 +399,13 @@ workbook rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
WORKSHEET_R =
-

-worksheet rels namespace -

+ +

worksheet rels namespace

@@ -453,15 +415,13 @@ worksheet rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"
APP_R =
-

-app rels namespace -

+ +

app rels namespace

@@ -471,15 +431,13 @@ app rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
CORE_R =
-

-core rels namespace -

+ +

core rels namespace

@@ -489,15 +447,13 @@ core rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/metadata/core-properties"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/metadata/core-properties"
STYLES_R =
-

-styles rels namespace -

+ +

styles rels namespace

@@ -507,15 +463,13 @@ styles rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
DRAWING_R =
-

-drawing rels namespace -

+ +

drawing rels namespace

@@ -525,15 +479,13 @@ drawing rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"
CHART_R =
-

-chart rels namespace -

+ +

chart rels namespace

@@ -543,15 +495,13 @@ chart rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"
IMAGE_R =
-

-image rels namespace -

+ +

image rels namespace

@@ -561,15 +511,13 @@ image rels namespace
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
-
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
TABLE_CT =
-

-table content type -

+ +

table content type

@@ -579,15 +527,13 @@ table content type
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
-
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
WORKBOOK_CT =
-

-workbook content type -

+ +

workbook content type

@@ -597,15 +543,13 @@ workbook content type
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
-
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
APP_CT =
-

-app content type -

+ +

app content type

@@ -615,15 +559,13 @@ app content type
-
"application/vnd.openxmlformats-officedocument.extended-properties+xml"
-
+
"application/vnd.openxmlformats-officedocument.extended-properties+xml"
RELS_CT =
-

-rels content type -

+ +

rels content type

@@ -633,15 +575,13 @@ rels content type
-
"application/vnd.openxmlformats-package.relationships+xml"
-
+
"application/vnd.openxmlformats-package.relationships+xml"
STYLES_CT =
-

-styles content type -

+ +

styles content type

@@ -651,15 +591,13 @@ styles content type
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
-
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
XML_CT =
-

-xml content type -

+ +

xml content type

@@ -669,15 +607,13 @@ xml content type
-
"application/xml"
-
+
"application/xml"
WORKSHEET_CT =
-

-worksheet content type -

+ +

worksheet content type

@@ -687,15 +623,13 @@ worksheet content type
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
-
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
SHARED_STRINGS_CT =
-

-shared strings content type -

+ +

shared strings content type

@@ -705,15 +639,13 @@ shared strings content type
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
-
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
CORE_CT =
-

-core content type -

+ +

core content type

@@ -723,15 +655,13 @@ core content type
-
"application/vnd.openxmlformats-package.core-properties+xml"
-
+
"application/vnd.openxmlformats-package.core-properties+xml"
CHART_CT =
-

-chart content type -

+ +

chart content type

@@ -741,15 +671,13 @@ chart content type
-
"application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
-
+
"application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
JPEG_CT =
-

-jpeg content type -

+ +

jpeg content type

@@ -759,15 +687,13 @@ jpeg content type
-
"image/jpeg"
-
+
"image/jpeg"
GIF_CT =
-

-gif content type -

+ +

gif content type

@@ -777,15 +703,13 @@ gif content type
-
"image/gif"
-
+
"image/gif"
PNG_CT =
-

-png content type -

+ +

png content type

@@ -795,15 +719,13 @@ png content type
-
"image/png"
-
+
"image/png"
DRAWING_CT =
-

-drawing content type -

+ +

drawing content type

@@ -813,15 +735,13 @@ drawing content type
-
"application/vnd.openxmlformats-officedocument.drawing+xml"
-
+
"application/vnd.openxmlformats-officedocument.drawing+xml"
XML_EX =
-

-xml content type extensions -

+ +

xml content type extensions

@@ -831,15 +751,13 @@ xml content type extensions
-
"xml"
-
+
"xml"
JPEG_EX =
-

-jpeg extension -

+ +

jpeg extension

@@ -849,15 +767,13 @@ jpeg extension
-
"jpeg"
-
+
"jpeg"
GIF_EX =
-

-gif extension -

+ +

gif extension

@@ -867,15 +783,13 @@ gif extension
-
"gif"
-
+
"gif"
PNG_EX =
-

-png extension -

+ +

png extension

@@ -885,15 +799,13 @@ png extension
-
"png"
-
+
"png"
RELS_EX =
-

-rels content type extension -

+ +

rels content type extension

@@ -903,15 +815,13 @@ rels content type extension
-
"rels"
-
+
"rels"
WORKBOOK_PN =
-

-workbook part -

+ +

workbook part

@@ -921,15 +831,13 @@ workbook part
-
"xl/workbook.xml"
-
+
"xl/workbook.xml"
STYLES_PN =
-

-styles part -

+ +

styles part

@@ -939,15 +847,13 @@ styles part
-
"styles.xml"
-
+
"styles.xml"
APP_PN =
-

-app part -

+ +

app part

@@ -957,15 +863,13 @@ app part
-
"docProps/app.xml"
-
+
"docProps/app.xml"
CORE_PN =
-

-core part -

+ +

core part

@@ -975,15 +879,13 @@ core part
-
"docProps/core.xml"
-
+
"docProps/core.xml"
CONTENT_TYPES_PN =
-

-content types part -

+ +

content types part

@@ -993,15 +895,13 @@ content types part
-
"[Content_Types].xml"
-
+
"[Content_Types].xml"
RELS_PN =
-

-rels part -

+ +

rels part

@@ -1011,15 +911,13 @@ rels part
-
"_rels/.rels"
-
+
"_rels/.rels"
WORKBOOK_RELS_PN =
-

-workbook rels part -

+ +

workbook rels part

@@ -1029,15 +927,13 @@ workbook rels part
-
"xl/_rels/workbook.xml.rels"
-
+
"xl/_rels/workbook.xml.rels"
WORKSHEET_PN =
-

-worksheet part -

+ +

worksheet part

@@ -1047,15 +943,13 @@ worksheet part
-
"worksheets/sheet%d.xml"
-
+
"worksheets/sheet%d.xml"
WORKSHEET_RELS_PN =
-

-worksheet rels part -

+ +

worksheet rels part

@@ -1065,15 +959,13 @@ worksheet rels part
-
"worksheets/_rels/sheet%d.xml.rels"
-
+
"worksheets/_rels/sheet%d.xml.rels"
DRAWING_PN =
-

-drawing part -

+ +

drawing part

@@ -1083,15 +975,13 @@ drawing part
-
"drawings/drawing%d.xml"
-
+
"drawings/drawing%d.xml"
DRAWING_RELS_PN =
-

-drawing rels part -

+ +

drawing rels part

@@ -1101,15 +991,13 @@ drawing rels part
-
"drawings/_rels/drawing%d.xml.rels"
-
+
"drawings/_rels/drawing%d.xml.rels"
CHART_PN =
-

-chart part -

+ +

chart part

@@ -1119,15 +1007,13 @@ chart part
-
"charts/chart%d.xml"
-
+
"charts/chart%d.xml"
IMAGE_PN =
-

-chart part -

+ +

chart part

@@ -1137,15 +1023,13 @@ chart part
-
"media/image%d.%s"
-
+
"media/image%d.%s"
APP_XSD =
-

-App validation schema -

+ +

App validation schema

@@ -1155,15 +1039,13 @@ App validation schema
-
"lib/schema/shared-documentPropertiesExtended.xsd"
-
+
"lib/schema/shared-documentPropertiesExtended.xsd"
CORE_XSD =
-

-core validation schema -

+ +

core validation schema

@@ -1173,15 +1055,13 @@ core validation schema
-
"lib/schema/opc-coreProperties.xsd"
-
+
"lib/schema/opc-coreProperties.xsd"
CONTENT_TYPES_XSD =
-

-content types validation schema -

+ +

content types validation schema

@@ -1191,15 +1071,13 @@ content types validation schema
-
"lib/schema/opc-contentTypes.xsd"
-
+
"lib/schema/opc-contentTypes.xsd"
RELS_XSD =
-

-rels validation schema -

+ +

rels validation schema

@@ -1209,15 +1087,13 @@ rels validation schema
-
"lib/schema/opc-relationships.xsd"
-
+
"lib/schema/opc-relationships.xsd"
SML_XSD =
-

-spreadsheetML validation schema -

+ +

spreadsheetML validation schema

@@ -1227,15 +1103,13 @@ spreadsheetML validation schema
-
"lib/schema/sml.xsd"
-
+
"lib/schema/sml.xsd"
DRAWING_XSD =
-

-drawing validation schema -

+ +

drawing validation schema

@@ -1245,15 +1119,13 @@ drawing validation schema
-
"lib/schema/dml-spreadsheetDrawing.xsd"
-
+
"lib/schema/dml-spreadsheetDrawing.xsd"
NUM_FMT_PERCENT =
-

-number format id for pecentage formatting using the default formatting id. -

+ +

number format id for pecentage formatting using the default formatting id.

@@ -1263,15 +1135,13 @@ number format id for pecentage formatting using the default formatting id.
-
9
-
+
9
NUM_FMT_YYYYMMDD =
-

-number format id for date format like 2011/11/13 -

+ +

number format id for date format like 2011/11/13

@@ -1281,15 +1151,13 @@ number format id for date format like 2011/11/13
-
100
-
+
100
NUM_FMT_YYYYMMDDHHMMSS =
-

-number format id for time format the creates 2011/11/13 12:23:10 -

+ +

number format id for time format the creates 2011/11/13 12:23:10

@@ -1299,15 +1167,13 @@ number format id for time format the creates 2011/11/13 12:23:10
-
101
-
+
101
STYLE_THIN_BORDER =
-

-cellXfs id for thin borders around the cell -

+ +

cellXfs id for thin borders around the cell

@@ -1317,15 +1183,13 @@ cellXfs id for thin borders around the cell
-
1
-
+
1
ERR_RESTRICTION =
-

-error messages RestrictionValidor -

+ +

error messages RestrictionValidor

@@ -1335,15 +1199,13 @@ error messages RestrictionValidor
-
"Invalid Data: %s. %s must be one of %s."
-
+
"Invalid Data: %s. %s must be one of %s."
ERR_TYPE =
-

-error message DataTypeValidator -

+ +

error message DataTypeValidator

@@ -1353,15 +1215,13 @@ error message DataTypeValidator
-
"Invalid Data %s for %s. must be %s."
-
+
"Invalid Data %s for %s. must be %s."
ERR_REGEX =
-

-error message for RegexValidator -

+ +

error message for RegexValidator

@@ -1371,8 +1231,7 @@ error message for RegexValidator
-
"Invalid Data. %s does not match %s."
-
+
"Invalid Data. %s does not match %s."
@@ -1405,9 +1264,8 @@ error message for RegexValidator -

-determines the cell range for the items provided. -

+
+

determines the cell range for the items provided.

@@ -1429,10 +1287,9 @@ determines the cell range for the items provided. -

-Requires that the value is a form that can be evaluated as a boolean in an -xml document. -

+
+

Requires that the value is a form that can be evaluated as a boolean in an +xml document.

@@ -1454,11 +1311,10 @@ xml document. -

-Requires that the value is a valid content_type TABLE_CT, WORKBOOK_CT, +

+

Requires that the value is a valid content_type TABLE_CT, WORKBOOK_CT, APP_CT, RELS_CT, STYLES_CT, XML_CT, WORKSHEET_CT, SHARED_STRINGS_CT, -CORE_CT, CHART_CT, DRAWING_CT are allowed. -

+CORE_CT, CHART_CT, DRAWING_CT are allowed.

@@ -1480,9 +1336,8 @@ CORE_CT, CHART_CT, DRAWING_CT are allowed. -

-Requires that the value is a Float. -

+
+

Requires that the value is a Float.

@@ -1504,9 +1359,8 @@ Requires that the value is a Float. -

-Requires that the value is a gradient_type. -

+
+

Requires that the value is a gradient_type.

@@ -1528,11 +1382,10 @@ Requires that the value is a gradient_type. -

-Requires that the value is a valid horizontal_alignment :general, :left, +

+

Requires that the value is a valid horizontal_alignment :general, :left, :center, :right, :fill, :justify, :centerContinuous, :distributed are -allowed. -

+allowed.

@@ -1554,9 +1407,8 @@ allowed. -

-Requires that the value is a Fixnum or Integer. -

+
+

Requires that the value is a Fixnum or Integer.

@@ -1578,9 +1430,8 @@ Requires that the value is a Fixnum or Integer. -

-Requires that the value is valid pattern type. -

+
+

Requires that the value is valid pattern type.

@@ -1602,11 +1453,10 @@ Requires that the value is valid pattern type. -

-Requires that the value is a valid relationship_type XML_NS_R, TABLE_R, +

+

Requires that the value is a valid relationship_type XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, -DRAWING_R are allowed. -

+DRAWING_R are allowed.

@@ -1628,9 +1478,8 @@ DRAWING_R are allowed. -

-Requires that the value is a String. -

+
+

Requires that the value is a String.

@@ -1652,8 +1501,8 @@ Requires that the value is a String. -

-Requires that the value is a valid table element type :wholeTable, +

+

Requires that the value is a valid table element type :wholeTable, :headerRow, :totalRow, :firstColumn, :lastColumn, :firstRowStripe, :secondRowStripe, :firstColumnStripe, :secondColumnStripe, :firstHeaderCell, :lastHeaderCell, :firstTotalCell, :lastTotalCell, @@ -1661,8 +1510,7 @@ Requires that the value is a valid table element type :wholeTable, :firstSubtotalRow, :secondSubtotalRow, :thirdSubtotalRow, :blankRow, :firstColumnSubheading, :secondColumnSubheading, :thirdColumnSubheading, :firstRowSubheading, :secondRowSubheading, :thirdRowSubheading, -:pageFieldLabels, :pageFieldValues are allowed. -

+:pageFieldLabels, :pageFieldValues are allowed.

@@ -1684,10 +1532,9 @@ Requires that the value is a valid table element type :wholeTable, -

-Requires that the value is a Fixnum or Integer and is greater or equal to -0. -

+
+

Requires that the value is a Fixnum or Integer and is greater or equal to +0.

@@ -1709,10 +1556,9 @@ Requires that the value is a Fixnum or Integer and is greater or equal to -

-Requires that the value is a valid vertical_alignment :top, :center, -:bottom, :justify, :distributed are allowed. -

+
+

Requires that the value is a valid vertical_alignment :top, :center, +:bottom, :justify, :distributed are allowed.

@@ -1736,9 +1582,8 @@ Requires that the value is a valid vertical_alignment :top, :center,

-

-determines the cell range for the items provided -

+ +

determines the cell range for the items provided

@@ -1763,14 +1608,13 @@ determines the cell range for the items provided
# File 'lib/axlsx.rb', line 37
 
-def self.cell_range(items)
-  return "" unless items.first.is_a? Cell          
-  ref = "#{items.first.row.worksheet.name}!" +
-    "#{items.first.r_abs}"
-  ref += ":#{items.last.r_abs}" if items.size > 1
-  ref
-end
-
+def self.cell_range(items) + return "" unless items.first.is_a? Cell + ref = "#{items.first.row.worksheet.name}!" + + "#{items.first.r_abs}" + ref += ":#{items.last.r_abs}" if items.size > 1 + ref +end @@ -1785,13 +1629,11 @@ determines the cell range for the items provided

-

-Requires that the value is a form that can be evaluated as a boolean in an + +

Requires that the value is a form that can be evaluated as a boolean in an xml document. The value must be an instance of Fixnum, String, Integer, -Symbol, TrueClass or FalseClass and it must be one of 0, 1, -"true", "false", :true, :false, true, false, -"0", or "1" -

+Symbol, TrueClass or FalseClass and it must be one of 0, 1, "true", +"false", :true, :false, true, false, "0", or "1"

@@ -1810,9 +1652,8 @@ Symbol, TrueClass or FalseClass and it must be one of 0, 1, — -

-The value validated -

+
+

The value validated

@@ -1833,10 +1674,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 65
 
-def self.validate_boolean(v)
-  DataTypeValidator.validate(:boolean, [Fixnum, String, Integer, Symbol, TrueClass, FalseClass], v, lambda { |arg| [0, 1, "true", "false", :true, :false, true, false, "0", "1"].include?(arg) })
-end
-
+def self.validate_boolean(v) + DataTypeValidator.validate(:boolean, [Fixnum, String, Integer, Symbol, TrueClass, FalseClass], v, lambda { |arg| [0, 1, "true", "false", :true, :false, true, false, "0", "1"].include?(arg) }) +end @@ -1851,11 +1691,10 @@ The value validated

-

-Requires that the value is a valid content_type TABLE_CT, WORKBOOK_CT, + +

Requires that the value is a valid content_type TABLE_CT, WORKBOOK_CT, APP_CT, RELS_CT, STYLES_CT, XML_CT, WORKSHEET_CT, SHARED_STRINGS_CT, -CORE_CT, CHART_CT, DRAWING_CT are allowed -

+CORE_CT, CHART_CT, DRAWING_CT are allowed

@@ -1874,9 +1713,8 @@ CORE_CT, CHART_CT, DRAWING_CT are allowed — -

-The value validated -

+
+

The value validated

@@ -1897,10 +1735,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 114
 
-def self.validate_content_type(v)
-  RestrictionValidator.validate :content_type, [TABLE_CT, WORKBOOK_CT, APP_CT, RELS_CT, STYLES_CT, XML_CT, WORKSHEET_CT, SHARED_STRINGS_CT, CORE_CT, CHART_CT, JPEG_CT, GIF_CT, PNG_CT, DRAWING_CT], v
-end
-
+def self.validate_content_type(v) + RestrictionValidator.validate :content_type, [TABLE_CT, WORKBOOK_CT, APP_CT, RELS_CT, STYLES_CT, XML_CT, WORKSHEET_CT, SHARED_STRINGS_CT, CORE_CT, CHART_CT, JPEG_CT, GIF_CT, PNG_CT, DRAWING_CT], v +end @@ -1915,9 +1752,8 @@ The value validated

-

-Requires that the value is a Float -

+ +

Requires that the value is a Float

@@ -1936,9 +1772,8 @@ Requires that the value is a Float — -

-The value validated -

+
+

The value validated

@@ -1959,10 +1794,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 77
 
-def self.validate_float(v)
-  DataTypeValidator.validate :float, Float, v
-end
-
+def self.validate_float(v) + DataTypeValidator.validate :float, Float, v +end @@ -1977,10 +1811,9 @@ The value validated

-

-Requires that the value is a gradient_type. valid types are :linear and -:path -

+ +

Requires that the value is a gradient_type. valid types are :linear and +:path

@@ -1999,9 +1832,8 @@ Requires that the value is a gradient_type. valid types are :linear and — -

-The value validated -

+
+

The value validated

@@ -2022,10 +1854,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 93
 
-def self.validate_gradient_type(v)
-  RestrictionValidator.validate :gradient_type, [:linear, :path], v
-end
-
+def self.validate_gradient_type(v) + RestrictionValidator.validate :gradient_type, [:linear, :path], v +end @@ -2040,11 +1871,10 @@ The value validated

-

-Requires that the value is a valid horizontal_alignment :general, :left, + +

Requires that the value is a valid horizontal_alignment :general, :left, :center, :right, :fill, :justify, :centerContinuous, :distributed are -allowed -

+allowed

@@ -2063,9 +1893,8 @@ allowed — -

-The value validated -

+
+

The value validated

@@ -2086,10 +1915,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 100
 
-def self.validate_horizontal_alignment(v)
-  RestrictionValidator.validate :horizontal_alignment, [:general, :left, :center, :right, :fill, :justify, :centerContinuous, :distributed], v
-end
-
+def self.validate_horizontal_alignment(v) + RestrictionValidator.validate :horizontal_alignment, [:general, :left, :center, :right, :fill, :justify, :centerContinuous, :distributed], v +end @@ -2104,9 +1932,8 @@ The value validated

-

-Requires that the value is a Fixnum or Integer -

+ +

Requires that the value is a Fixnum or Integer

@@ -2125,9 +1952,8 @@ Requires that the value is a Fixnum or Integer — -

-The value validated -

+
+

The value validated

@@ -2148,10 +1974,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 57
 
-def self.validate_int(v)
-  DataTypeValidator.validate :unsigned_int, [Fixnum, Integer], v
-end
-
+def self.validate_int(v) + DataTypeValidator.validate :unsigned_int, [Fixnum, Integer], v +end @@ -2166,13 +1991,12 @@ The value validated

-

-Requires that the value is valid pattern type. valid pattern types must be + +

Requires that the value is valid pattern type. valid pattern types must be one of :none, :solid, :mediumGray, :darkGray, :lightGray, :darkHorizontal, :darkVertical, :darkDown, :darkUp, :darkGrid, :darkTrellis, :lightHorizontal, :lightVertical, :lightDown, :lightUp, :lightGrid, -:lightTrellis, :gray125, or :gray0625. -

+:lightTrellis, :gray125, or :gray0625.

@@ -2191,9 +2015,8 @@ one of :none, :solid, :mediumGray, :darkGray, :lightGray, :darkHorizontal, — -

-The value validated -

+
+

The value validated

@@ -2215,11 +2038,10 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 85
 
-def self.validate_pattern_type(v)
-  RestrictionValidator.validate :pattern_type, [:none, :solid, :mediumGray, :darkGray, :lightGray, :darkHorizontal, :darkVertical, :darkDown, :darkUp, :darkGrid,
-     :darkTrellis, :lightHorizontal, :lightVertical, :lightDown, :lightUp, :lightGrid, :lightTrellis, :gray125, :gray0625], v
-end
-
+def self.validate_pattern_type(v) + RestrictionValidator.validate :pattern_type, [:none, :solid, :mediumGray, :darkGray, :lightGray, :darkHorizontal, :darkVertical, :darkDown, :darkUp, :darkGrid, + :darkTrellis, :lightHorizontal, :lightVertical, :lightDown, :lightUp, :lightGrid, :lightTrellis, :gray125, :gray0625], v +end @@ -2234,11 +2056,10 @@ The value validated

-

-Requires that the value is a valid relationship_type XML_NS_R, TABLE_R, + +

Requires that the value is a valid relationship_type XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, -DRAWING_R are allowed -

+DRAWING_R are allowed

@@ -2257,9 +2078,8 @@ DRAWING_R are allowed — -

-The value validated -

+
+

The value validated

@@ -2280,10 +2100,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 121
 
-def self.validate_relationship_type(v)
-  RestrictionValidator.validate :relationship_type, [XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, DRAWING_R, IMAGE_R], v
-end
-
+def self.validate_relationship_type(v) + RestrictionValidator.validate :relationship_type, [XML_NS_R, TABLE_R, WORKBOOK_R, WORKSHEET_R, APP_R, RELS_R, CORE_R, STYLES_R, CHART_R, DRAWING_R, IMAGE_R], v +end @@ -2298,9 +2117,8 @@ The value validated

-

-Requires that the value is a String -

+ +

Requires that the value is a String

@@ -2319,9 +2137,8 @@ Requires that the value is a String — -

-The value validated -

+
+

The value validated

@@ -2342,10 +2159,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 71
 
-def self.validate_string(v)
-  DataTypeValidator.validate :string, String, v
-end
-
+def self.validate_string(v) + DataTypeValidator.validate :string, String, v +end @@ -2360,8 +2176,8 @@ The value validated

-

-Requires that the value is a valid table element type :wholeTable, + +

Requires that the value is a valid table element type :wholeTable, :headerRow, :totalRow, :firstColumn, :lastColumn, :firstRowStripe, :secondRowStripe, :firstColumnStripe, :secondColumnStripe, :firstHeaderCell, :lastHeaderCell, :firstTotalCell, :lastTotalCell, @@ -2369,8 +2185,7 @@ Requires that the value is a valid table element type :wholeTable, :firstSubtotalRow, :secondSubtotalRow, :thirdSubtotalRow, :blankRow, :firstColumnSubheading, :secondColumnSubheading, :thirdColumnSubheading, :firstRowSubheading, :secondRowSubheading, :thirdRowSubheading, -:pageFieldLabels, :pageFieldValues are allowed -

+:pageFieldLabels, :pageFieldValues are allowed

@@ -2389,9 +2204,8 @@ Requires that the value is a valid table element type :wholeTable, — -

-The value validated -

+
+

The value validated

@@ -2412,10 +2226,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 128
 
-def self.validate_table_element_type(v)
-  RestrictionValidator.validate :table_element_type, [:wholeTable, :headerRow, :totalRow, :firstColumn, :lastColumn, :firstRowStripe, :secondRowStripe, :firstColumnStripe, :secondColumnStripe, :firstHeaderCell, :lastHeaderCell, :firstTotalCell, :lastTotalCell, :firstSubtotalColumn, :secondSubtotalColumn, :thirdSubtotalColumn, :firstSubtotalRow, :secondSubtotalRow, :thirdSubtotalRow, :blankRow, :firstColumnSubheading, :secondColumnSubheading, :thirdColumnSubheading, :firstRowSubheading, :secondRowSubheading, :thirdRowSubheading, :pageFieldLabels, :pageFieldValues], v
-end
-
+def self.validate_table_element_type(v) + RestrictionValidator.validate :table_element_type, [:wholeTable, :headerRow, :totalRow, :firstColumn, :lastColumn, :firstRowStripe, :secondRowStripe, :firstColumnStripe, :secondColumnStripe, :firstHeaderCell, :lastHeaderCell, :firstTotalCell, :lastTotalCell, :firstSubtotalColumn, :secondSubtotalColumn, :thirdSubtotalColumn, :firstSubtotalRow, :secondSubtotalRow, :thirdSubtotalRow, :blankRow, :firstColumnSubheading, :secondColumnSubheading, :thirdColumnSubheading, :firstRowSubheading, :secondRowSubheading, :thirdRowSubheading, :pageFieldLabels, :pageFieldValues], v +end @@ -2430,9 +2243,8 @@ The value validated

-

-Requires that the value is a Fixnum or Integer and is greater or equal to 0 -

+ +

Requires that the value is a Fixnum or Integer and is greater or equal to 0

@@ -2451,9 +2263,8 @@ Requires that the value is a Fixnum or Integer and is greater or equal to 0 — -

-The value validated -

+
+

The value validated

@@ -2471,9 +2282,8 @@ The value validated — -

-true if the data is valid -

+
+

true if the data is valid

@@ -2490,9 +2300,8 @@ true if the data is valid — -

-raised if the value is not a Fixnum or Integer value greater or equal to 0 -

+
+

raised if the value is not a Fixnum or Integer value greater or equal to 0

@@ -2512,10 +2321,9 @@ raised if the value is not a Fixnum or Integer value greater or equal to 0
# File 'lib/axlsx/util/validators.rb', line 51
 
-def self.validate_unsigned_int(v)
-  DataTypeValidator.validate(:unsigned_int, [Fixnum, Integer], v, lambda { |arg| arg.respond_to?(:>=) && arg >= 0 })
-end
-
+def self.validate_unsigned_int(v) + DataTypeValidator.validate(:unsigned_int, [Fixnum, Integer], v, lambda { |arg| arg.respond_to?(:>=) && arg >= 0 }) +end @@ -2530,10 +2338,9 @@ raised if the value is not a Fixnum or Integer value greater or equal to 0

-

-Requires that the value is a valid vertical_alignment :top, :center, -:bottom, :justify, :distributed are allowed -

+ +

Requires that the value is a valid vertical_alignment :top, :center, +:bottom, :justify, :distributed are allowed

@@ -2552,9 +2359,8 @@ Requires that the value is a valid vertical_alignment :top, :center, — -

-The value validated -

+
+

The value validated

@@ -2575,10 +2381,9 @@ The value validated
# File 'lib/axlsx/util/validators.rb', line 107
 
-def self.validate_vertical_alignment(v)
-  RestrictionValidator.validate :vertical_alignment, [:top, :center, :bottom, :justify, :distributed], v
-end
-
+def self.validate_vertical_alignment(v) + RestrictionValidator.validate :vertical_alignment, [:top, :center, :bottom, :justify, :distributed], v +end @@ -2589,9 +2394,9 @@ The value validated
diff --git a/doc/Axlsx/App.html b/doc/Axlsx/App.html index d8ee7c52..47c9c28a 100644 --- a/doc/Axlsx/App.html +++ b/doc/Axlsx/App.html @@ -97,22 +97,19 @@
Note: -

-Support is not implemented for the following complex types: -

-

-HeadingPairs (VectorVariant), TitlesOfParts (VectorLpstr), HLinks -(VectorVariant), DigSig (DigSigBlob) -

+
+

Support is not implemented for the following complex types:

+ +

HeadingPairs (VectorVariant), TitlesOfParts (VectorLpstr), HLinks +(VectorVariant), DigSig (DigSigBlob)

-

-App represents the app.xml document. The attributes for this object are + +

App represents the app.xml document. The attributes for this object are primarily managed by the application the end user uses to edit the document. None of the attributes are required to serialize a valid xlsx -object. -

+object.

@@ -151,9 +148,8 @@ object. -

-The name of the application. -

+
+

The name of the application.

@@ -178,9 +174,8 @@ The name of the application. -

-The version of the application. -

+
+

The version of the application.

@@ -205,9 +200,8 @@ The version of the application. -

-The number of characters in the document. -

+
+

The number of characters in the document.

@@ -232,9 +226,8 @@ The number of characters in the document. -

-The number of characters in the document including spaces. -

+
+

The number of characters in the document including spaces.

@@ -259,9 +252,8 @@ The number of characters in the document including spaces. -

-The name of the company generating the document. -

+
+

The name of the company generating the document.

@@ -286,9 +278,8 @@ The name of the company generating the document. -

-Document security. -

+
+

Document security.

@@ -313,9 +304,8 @@ Document security. -

-The number of hidden slides. -

+
+

The number of hidden slides.

@@ -340,9 +330,8 @@ The number of hidden slides. -

-The base for hyper links in the document. -

+
+

The base for hyper links in the document.

@@ -367,9 +356,8 @@ The base for hyper links in the document. -

-Indicates that the hyper links in the document have been changed. -

+
+

Indicates that the hyper links in the document have been changed.

@@ -394,9 +382,8 @@ Indicates that the hyper links in the document have been changed. -

-The number of lines in the document. -

+
+

The number of lines in the document.

@@ -421,9 +408,8 @@ The number of lines in the document. -

-The links in the document are up to date. -

+
+

The links in the document are up to date.

@@ -448,9 +434,8 @@ The links in the document are up to date. -

-The name of the manager for the document. -

+
+

The name of the manager for the document.

@@ -475,9 +460,8 @@ The name of the manager for the document. -

-The total number multimedia clips. -

+
+

The total number multimedia clips.

@@ -502,9 +486,8 @@ The total number multimedia clips. -

-The number of slides that have notes. -

+
+

The number of slides that have notes.

@@ -529,9 +512,8 @@ The number of slides that have notes. -

-The number of pages in the document. -

+
+

The number of pages in the document.

@@ -556,9 +538,8 @@ The number of pages in the document. -

-The number of paragraphs in the document. -

+
+

The number of paragraphs in the document.

@@ -583,9 +564,8 @@ The number of paragraphs in the document. -

-The intended format of the presentation. -

+
+

The intended format of the presentation.

@@ -610,9 +590,8 @@ The intended format of the presentation. -

-The display mode for the document thumbnail. -

+
+

The display mode for the document thumbnail.

@@ -637,9 +616,8 @@ The display mode for the document thumbnail. -

-Indicates if the document is shared. -

+
+

Indicates if the document is shared.

@@ -664,9 +642,8 @@ Indicates if the document is shared. -

-The number of slides in the document. -

+
+

The number of slides in the document.

@@ -691,9 +668,8 @@ The number of slides in the document. -

-The name of the document template. -

+
+

The name of the document template.

@@ -718,9 +694,8 @@ The name of the document template. -

-The total amount of time spent editing. -

+
+

The total amount of time spent editing.

@@ -745,9 +720,8 @@ The total amount of time spent editing. -

-The number of words in the document. -

+
+

The number of words in the document.

@@ -782,9 +756,8 @@ The number of words in the document. -

-Creates an App object. -

+
+

Creates an App object.

@@ -806,9 +779,8 @@ Creates an App object. -

-Generate an app.xml document. -

+
+

Generate an app.xml document.

@@ -833,9 +805,8 @@ Generate an app.xml document.

-

-The name of the application -

+ +

The name of the application

@@ -853,9 +824,8 @@ The name of the application — -

-The name of the application -

+
+

The name of the application

@@ -875,10 +845,9 @@ The name of the application
# File 'lib/axlsx/doc_props/app.rb', line 74
 
-def Application
-  @Application
-end
-
+def Application + @Application +end @@ -896,9 +865,8 @@ The name of the application

-

-The version of the application. -

+ +

The version of the application.

@@ -916,9 +884,8 @@ The version of the application. — -

-The version of the application. -

+
+

The version of the application.

@@ -938,10 +905,9 @@ The version of the application.
# File 'lib/axlsx/doc_props/app.rb', line 77
 
-def AppVersion
-  @AppVersion
-end
-
+def AppVersion + @AppVersion +end @@ -959,9 +925,8 @@ The version of the application.

-

-The number of characters in the document. -

+ +

The number of characters in the document.

@@ -979,9 +944,8 @@ The number of characters in the document. — -

-The number of characters in the document. -

+
+

The number of characters in the document.

@@ -1001,10 +965,9 @@ The number of characters in the document.
# File 'lib/axlsx/doc_props/app.rb', line 29
 
-def Characters
-  @Characters
-end
-
+def Characters + @Characters +end @@ -1022,9 +985,8 @@ The number of characters in the document.

-

-The number of characters in the document including spaces. -

+ +

The number of characters in the document including spaces.

@@ -1042,9 +1004,8 @@ The number of characters in the document including spaces. — -

-The number of characters in the document including spaces. -

+
+

The number of characters in the document including spaces.

@@ -1064,10 +1025,9 @@ The number of characters in the document including spaces.
# File 'lib/axlsx/doc_props/app.rb', line 62
 
-def CharactersWithSpaces
-  @CharactersWithSpaces
-end
-
+def CharactersWithSpaces + @CharactersWithSpaces +end @@ -1085,9 +1045,8 @@ The number of characters in the document including spaces.

-

-The name of the company generating the document. -

+ +

The name of the company generating the document.

@@ -1105,9 +1064,8 @@ The name of the company generating the document. — -

-The name of the company generating the document. -

+
+

The name of the company generating the document.

@@ -1127,10 +1085,9 @@ The name of the company generating the document.
# File 'lib/axlsx/doc_props/app.rb', line 20
 
-def Company
-  @Company
-end
-
+def Company + @Company +end @@ -1148,9 +1105,8 @@ The name of the company generating the document.

-

-Document security -

+ +

Document security

@@ -1168,9 +1124,8 @@ Document security — -

-Document security -

+
+

Document security

@@ -1190,10 +1145,9 @@ Document security
# File 'lib/axlsx/doc_props/app.rb', line 80
 
-def DocSecurity
-  @DocSecurity
-end
-
+def DocSecurity + @DocSecurity +end @@ -1211,9 +1165,8 @@ Document security

-

-The number of hidden slides. -

+ +

The number of hidden slides.

@@ -1231,9 +1184,8 @@ The number of hidden slides. — -

-The number of hidden slides. -

+
+

The number of hidden slides.

@@ -1253,10 +1205,9 @@ The number of hidden slides.
# File 'lib/axlsx/doc_props/app.rb', line 50
 
-def HiddenSlides
-  @HiddenSlides
-end
-
+def HiddenSlides + @HiddenSlides +end @@ -1274,9 +1225,8 @@ The number of hidden slides.

-

-The base for hyper links in the document. -

+ +

The base for hyper links in the document.

@@ -1294,9 +1244,8 @@ The base for hyper links in the document. — -

-The base for hyper links in the document. -

+
+

The base for hyper links in the document.

@@ -1316,10 +1265,9 @@ The base for hyper links in the document.
# File 'lib/axlsx/doc_props/app.rb', line 68
 
-def HyperLinkBase
-  @HyperLinkBase
-end
-
+def HyperLinkBase + @HyperLinkBase +end @@ -1337,9 +1285,8 @@ The base for hyper links in the document.

-

-Indicates that the hyper links in the document have been changed. -

+ +

Indicates that the hyper links in the document have been changed.

@@ -1357,9 +1304,8 @@ Indicates that the hyper links in the document have been changed. — -

-Indicates that the hyper links in the document have been changed. -

+
+

Indicates that the hyper links in the document have been changed.

@@ -1379,10 +1325,9 @@ Indicates that the hyper links in the document have been changed.
# File 'lib/axlsx/doc_props/app.rb', line 71
 
-def HyperlinksChanged
-  @HyperlinksChanged
-end
-
+def HyperlinksChanged + @HyperlinksChanged +end @@ -1400,9 +1345,8 @@ Indicates that the hyper links in the document have been changed.

-

-The number of lines in the document. -

+ +

The number of lines in the document.

@@ -1420,9 +1364,8 @@ The number of lines in the document. — -

-The number of lines in the document. -

+
+

The number of lines in the document.

@@ -1442,10 +1385,9 @@ The number of lines in the document.
# File 'lib/axlsx/doc_props/app.rb', line 35
 
-def Lines
-  @Lines
-end
-
+def Lines + @Lines +end @@ -1463,9 +1405,8 @@ The number of lines in the document.

-

-The links in the document are up to date. -

+ +

The links in the document are up to date.

@@ -1483,9 +1424,8 @@ The links in the document are up to date. — -

-The links in the document are up to date. -

+
+

The links in the document are up to date.

@@ -1505,10 +1445,9 @@ The links in the document are up to date.
# File 'lib/axlsx/doc_props/app.rb', line 59
 
-def LinksUpToDate
-  @LinksUpToDate
-end
-
+def LinksUpToDate + @LinksUpToDate +end @@ -1526,9 +1465,8 @@ The links in the document are up to date.

-

-The name of the manager for the document. -

+ +

The name of the manager for the document.

@@ -1546,9 +1484,8 @@ The name of the manager for the document. — -

-The name of the manager for the document. -

+
+

The name of the manager for the document.

@@ -1568,10 +1505,9 @@ The name of the manager for the document.
# File 'lib/axlsx/doc_props/app.rb', line 17
 
-def Manager
-  @Manager
-end
-
+def Manager + @Manager +end @@ -1589,9 +1525,8 @@ The name of the manager for the document.

-

-The total number multimedia clips -

+ +

The total number multimedia clips

@@ -1609,9 +1544,8 @@ The total number multimedia clips — -

-The total number multimedia clips -

+
+

The total number multimedia clips

@@ -1631,10 +1565,9 @@ The total number multimedia clips
# File 'lib/axlsx/doc_props/app.rb', line 53
 
-def MMClips
-  @MMClips
-end
-
+def MMClips + @MMClips +end @@ -1652,9 +1585,8 @@ The total number multimedia clips

-

-The number of slides that have notes. -

+ +

The number of slides that have notes.

@@ -1672,9 +1604,8 @@ The number of slides that have notes. — -

-The number of slides that have notes. -

+
+

The number of slides that have notes.

@@ -1694,10 +1625,9 @@ The number of slides that have notes.
# File 'lib/axlsx/doc_props/app.rb', line 44
 
-def Notes
-  @Notes
-end
-
+def Notes + @Notes +end @@ -1715,9 +1645,8 @@ The number of slides that have notes.

-

-The number of pages in the document. -

+ +

The number of pages in the document.

@@ -1735,9 +1664,8 @@ The number of pages in the document. — -

-The number of pages in the document. -

+
+

The number of pages in the document.

@@ -1757,10 +1685,9 @@ The number of pages in the document.
# File 'lib/axlsx/doc_props/app.rb', line 23
 
-def Pages
-  @Pages
-end
-
+def Pages + @Pages +end @@ -1778,9 +1705,8 @@ The number of pages in the document.

-

-The number of paragraphs in the document -

+ +

The number of paragraphs in the document

@@ -1798,9 +1724,8 @@ The number of paragraphs in the document — -

-The number of paragraphs in the document -

+
+

The number of paragraphs in the document

@@ -1820,10 +1745,9 @@ The number of paragraphs in the document
# File 'lib/axlsx/doc_props/app.rb', line 38
 
-def Paragraphs
-  @Paragraphs
-end
-
+def Paragraphs + @Paragraphs +end @@ -1841,9 +1765,8 @@ The number of paragraphs in the document

-

-The intended format of the presentation. -

+ +

The intended format of the presentation.

@@ -1861,9 +1784,8 @@ The intended format of the presentation. — -

-The intended format of the presentation. -

+
+

The intended format of the presentation.

@@ -1883,10 +1805,9 @@ The intended format of the presentation.
# File 'lib/axlsx/doc_props/app.rb', line 32
 
-def PresentationFormat
-  @PresentationFormat
-end
-
+def PresentationFormat + @PresentationFormat +end @@ -1904,9 +1825,8 @@ The intended format of the presentation.

-

-The display mode for the document thumbnail. -

+ +

The display mode for the document thumbnail.

@@ -1924,9 +1844,8 @@ The display mode for the document thumbnail. — -

-The display mode for the document thumbnail. -

+
+

The display mode for the document thumbnail.

@@ -1946,10 +1865,9 @@ The display mode for the document thumbnail.
# File 'lib/axlsx/doc_props/app.rb', line 56
 
-def ScaleCrop
-  @ScaleCrop
-end
-
+def ScaleCrop + @ScaleCrop +end @@ -1967,9 +1885,8 @@ The display mode for the document thumbnail.

-

-Indicates if the document is shared. -

+ +

Indicates if the document is shared.

@@ -1987,9 +1904,8 @@ Indicates if the document is shared. — -

-Indicates if the document is shared. -

+
+

Indicates if the document is shared.

@@ -2009,10 +1925,9 @@ Indicates if the document is shared.
# File 'lib/axlsx/doc_props/app.rb', line 65
 
-def ShareDoc
-  @ShareDoc
-end
-
+def ShareDoc + @ShareDoc +end @@ -2030,9 +1945,8 @@ Indicates if the document is shared.

-

-The number of slides in the document. -

+ +

The number of slides in the document.

@@ -2050,9 +1964,8 @@ The number of slides in the document. — -

-The number of slides in the document. -

+
+

The number of slides in the document.

@@ -2072,10 +1985,9 @@ The number of slides in the document.
# File 'lib/axlsx/doc_props/app.rb', line 41
 
-def Slides
-  @Slides
-end
-
+def Slides + @Slides +end @@ -2093,9 +2005,8 @@ The number of slides in the document.

-

-The name of the document template. -

+ +

The name of the document template.

@@ -2113,9 +2024,8 @@ The name of the document template. — -

-The name of the document template. -

+
+

The name of the document template.

@@ -2135,10 +2045,9 @@ The name of the document template.
# File 'lib/axlsx/doc_props/app.rb', line 14
 
-def Template
-  @Template
-end
-
+def Template + @Template +end @@ -2156,9 +2065,8 @@ The name of the document template.

-

-The total amount of time spent editing. -

+ +

The total amount of time spent editing.

@@ -2176,9 +2084,8 @@ The total amount of time spent editing. — -

-The total amount of time spent editing. -

+
+

The total amount of time spent editing.

@@ -2198,10 +2105,9 @@ The total amount of time spent editing.
# File 'lib/axlsx/doc_props/app.rb', line 47
 
-def TotalTime
-  @TotalTime
-end
-
+def TotalTime + @TotalTime +end @@ -2219,9 +2125,8 @@ The total amount of time spent editing.

-

-The number of words in the document. -

+ +

The number of words in the document.

@@ -2239,9 +2144,8 @@ The number of words in the document. — -

-The number of words in the document. -

+
+

The number of words in the document.

@@ -2261,10 +2165,9 @@ The number of words in the document.
# File 'lib/axlsx/doc_props/app.rb', line 26
 
-def Words
-  @Words
-end
-
+def Words + @Words +end @@ -2286,9 +2189,8 @@ The number of words in the document.

-

-Creates an App object -

+ +

Creates an App object

@@ -2309,9 +2211,8 @@ Creates an App object — -

-a customizable set of options -

+
+

a customizable set of options

@@ -2541,12 +2442,11 @@ a customizable set of options
# File 'lib/axlsx/doc_props/app.rb', line 105
 
-def initalize(options={})
-  options.each do |o|
-    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
-  end
-end
-
+def initalize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -2561,9 +2461,8 @@ a customizable set of options

-

-Generate an app.xml document -

+ +

Generate an app.xml document

@@ -2581,9 +2480,8 @@ Generate an app.xml document — -

-The document as a string -

+
+

The document as a string

@@ -2610,17 +2508,16 @@ The document as a string
# File 'lib/axlsx/doc_props/app.rb', line 167
 
-def to_xml()
-  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
-    xml.send(:Properties, :xmlns => APP_NS, :'xmlns:vt' => APP_NS_VT) {
-      self.instance_values.each do |name, value|
-        xml.send("ap:#{name}", value)
-      end
-    }
-  end      
-  builder.to_xml
-end
-
+def to_xml() + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.send(:Properties, :xmlns => APP_NS, :xmlns:vt' => APP_NS_VT) { + self.instance_values.each do |name, value| + xml.send("ap:#{name}", value) + end + } + end + builder.to_xml +end @@ -2631,9 +2528,9 @@ The document as a string
diff --git a/doc/Axlsx/Ar.html b/doc/Axlsx/Ar.html index 958064a3..6cd2e108 100644 --- a/doc/Axlsx/Ar.html +++ b/doc/Axlsx/Ar.html @@ -79,9 +79,8 @@

Overview

-

-Mixing module for adding acts_as_axlsx to active record base -

+ +

Mixing module for adding acts_as_axlsx to active record base

@@ -128,9 +127,8 @@ Mixing module for adding acts_as_axlsx to active record base -

-Extents active record with this ojbects class method acts_as_axlsx. -

+
+

Extents active record with this ojbects class method acts_as_axlsx.

@@ -154,9 +152,8 @@ Extents active record with this ojbects class method acts_as_axlsx.

-

-Extents active record with this ojbects class method acts_as_axlsx -

+ +

Extents active record with this ojbects class method acts_as_axlsx

@@ -177,10 +174,9 @@ Extents active record with this ojbects class method acts_as_axlsx
# File 'lib/axlsx/ar.rb', line 8
 
-def self.included(base)
-  base.send :extend, ClassMethods
-end
-
+def self.included(base) + base.send :extend, ClassMethods +end @@ -191,9 +187,9 @@ Extents active record with this ojbects class method acts_as_axlsx
diff --git a/doc/Axlsx/Ar/ClassMethods.html b/doc/Axlsx/Ar/ClassMethods.html index 8a98b4a4..3389b948 100644 --- a/doc/Axlsx/Ar/ClassMethods.html +++ b/doc/Axlsx/Ar/ClassMethods.html @@ -79,9 +79,8 @@

Overview

-

-Class methods for the mixin -

+ +

Class methods for the mixin

@@ -118,9 +117,8 @@ Class methods for the mixin -

-adds in the instance and singleton methods. -

+
+

adds in the instance and singleton methods.

@@ -144,9 +142,8 @@ adds in the instance and singleton methods.

-

-adds in the instance and singleton methods -

+ +

adds in the instance and singleton methods

@@ -168,11 +165,10 @@ adds in the instance and singleton methods
# File 'lib/axlsx/ar.rb', line 16
 
-def acts_as_axlsx(options={})        
-  include Axlsx::Ar::InstanceMethods        
-  extend Axlsx::Ar::SingletonMethods
-end
-
+def acts_as_axlsx(options={}) + include Axlsx::Ar::InstanceMethods + extend Axlsx::Ar::SingletonMethods +end @@ -183,9 +179,9 @@ adds in the instance and singleton methods
diff --git a/doc/Axlsx/Ar/InstanceMethods.html b/doc/Axlsx/Ar/InstanceMethods.html index ccff0449..17a41790 100644 --- a/doc/Axlsx/Ar/InstanceMethods.html +++ b/doc/Axlsx/Ar/InstanceMethods.html @@ -79,10 +79,9 @@

Overview

-

-Empty module - I really like ruports way of allowing :include, :only, -:exclude and am looking to add something like that in later -

+ +

Empty module - I really like ruports way of allowing :include, :only, +:exclude and am looking to add something like that in the next release

@@ -100,9 +99,9 @@ Empty module - I really like ruports way of allowing :include, :only,
diff --git a/doc/Axlsx/Ar/SingletonMethods.html b/doc/Axlsx/Ar/SingletonMethods.html index f1081b17..f3752b7b 100644 --- a/doc/Axlsx/Ar/SingletonMethods.html +++ b/doc/Axlsx/Ar/SingletonMethods.html @@ -79,9 +79,8 @@

Overview

-

-Singleton methods for the mixin -

+ +

Singleton methods for the mixin

@@ -118,9 +117,8 @@ Singleton methods for the mixin -

-Maps the AR class to an Axlsx package options are passed into AR find. -

+
+

Maps the AR class to an Axlsx package options are passed into AR find.

@@ -144,9 +142,8 @@ Maps the AR class to an Axlsx package options are passed into AR find.

-

-Maps the AR class to an Axlsx package options are passed into AR find -

+ +

Maps the AR class to an Axlsx package options are passed into AR find

@@ -155,6 +152,22 @@ Maps the AR class to an Axlsx package options are passed into AR find

Parameters:

    +
  • + + Symbol, + + + (Symbol, :all, etc.) + + + + — +
    +

    :all, etc.

    +
    + +
  • +
  • options @@ -167,9 +180,8 @@ Maps the AR class to an Axlsx package options are passed into AR find — -

    -a customizable set of options -

    +
    +

    a customizable set of options

  • @@ -190,9 +202,8 @@ a customizable set of options - —

    -to apply to the first row of field names -

    + —
    +

    to apply to the first row of field names

    @@ -202,10 +213,9 @@ to apply to the first row of field names - —

    -array of Axlsx types for each cell in data rows or a single type that will -be applied to all types. -

    + —
    +

    array of Axlsx types for each cell in data rows or a single type that will +be applied to all types.

    @@ -215,9 +225,8 @@ be applied to all types. - —

    -The style to pass to Worksheet#add_row -

    + —
    +

    The style to pass to Worksheet#add_row

    @@ -238,7 +247,6 @@ The style to pass to Worksheet#add_row
     
     
    -31
     32
     33
     34
    @@ -258,33 +266,33 @@ The style to pass to Worksheet#add_row
     48
     49
     50
    -51
    +51 +52 -
    # File 'lib/axlsx/ar.rb', line 31
    -
    -def to_xlsx(number = :all, options = {})
    -  row_style = options.delete(:style)
    -  header_style = options.delete(:header_style) || row_style
    -  types = options.delete(:types)
    -
    -  data = [*find(number, options)]
    -  data.compact!
    -  data.flatten!
    -  columns = data.first.attributes.keys
    -  p = Package.new
    -  row_style = p.workbook.styles.add_style(row_style) unless row_style.nil?
    -  header_style = p.workbook.styles.add_style(header_style) unless header_style.nil?
    -  
    -  p.workbook.add_worksheet(:name=>table_name.humanize) do |sheet|
    -    sheet.add_row columns, :style=>header_style
    -    data.each do |r|
    -      sheet.add_row r.attributes.values, :style=>row_style, :types=>types
    -    end
    -  end
    -  p
    -end
    -
    +
    # File 'lib/axlsx/ar.rb', line 32
    +
    +def to_xlsx(number = :all, options = {})
    +  row_style = options.delete(:style)
    +  header_style = options.delete(:header_style) || row_style
    +  types = options.delete(:types)
    +
    +  data = [*find(number, options)]
    +  data.compact!
    +  data.flatten!
    +  columns = data.first.attributes.keys
    +  p = Package.new
    +  row_style = p.workbook.styles.add_style(row_style) unless row_style.nil?
    +  header_style = p.workbook.styles.add_style(header_style) unless header_style.nil?
    +  
    +  p.workbook.add_worksheet(:name=>table_name.humanize) do |sheet|
    +    sheet.add_row columns, :style=>header_style
    +    data.each do |r|
    +      sheet.add_row r.attributes.values, :style=>row_style, :types=>types
    +    end
    +  end
    +  p
    +end
    @@ -295,9 +303,9 @@ The style to pass to Worksheet#add_row
    diff --git a/doc/Axlsx/Axis.html b/doc/Axlsx/Axis.html index 5588a0b4..460bcb51 100644 --- a/doc/Axlsx/Axis.html +++ b/doc/Axlsx/Axis.html @@ -94,9 +94,8 @@

    Overview

    -

    -the access class defines common properties and values for a chart axis. -

    + +

    the access class defines common properties and values for a chart axis.

    @@ -132,9 +131,8 @@ the access class defines common properties and values for a chart axis. -

    -the id of the axis. -

    +
    +

    the id of the axis.

    @@ -159,9 +157,8 @@ the id of the axis. -

    -The position of the axis must be one of [:l, :r, :t, :b]. -

    +
    +

    The position of the axis must be one of [:l, :r, :t, :b].

    @@ -186,9 +183,8 @@ The position of the axis must be one of [:l, :r, :t, :b]. -

    -The perpendicular axis. -

    +
    +

    The perpendicular axis.

    @@ -213,10 +209,9 @@ The perpendicular axis. -

    -specifies how the perpendicular axis is crossed must be one of [:autoZero, -:min, :max]. -

    +
    +

    specifies how the perpendicular axis is crossed must be one of [:autoZero, +:min, :max].

    @@ -241,9 +236,8 @@ specifies how the perpendicular axis is crossed must be one of [:autoZero, -

    -The number format format code for this axis default :General. -

    +
    +

    The number format format code for this axis default :General.

    @@ -268,9 +262,8 @@ The number format format code for this axis default :General. -

    -The scaling of the axis. -

    +
    +

    The scaling of the axis.

    @@ -295,9 +288,8 @@ The scaling of the axis. -

    -the position of the tick labels must be one of [:nextTo, :high, :low]. -

    +
    +

    the position of the tick labels must be one of [:nextTo, :high, :low].

    @@ -334,9 +326,8 @@ the position of the tick labels must be one of [:nextTo, :high, :low]. -

    -Creates an Axis object. -

    +
    +

    Creates an Axis object.

    @@ -358,9 +349,8 @@ Creates an Axis object. -

    -Serializes the common axis. -

    +
    +

    Serializes the common axis.

    @@ -381,9 +371,8 @@ Serializes the common axis.

    -

    -Creates an Axis object -

    + +

    Creates an Axis object

    @@ -402,9 +391,8 @@ Creates an Axis object — -

    -the id of this axis -

    +
    +

    the id of this axis

    @@ -419,9 +407,8 @@ the id of this axis — -

    -the id of the perpendicular axis -

    +
    +

    the id of the perpendicular axis

    @@ -438,9 +425,8 @@ the id of the perpendicular axis — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -498,9 +484,8 @@ a customizable set of options — -

    -If axId or crossAx are not unsigned integers -

    +
    +

    If axId or crossAx are not unsigned integers

    @@ -532,22 +517,21 @@ If axId or crossAx are not unsigned integers
    # File 'lib/axlsx/drawing/axis.rb', line 45
     
    -def initialize(axId, crossAx, options={})
    -  Axlsx::validate_unsigned_int(axId)
    -  Axlsx::validate_unsigned_int(crossAx)
    -  @axId = axId
    -  @crossAx = crossAx
    -  @format_code = "General"
    -  @scaling = Scaling.new(:orientation=>:minMax)
    -  self.axPos = :l
    -  self.tickLblPos = :nextTo
    -  self.format_code = "General"
    -  self.crosses = :autoZero
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(axId, crossAx, options={}) + Axlsx::validate_unsigned_int(axId) + Axlsx::validate_unsigned_int(crossAx) + @axId = axId + @crossAx = crossAx + @format_code = "General" + @scaling = Scaling.new(:orientation=>:minMax) + self.axPos = :l + self.tickLblPos = :nextTo + self.format_code = "General" + self.crosses = :autoZero + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -570,9 +554,8 @@ If axId or crossAx are not unsigned integers

    -

    -the id of the axis. -

    + +

    the id of the axis.

    @@ -606,10 +589,9 @@ the id of the axis.
    # File 'lib/axlsx/drawing/axis.rb', line 7
     
    -def axId
    -  @axId
    -end
    -
    +def axId + @axId +end @@ -627,9 +609,8 @@ the id of the axis.

    -

    -The position of the axis must be one of [:l, :r, :t, :b] -

    + +

    The position of the axis must be one of [:l, :r, :t, :b]

    @@ -663,10 +644,9 @@ The position of the axis must be one of [:l, :r, :t, :b]
    # File 'lib/axlsx/drawing/axis.rb', line 21
     
    -def axPos
    -  @axPos
    -end
    -
    +def axPos + @axPos +end @@ -684,9 +664,8 @@ The position of the axis must be one of [:l, :r, :t, :b]

    -

    -The perpendicular axis -

    + +

    The perpendicular axis

    @@ -720,10 +699,9 @@ The perpendicular axis
    # File 'lib/axlsx/drawing/axis.rb', line 11
     
    -def crossAx
    -  @crossAx
    -end
    -
    +def crossAx + @crossAx +end @@ -741,10 +719,9 @@ The perpendicular axis

    -

    -specifies how the perpendicular axis is crossed must be one of [:autoZero, -:min, :max] -

    + +

    specifies how the perpendicular axis is crossed must be one of [:autoZero, +:min, :max]

    @@ -778,10 +755,9 @@ specifies how the perpendicular axis is crossed must be one of [:autoZero,
    # File 'lib/axlsx/drawing/axis.rb', line 36
     
    -def crosses
    -  @crosses
    -end
    -
    +def crosses + @crosses +end @@ -799,9 +775,8 @@ specifies how the perpendicular axis is crossed must be one of [:autoZero,

    -

    -The number format format code for this axis default :General -

    + +

    The number format format code for this axis default :General

    @@ -835,10 +810,9 @@ The number format format code for this axis default :General
    # File 'lib/axlsx/drawing/axis.rb', line 31
     
    -def format_code
    -  @format_code
    -end
    -
    +def format_code + @format_code +end @@ -856,9 +830,8 @@ The number format format code for this axis default :General

    -

    -The scaling of the axis -

    + +

    The scaling of the axis

    @@ -899,10 +872,9 @@ The scaling of the axis
    # File 'lib/axlsx/drawing/axis.rb', line 16
     
    -def scaling
    -  @scaling
    -end
    -
    +def scaling + @scaling +end @@ -920,9 +892,8 @@ The scaling of the axis

    -

    -the position of the tick labels must be one of [:nextTo, :high, :low] -

    + +

    the position of the tick labels must be one of [:nextTo, :high, :low]

    @@ -956,10 +927,9 @@ the position of the tick labels must be one of [:nextTo, :high, :low]
    # File 'lib/axlsx/drawing/axis.rb', line 26
     
    -def tickLblPos
    -  @tickLblPos
    -end
    -
    +def tickLblPos + @tickLblPos +end @@ -981,9 +951,8 @@ the position of the tick labels must be one of [:nextTo, :high, :low]

    -

    -Serializes the common axis -

    + +

    Serializes the common axis

    @@ -1002,9 +971,8 @@ Serializes the common axis — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1045,17 +1013,16 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/axis.rb', line 79
     
    -def to_xml(xml)
    -  xml.send('c:axId', :val=>@axId)
    -  @scaling.to_xml(xml)
    -  xml.send('c:axPos', :val=>@axPos)
    -  xml.send('c:majorGridlines')
    -  xml.send('c:numFmt', :formatCode => @format_code, :sourceLinked=>"1")
    -  xml.send('c:tickLblPos', :val=>@tickLblPos)
    -  xml.send('c:crossAx', :val=>@crossAx)
    -  xml.send('c:crosses', :val=>@crosses)
    -end
    -
    +def to_xml(xml) + xml.send('c:axId', :val=>@axId) + @scaling.to_xml(xml) + xml.send('c:axPos', :val=>@axPos) + xml.send('c:majorGridlines') + xml.send('c:numFmt', :formatCode => @format_code, :sourceLinked=>"1") + xml.send('c:tickLblPos', :val=>@tickLblPos) + xml.send('c:crossAx', :val=>@crossAx) + xml.send('c:crosses', :val=>@crosses) +end @@ -1066,9 +1033,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Bar3DChart.html b/doc/Axlsx/Bar3DChart.html index da81e4d9..a1b1487e 100644 --- a/doc/Axlsx/Bar3DChart.html +++ b/doc/Axlsx/Bar3DChart.html @@ -96,10 +96,9 @@

    Overview

    -

    -The Bar3DChart is a three dimentional barchart (who would have guessed?) -that you can add to your worksheet. -

    + +

    The Bar3DChart is a three dimentional barchart (who would have guessed?) +that you can add to your worksheet.

    @@ -128,9 +127,8 @@ that you can add to your worksheet.
    GAP_AMOUNT_PERCENT =
    -

    -validation regex for gap amount percent -

    + +

    validation regex for gap amount percent

    @@ -140,8 +138,7 @@ validation regex for gap amount percent
    -
    /0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
    -
    +
    /0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
    @@ -173,9 +170,8 @@ validation regex for gap amount percent -

    -The direction of the bars in the chart must be one of [:bar, :col]. -

    +
    +

    The direction of the bars in the chart must be one of [:bar, :col].

    @@ -200,9 +196,8 @@ The direction of the bars in the chart must be one of [:bar, :col]. -

    -the category axis. -

    +
    +

    the category axis.

    @@ -227,10 +222,9 @@ the category axis. -

    -space between bar or column clusters, as a percentage of the bar or column -width. -

    +
    +

    space between bar or column clusters, as a percentage of the bar or column +width.

    @@ -255,10 +249,9 @@ width. -

    -space between bar or column clusters, as a percentage of the bar or column -width. -

    +
    +

    space between bar or column clusters, as a percentage of the bar or column +width.

    @@ -283,9 +276,8 @@ width. -

    -grouping for a column, line, or area chart. -

    +
    +

    grouping for a column, line, or area chart.

    @@ -310,10 +302,9 @@ grouping for a column, line, or area chart. -

    -The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, -:cylinder, :pyramid, :pyramidToMax]. -

    +
    +

    The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, +:cylinder, :pyramid, :pyramidToMax].

    @@ -338,9 +329,8 @@ The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, -

    -the valueaxis. -

    +
    +

    the valueaxis.

    @@ -385,9 +375,8 @@ the valueaxis. -

    -Creates a new bar chart object. -

    +
    +

    Creates a new bar chart object.

    @@ -409,9 +398,8 @@ Creates a new bar chart object. -

    -Serializes the bar chart. -

    +
    +

    Serializes the bar chart.

    @@ -442,9 +430,8 @@ Serializes the bar chart.

    -

    -Creates a new bar chart object -

    + +

    Creates a new bar chart object

    @@ -463,9 +450,8 @@ Creates a new bar chart object — -

    -The workbook that owns this chart. -

    +
    +

    The workbook that owns this chart.

    @@ -482,9 +468,8 @@ The workbook that owns this chart. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -651,19 +636,18 @@ a customizable set of options
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 61
     
    -def initialize(frame, options={})
    -  @barDir = :bar
    -  @grouping = :clustered
    -  @gapWidth, @gapDepth, @shape = nil, nil, nil
    -  @catAxId = rand(8 ** 8)
    -  @valAxId = rand(8 ** 8)
    -  @catAxis = CatAxis.new(@catAxId, @valAxId)
    -  @valAxis = ValAxis.new(@valAxId, @catAxId)
    -  super(frame, options)      
    -  @series_type = BarSeries
    -  @view3D = View3D.new({:rAngAx=>1}.merge(options))
    -end
    -
    +def initialize(frame, options={}) + @barDir = :bar + @grouping = :clustered + @gapWidth, @gapDepth, @shape = nil, nil, nil + @catAxId = rand(8 ** 8) + @valAxId = rand(8 ** 8) + @catAxis = CatAxis.new(@catAxId, @valAxId) + @valAxis = ValAxis.new(@valAxId, @catAxId) + super(frame, options) + @series_type = BarSeries + @view3D = View3D.new({:rAngAx=>1}.merge(options)) +end @@ -686,9 +670,8 @@ a customizable set of options

    -

    -The direction of the bars in the chart must be one of [:bar, :col] -

    + +

    The direction of the bars in the chart must be one of [:bar, :col]

    @@ -722,10 +705,9 @@ The direction of the bars in the chart must be one of [:bar, :col]
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 21
     
    -def barDir
    -  @barDir
    -end
    -
    +def barDir + @barDir +end @@ -743,9 +725,8 @@ The direction of the bars in the chart must be one of [:bar, :col]

    -

    -the category axis -

    + +

    the category axis

    @@ -779,10 +760,9 @@ the category axis
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 12
     
    -def catAxis
    -  @catAxis
    -end
    -
    +def catAxis + @catAxis +end @@ -800,10 +780,9 @@ the category axis

    -

    -space between bar or column clusters, as a percentage of the bar or column -width. -

    + +

    space between bar or column clusters, as a percentage of the bar or column +width.

    @@ -837,10 +816,9 @@ width.
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 25
     
    -def gapDepth
    -  @gapDepth
    -end
    -
    +def gapDepth + @gapDepth +end @@ -858,10 +836,9 @@ width.

    -

    -space between bar or column clusters, as a percentage of the bar or column -width. -

    + +

    space between bar or column clusters, as a percentage of the bar or column +width.

    @@ -895,10 +872,9 @@ width.
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 29
     
    -def gapWidth
    -  @gapWidth
    -end
    -
    +def gapWidth + @gapWidth +end @@ -916,10 +892,9 @@ width.

    -

    -grouping for a column, line, or area chart. must be one of -[:percentStacked, :clustered, :standard, :stacked] -

    + +

    grouping for a column, line, or area chart. must be one of +[:percentStacked, :clustered, :standard, :stacked]

    @@ -953,10 +928,9 @@ grouping for a column, line, or area chart. must be one of
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 34
     
    -def grouping
    -  @grouping
    -end
    -
    +def grouping + @grouping +end @@ -974,10 +948,9 @@ grouping for a column, line, or area chart. must be one of

    -

    -The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, -:cylinder, :pyramid, :pyramidToMax] -

    + +

    The shabe of the bars or columns must be one of [:cone, :coneToMax, :box, +:cylinder, :pyramid, :pyramidToMax]

    @@ -1011,10 +984,9 @@ The shabe of the bars or columns must be one of [:cone, :coneToMax, :box,
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 39
     
    -def shape
    -  @shape
    -end
    -
    +def shape + @shape +end @@ -1032,9 +1004,8 @@ The shabe of the bars or columns must be one of [:cone, :coneToMax, :box,

    -

    -the valueaxis -

    + +

    the valueaxis

    @@ -1068,10 +1039,9 @@ the valueaxis
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 16
     
    -def valAxis
    -  @valAxis
    -end
    -
    +def valAxis + @valAxis +end @@ -1093,9 +1063,8 @@ the valueaxis

    -

    -Serializes the bar chart -

    + +

    Serializes the bar chart

    @@ -1144,25 +1113,24 @@ Serializes the bar chart
    # File 'lib/axlsx/drawing/bar_3D_chart.rb', line 109
     
    -def to_xml
    -  super() do |xml|
    -    xml.send('c:bar3DChart') {
    -      xml.send('c:barDir', :val => barDir)
    -      xml.send('c:grouping', :val=>grouping)
    -      xml.send('c:varyColors', :val=>1)
    -      @series.each { |ser| ser.to_xml(xml) }
    -      xml.send('c:gapWidth', :val=>@gapWidth) unless @gapWidth.nil?
    -      xml.send('c:gapDepth', :val=>@gapDepth) unless @gapDepth.nil?
    -      xml.send('c:shape', :val=>@shape) unless @shape.nil?
    -      xml.send('c:axId', :val=>@catAxId)
    -      xml.send('c:axId', :val=>@valAxId)
    -      xml.send('c:axId', :val=>0)
    -    }
    -    @catAxis.to_xml(xml)
    -    @valAxis.to_xml(xml)        
    -  end
    -end
    -
    +def to_xml + super() do |xml| + xml.send('c:bar3DChart') { + xml.send('c:barDir', :val => barDir) + xml.send('c:grouping', :val=>grouping) + xml.send('c:varyColors', :val=>1) + @series.each { |ser| ser.to_xml(xml) } + xml.send('c:gapWidth', :val=>@gapWidth) unless @gapWidth.nil? + xml.send('c:gapDepth', :val=>@gapDepth) unless @gapDepth.nil? + xml.send('c:shape', :val=>@shape) unless @shape.nil? + xml.send('c:axId', :val=>@catAxId) + xml.send('c:axId', :val=>@valAxId) + xml.send('c:axId', :val=>0) + } + @catAxis.to_xml(xml) + @valAxis.to_xml(xml) + end +end @@ -1173,9 +1141,9 @@ Serializes the bar chart
    diff --git a/doc/Axlsx/BarSeries.html b/doc/Axlsx/BarSeries.html index ac711ddc..fb16bba7 100644 --- a/doc/Axlsx/BarSeries.html +++ b/doc/Axlsx/BarSeries.html @@ -99,15 +99,13 @@
    Note: -

    -The recommended way to manage series is to use Chart#add_series -

    +
    +

    The recommended way to manage series is to use Chart#add_series

    -

    -A BarSeries defines the title, data and labels for bar charts -

    + +

    A BarSeries defines the title, data and labels for bar charts

    @@ -152,9 +150,8 @@ A BarSeries defines the title, data and labels for bar charts -

    -The data for this series. -

    +
    +

    The data for this series.

    @@ -179,9 +176,8 @@ The data for this series. -

    -The labels for this series. -

    +
    +

    The labels for this series.

    @@ -206,10 +202,9 @@ The labels for this series. -

    -The shabe of the bars or columns must be one of [:percentStacked, -:clustered, :standard, :stacked]. -

    +
    +

    The shabe of the bars or columns must be one of [:percentStacked, +:clustered, :standard, :stacked].

    @@ -254,9 +249,8 @@ The shabe of the bars or columns must be one of [:percentStacked, -

    -Creates a new series. -

    +
    +

    Creates a new series.

    @@ -278,9 +272,8 @@ Creates a new series. -

    -Serializes the series. -

    +
    +

    Serializes the series.

    @@ -311,9 +304,8 @@ Serializes the series.

    -

    -Creates a new series -

    + +

    Creates a new series

    @@ -345,9 +337,8 @@ Creates a new series — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -418,13 +409,12 @@ a customizable set of options
    # File 'lib/axlsx/drawing/bar_series.rb', line 28
     
    -def initialize(chart, options={})
    -  @shape = :box
    -  super(chart, options)
    -  self.labels = CatAxisData.new(options[:labels]) unless options[:labels].nil?
    -  self.data = ValAxisData.new(options[:data]) unless options[:data].nil?
    -end
    -
    +def initialize(chart, options={}) + @shape = :box + super(chart, options) + self.labels = CatAxisData.new(options[:labels]) unless options[:labels].nil? + self.data = ValAxisData.new(options[:data]) unless options[:data].nil? +end @@ -447,9 +437,8 @@ a customizable set of options

    -

    -The data for this series. -

    + +

    The data for this series.

    @@ -483,10 +472,9 @@ The data for this series.
    # File 'lib/axlsx/drawing/bar_series.rb', line 11
     
    -def data
    -  @data
    -end
    -
    +def data + @data +end @@ -504,9 +492,8 @@ The data for this series.

    -

    -The labels for this series. -

    + +

    The labels for this series.

    @@ -540,10 +527,9 @@ The labels for this series.
    # File 'lib/axlsx/drawing/bar_series.rb', line 15
     
    -def labels
    -  @labels
    -end
    -
    +def labels + @labels +end @@ -561,10 +547,9 @@ The labels for this series.

    -

    -The shabe of the bars or columns must be one of [:percentStacked, -:clustered, :standard, :stacked] -

    + +

    The shabe of the bars or columns must be one of [:percentStacked, +:clustered, :standard, :stacked]

    @@ -598,10 +583,9 @@ The shabe of the bars or columns must be one of [:percentStacked,
    # File 'lib/axlsx/drawing/bar_series.rb', line 20
     
    -def shape
    -  @shape
    -end
    -
    +def shape + @shape +end @@ -623,9 +607,8 @@ The shabe of the bars or columns must be one of [:percentStacked,

    -

    -Serializes the series -

    + +

    Serializes the series

    @@ -644,9 +627,8 @@ Serializes the series — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -684,14 +666,13 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/bar_series.rb', line 45
     
    -def to_xml(xml)
    -  super(xml) do |xml_inner|
    -    @labels.to_xml(xml_inner) unless @labels.nil?
    -    @data.to_xml(xml_inner) unless @data.nil?
    -    xml_inner.send('c:shape', :val=>@shape)
    -  end      
    -end
    -
    +def to_xml(xml) + super(xml) do |xml_inner| + @labels.to_xml(xml_inner) unless @labels.nil? + @data.to_xml(xml_inner) unless @data.nil? + xml_inner.send('c:shape', :val=>@shape) + end +end @@ -702,9 +683,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Border.html b/doc/Axlsx/Border.html index b1becd25..da23f5f5 100644 --- a/doc/Axlsx/Border.html +++ b/doc/Axlsx/Border.html @@ -94,9 +94,8 @@

    Overview

    -

    -This class details a border used in Office Open XML spreadsheet styles. -

    + +

    This class details a border used in Office Open XML spreadsheet styles.

    @@ -128,11 +127,10 @@ This class details a border used in Office Open XML spreadsheet styles. -

    -The diagonal down property for the border that indicates if the border +

    +

    The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the -cell. -

    +cell.

    @@ -157,10 +155,9 @@ cell. -

    -The diagonal up property for the border that indicates if the border should -include a diagonal line from the bottom left to the top right of the cell. -

    +
    +

    The diagonal up property for the border that indicates if the border should +include a diagonal line from the bottom left to the top right of the cell.

    @@ -185,11 +182,10 @@ include a diagonal line from the bottom left to the top right of the cell. -

    -The outline property for the border indicating that top, left, right and +

    +

    The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of -cells. -

    +cells.

    @@ -214,9 +210,8 @@ cells. -

    -A list of BorderPr objects for this border. -

    +
    +

    A list of BorderPr objects for this border.

    @@ -253,9 +248,8 @@ A list of BorderPr objects for this border. -

    -Creates a new Border object. -

    +
    +

    Creates a new Border object.

    @@ -277,9 +271,8 @@ Creates a new Border object. -

    -Serializes the border element. -

    +
    +

    Serializes the border element.

    @@ -300,9 +293,8 @@ Serializes the border element.

    -

    -Creates a new Border object -

    + +

    Creates a new Border object

    @@ -312,20 +304,18 @@ Creates a new Border object

    Examples:

    -

    -Making a border -

    +

    +

    Making a border

    -
    p = Package.new
    -red_border = Border.new
    -[:left, :right, :top, :bottom].each do |item| 
    -  red_border.prs << BorderPr.new(:name=>item, :style=>:thin, :color=>Color.new(:rgb=>"FFFF0000"))     #   
    -end
    -# this sets red_border to be the index for the created border.
    -red_border = p.workbook.styles.@borders << red_border
    -#used in row creation as follows. This will add a red border to each of the cells in the row.
    -p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border
    -
    +
    p = Package.new
    +red_border = Border.new
    +[:left, :right, :top, :bottom].each do |item| 
    +  red_border.prs << BorderPr.new(:name=>item, :style=>:thin, :color=>Color.new(:rgb=>"FFFF0000"))     #   
    +end
    +# this sets red_border to be the index for the created border.
    +red_border = p.workbook.styles.@borders << red_border
    +#used in row creation as follows. This will add a red border to each of the cells in the row.
    +p.workbook.add_worksheet.rows << :values=>[1,2,3] :style=>red_border

    Parameters:

    @@ -343,9 +333,8 @@ Making a border — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -405,13 +394,12 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/border.rb', line 31
     
    -def initialize(options={})
    -  @prs = SimpleTypedList.new BorderPr
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + @prs = SimpleTypedList.new BorderPr + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -434,11 +422,10 @@ a customizable set of options

    -

    -The diagonal down property for the border that indicates if the border + +

    The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the -cell. -

    +cell.

    @@ -456,11 +443,10 @@ cell. — -

    -The diagonal down property for the border that indicates if the border +

    +

    The diagonal down property for the border that indicates if the border should include a diagonal line from the top left to the top right of the -cell. -

    +cell.

    @@ -480,10 +466,9 @@ cell.
    # File 'lib/axlsx/stylesheet/border.rb', line 9
     
    -def diagonalDown
    -  @diagonalDown
    -end
    -
    +def diagonalDown + @diagonalDown +end @@ -501,10 +486,9 @@ cell.

    -

    -The diagonal up property for the border that indicates if the border should -include a diagonal line from the bottom left to the top right of the cell. -

    + +

    The diagonal up property for the border that indicates if the border should +include a diagonal line from the bottom left to the top right of the cell.

    @@ -522,10 +506,9 @@ include a diagonal line from the bottom left to the top right of the cell. — -

    -The diagonal up property for the border that indicates if the border should -include a diagonal line from the bottom left to the top right of the cell. -

    +
    +

    The diagonal up property for the border that indicates if the border should +include a diagonal line from the bottom left to the top right of the cell.

    @@ -545,10 +528,9 @@ include a diagonal line from the bottom left to the top right of the cell.
    # File 'lib/axlsx/stylesheet/border.rb', line 6
     
    -def diagonalUp
    -  @diagonalUp
    -end
    -
    +def diagonalUp + @diagonalUp +end @@ -566,11 +548,10 @@ include a diagonal line from the bottom left to the top right of the cell.

    -

    -The outline property for the border indicating that top, left, right and + +

    The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of -cells. -

    +cells.

    @@ -588,11 +569,10 @@ cells. — -

    -The outline property for the border indicating that top, left, right and +

    +

    The outline property for the border indicating that top, left, right and bottom borders should only be applied to the outside border of a range of -cells. -

    +cells.

    @@ -612,10 +592,9 @@ cells.
    # File 'lib/axlsx/stylesheet/border.rb', line 12
     
    -def outline
    -  @outline
    -end
    -
    +def outline + @outline +end @@ -633,9 +612,8 @@ cells.

    -

    -A list of BorderPr objects for this border. -

    + +

    A list of BorderPr objects for this border.

    @@ -653,9 +631,8 @@ A list of BorderPr objects for this border. — -

    -A list of BorderPr objects for this border. -

    +
    +

    A list of BorderPr objects for this border.

    @@ -675,10 +652,9 @@ A list of BorderPr objects for this border.
    # File 'lib/axlsx/stylesheet/border.rb', line 15
     
    -def prs
    -  @prs
    -end
    -
    +def prs + @prs +end @@ -700,9 +676,8 @@ A list of BorderPr objects for this border.

    -

    -Serializes the border element -

    + +

    Serializes the border element

    @@ -721,9 +696,8 @@ Serializes the border element — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -750,16 +724,15 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/border.rb', line 47
     
    -def to_xml(xml)
    -  xml.border(self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }) {
    -    [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k|
    -      @prs.select { |pr| pr.name == k }.each do |part| 
    -        part.to_xml(xml) 
    -      end
    -    end
    -  }
    -end
    -
    +def to_xml(xml) + xml.border(self.instance_values.select{ |k,v| [:diagonalUp, :diagonalDown, :outline].include? k }) { + [:start, :end, :left, :right, :top, :bottom, :diagonal, :vertical, :horizontal].each do |k| + @prs.select { |pr| pr.name == k }.each do |part| + part.to_xml(xml) + end + end + } +end @@ -770,9 +743,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/BorderPr.html b/doc/Axlsx/BorderPr.html index 5e549bf0..058a03ca 100644 --- a/doc/Axlsx/BorderPr.html +++ b/doc/Axlsx/BorderPr.html @@ -94,9 +94,8 @@

    Overview

    -

    -A border part. -

    + +

    A border part.

    @@ -128,9 +127,8 @@ A border part. -

    -The color of this border part. -

    +
    +

    The color of this border part.

    @@ -155,9 +153,8 @@ The color of this border part. -

    -The name of this border part. -

    +
    +

    The name of this border part.

    @@ -182,9 +179,8 @@ The name of this border part. -

    -The syle of this border part. -

    +
    +

    The syle of this border part.

    @@ -221,9 +217,8 @@ The syle of this border part. -

    -Creates a new Border Part Object. -

    +
    +

    Creates a new Border Part Object.

    @@ -245,9 +240,8 @@ Creates a new Border Part Object. -

    -Serializes the border part. -

    +
    +

    Serializes the border part.

    @@ -268,9 +262,8 @@ Serializes the border part.

    -

    -Creates a new Border Part Object -

    + +

    Creates a new Border Part Object

    @@ -291,9 +284,8 @@ Creates a new Border Part Object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -359,12 +351,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/border_pr.rb', line 46
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -387,9 +378,8 @@ a customizable set of options

    -

    -The color of this border part. -

    + +

    The color of this border part.

    @@ -407,9 +397,8 @@ The color of this border part. — -

    -The color of this border part. -

    +
    +

    The color of this border part.

    @@ -429,10 +418,9 @@ The color of this border part.
    # File 'lib/axlsx/stylesheet/border_pr.rb', line 6
     
    -def color
    -  @color
    -end
    -
    +def color + @color +end @@ -453,26 +441,23 @@ The color of this border part.
    Note: -

    -The following are allowed -

    -
    - :start
    - :end
    - :left
    - :right
    - :top
    - :bottom
    - :diagonal
    - :vertical
    - :horizontal
    -
    +
    +

    The following are allowed

    + +
    :start
    +:end
    +:left
    +:right
    +:top
    +:bottom
    +:diagonal
    +:vertical
    +:horizontal
    -

    -The name of this border part -

    + +

    The name of this border part

    @@ -490,9 +475,8 @@ The name of this border part — -

    -The name of this border part -

    +
    +

    The name of this border part

    @@ -512,10 +496,9 @@ The name of this border part
    # File 'lib/axlsx/stylesheet/border_pr.rb', line 39
     
    -def name
    -  @name
    -end
    -
    +def name + @name +end @@ -536,31 +519,28 @@ The name of this border part
    Note: -

    -The following are allowed -

    -
    - :none
    - :thin
    - :medium
    - :dashed
    - :dotted
    - :thick
    - :double
    - :hair
    - :mediumDashed
    - :dashDot
    - :mediumDashDot
    - :dashDotDot
    - :mediumDashDotDot
    - :slantDashDot
    -
    +
    +

    The following are allowed

    + +
    :none 
    +:thin
    +:medium
    +:dashed
    +:dotted
    +:thick
    +:double
    +:hair 
    +:mediumDashed
    +:dashDot
    +:mediumDashDot
    +:dashDotDot
    +:mediumDashDotDot
    +:slantDashDot
    -

    -The syle of this border part. -

    + +

    The syle of this border part.

    @@ -578,9 +558,8 @@ The syle of this border part. — -

    -The syle of this border part. -

    +
    +

    The syle of this border part.

    @@ -600,10 +579,9 @@ The syle of this border part.
    # File 'lib/axlsx/stylesheet/border_pr.rb', line 25
     
    -def style
    -  @style
    -end
    -
    +def style + @style +end @@ -625,9 +603,8 @@ The syle of this border part.

    -

    -Serializes the border part -

    + +

    Serializes the border part

    @@ -646,9 +623,8 @@ Serializes the border part — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -684,12 +660,11 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/border_pr.rb', line 62
     
    -def to_xml(xml)
    -  xml.send(@name, :style => @style) {
    -    @color.to_xml(xml) if @color.is_a? Color
    -  } 
    -end
    -
    +def to_xml(xml) + xml.send(@name, :style => @style) { + @color.to_xml(xml) if @color.is_a? Color + } +end @@ -700,9 +675,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/CatAxis.html b/doc/Axlsx/CatAxis.html index 2795d665..f7fa02ab 100644 --- a/doc/Axlsx/CatAxis.html +++ b/doc/Axlsx/CatAxis.html @@ -96,9 +96,8 @@

    Overview

    -

    -A CatAxis object defines a chart category axis -

    + +

    A CatAxis object defines a chart category axis

    @@ -114,9 +113,8 @@ A CatAxis object defines a chart category axis
    LBL_OFFSET_REGEX =
    -

    -regex for validating label offset -

    + +

    regex for validating label offset

    @@ -126,8 +124,7 @@ regex for validating label offset
    -
    /0*(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|1000)%/
    -
    +
    /0*(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|1000)%/
    @@ -159,10 +156,9 @@ regex for validating label offset -

    -From the docs: This element specifies that this axis is a date or text axis -based on the data that is used for the axis labels, not a specific choice. -

    +
    +

    From the docs: This element specifies that this axis is a date or text axis +based on the data that is used for the axis labels, not a specific choice.

    @@ -187,10 +183,9 @@ based on the data that is used for the axis labels, not a specific choice. -

    -specifies how the perpendicular axis is crossed must be one of [:ctr, :l, -:r]. -

    +
    +

    specifies how the perpendicular axis is crossed must be one of [:ctr, :l, +:r].

    @@ -215,9 +210,8 @@ specifies how the perpendicular axis is crossed must be one of [:ctr, :l, -

    -The offset of the labels must be between a string between 0 and 1000. -

    +
    +

    The offset of the labels must be between a string between 0 and 1000.

    @@ -262,9 +256,8 @@ The offset of the labels must be between a string between 0 and 1000. -

    -Creates a new CatAxis object. -

    +
    +

    Creates a new CatAxis object.

    @@ -286,9 +279,8 @@ Creates a new CatAxis object. -

    -Serializes the category axis. -

    +
    +

    Serializes the category axis.

    @@ -314,9 +306,8 @@ Serializes the category axis.

    -

    -Creates a new CatAxis object -

    + +

    Creates a new CatAxis object

    @@ -335,9 +326,8 @@ Creates a new CatAxis object — -

    -the id of this axis. Inherited -

    +
    +

    the id of this axis. Inherited

    @@ -352,9 +342,8 @@ the id of this axis. Inherited — -

    -the id of the perpendicular axis. Inherited -

    +
    +

    the id of the perpendicular axis. Inherited

    @@ -371,9 +360,8 @@ the id of the perpendicular axis. Inherited — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -396,9 +384,8 @@ a customizable set of options - —

    -Inherited -

    + —
    +

    Inherited

    @@ -408,9 +395,8 @@ Inherited - —

    -Inherited -

    + —
    +

    Inherited

    @@ -420,9 +406,8 @@ Inherited - —

    -Inherited -

    + —
    +

    Inherited

    @@ -473,13 +458,12 @@ Inherited
    # File 'lib/axlsx/drawing/cat_axis.rb', line 31
     
    -def initialize(axId, crossAx, options={})
    -  self.auto = true
    -  self.lblAlgn = :ctr
    -  self.lblOffset = "100%"
    -  super(axId, crossAx, options)
    -end
    -
    +def initialize(axId, crossAx, options={}) + self.auto = true + self.lblAlgn = :ctr + self.lblOffset = "100%" + super(axId, crossAx, options) +end @@ -502,10 +486,9 @@ Inherited

    -

    -From the docs: This element specifies that this axis is a date or text axis -based on the data that is used for the axis labels, not a specific choice. -

    + +

    From the docs: This element specifies that this axis is a date or text axis +based on the data that is used for the axis labels, not a specific choice.

    @@ -539,10 +522,9 @@ based on the data that is used for the axis labels, not a specific choice.
    # File 'lib/axlsx/drawing/cat_axis.rb', line 7
     
    -def auto
    -  @auto
    -end
    -
    +def auto + @auto +end @@ -560,10 +542,9 @@ based on the data that is used for the axis labels, not a specific choice.

    -

    -specifies how the perpendicular axis is crossed must be one of [:ctr, :l, -:r] -

    + +

    specifies how the perpendicular axis is crossed must be one of [:ctr, :l, +:r]

    @@ -597,10 +578,9 @@ specifies how the perpendicular axis is crossed must be one of [:ctr, :l,
    # File 'lib/axlsx/drawing/cat_axis.rb', line 12
     
    -def lblAlgn
    -  @lblAlgn
    -end
    -
    +def lblAlgn + @lblAlgn +end @@ -618,9 +598,8 @@ specifies how the perpendicular axis is crossed must be one of [:ctr, :l,

    -

    -The offset of the labels must be between a string between 0 and 1000 -

    + +

    The offset of the labels must be between a string between 0 and 1000

    @@ -654,10 +633,9 @@ The offset of the labels must be between a string between 0 and 1000
    # File 'lib/axlsx/drawing/cat_axis.rb', line 17
     
    -def lblOffset
    -  @lblOffset
    -end
    -
    +def lblOffset + @lblOffset +end @@ -679,9 +657,8 @@ The offset of the labels must be between a string between 0 and 1000

    -

    -Serializes the category axis -

    + +

    Serializes the category axis

    @@ -700,9 +677,8 @@ Serializes the category axis — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -741,15 +717,14 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/cat_axis.rb', line 52
     
    -def to_xml(xml)
    -  xml.send('c:catAx') {
    -    super(xml)
    -    xml.send('c:auto', :val=>@auto)
    -    xml.send('c:lblAlgn', :val=>@lblAlgn)
    -    xml.send('c:lblOffset', :val=>@lblOffset)                 
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:catAx') { + super(xml) + xml.send('c:auto', :val=>@auto) + xml.send('c:lblAlgn', :val=>@lblAlgn) + xml.send('c:lblOffset', :val=>@lblOffset) + } +end @@ -760,9 +735,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/CatAxisData.html b/doc/Axlsx/CatAxisData.html index 92239b29..70e505e6 100644 --- a/doc/Axlsx/CatAxisData.html +++ b/doc/Axlsx/CatAxisData.html @@ -96,9 +96,8 @@

    Overview

    -

    -The CatAxisData class serializes the category axis data for a chart -

    + +

    The CatAxisData class serializes the category axis data for a chart

    @@ -153,9 +152,8 @@ The CatAxisData class serializes the category axis data for a chart -

    -Create a new CatAxisData object. -

    +
    +

    Create a new CatAxisData object.

    @@ -177,9 +175,8 @@ Create a new CatAxisData object. -

    -Serializes the category axis data. -

    +
    +

    Serializes the category axis data.

    @@ -205,9 +202,8 @@ Serializes the category axis data.

    -

    -Create a new CatAxisData object -

    + +

    Create a new CatAxisData object

    @@ -228,10 +224,9 @@ Create a new CatAxisData object — -

    -the data for this category axis. This can be a simple array or a simple -typed list of cells. -

    +
    +

    the data for this category axis. This can be a simple array or a simple +typed list of cells.

    @@ -254,12 +249,11 @@ typed list of cells.
    # File 'lib/axlsx/drawing/cat_axis_data.rb', line 7
     
    -def initialize(data=[])
    -  super Object
    -  @list.concat data if data.is_a?(Array)
    -  data.each { |i| @list << i } if data.is_a?(SimpleTypedList)
    -end
    -
    +def initialize(data=[]) + super Object + @list.concat data if data.is_a?(Array) + data.each { |i| @list << i } if data.is_a?(SimpleTypedList) +end @@ -291,9 +285,8 @@ typed list of cells.

    -

    -Serializes the category axis data -

    + +

    Serializes the category axis data

    @@ -312,9 +305,8 @@ Serializes the category axis data — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -361,23 +353,22 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/cat_axis_data.rb', line 16
     
    -def to_xml(xml)
    -  xml.send('c:cat') {
    -    xml.send('c:strRef') {
    -      xml.send('c:f', Axlsx::cell_range(@list))
    -      xml.send('c:strCache') {
    -        xml.send('c:ptCount', :val=>size)
    -        each_with_index do |item, index|
    -          v = item.is_a?(Cell) ? item.value : item
    -          xml.send('c:pt', :idx=>index) {
    -            xml.send('c:v', v)
    -          }                          
    -        end
    -      }
    -    }
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:cat') { + xml.send('c:strRef') { + xml.send('c:f', Axlsx::cell_range(@list)) + xml.send('c:strCache') { + xml.send('c:ptCount', :val=>size) + each_with_index do |item, index| + v = item.is_a?(Cell) ? item.value : item + xml.send('c:pt', :idx=>index) { + xml.send('c:v', v) + } + end + } + } + } +end @@ -388,9 +379,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Cell.html b/doc/Axlsx/Cell.html index 3df34d79..b99fb502 100644 --- a/doc/Axlsx/Cell.html +++ b/doc/Axlsx/Cell.html @@ -97,22 +97,20 @@
    Note: -

    -The recommended way to generate cells is via Worksheet#add_row -

    +
    +

    The recommended way to generate cells is via Worksheet#add_row

    -

    -A cell in a worksheet. Cell stores inforamation requried to serialize a + +

    A cell in a worksheet. Cell stores inforamation requried to serialize a single worksheet cell to xml. You must provde the Row that the cell belongs to and the cells value. The data type will automatically be determed if you do not specify the :type option. The default style will be applied if you -do not supply the :style option. Changing the cell’s type will recast -the value to the type specified. Altering the cell’s value via the -property accessor will also automatically cast the provided value to the -cell’s type. -

    +do not supply the :style option. Changing the cell's type will recast the +value to the type specified. Altering the cell's value via the property +accessor will also automatically cast the provided value to the cell's +type.

    @@ -122,25 +120,23 @@ cell’s type.

    Examples:

    -

    -Manually creating and manipulating Cell objects -

    +

    +

    Manually creating and manipulating Cell objects

    -
    ws = Workbook.new.add_worksheet 
    -# This is the simple, and recommended way to create cells. Data types will automatically be determined for you.
    -ws.add_row :values => [1,"fish",Time.now]
    +      
    ws = Workbook.new.add_worksheet 
    +# This is the simple, and recommended way to create cells. Data types will automatically be determined for you.
    +ws.add_row :values => [1,"fish",Time.now]
     
    -# but you can also do this
    -r = ws.add_row
    -r.add_cell 1
    +# but you can also do this
    +r = ws.add_row
    +r.add_cell 1
     
    -# or even this
    -r = ws.add_row
    -c = Cell.new row, 1, :value=>integer
    +# or even this
    +r = ws.add_row
    +c = Cell.new row, 1, :value=>integer
     
    -# cells can also be accessed via Row#cells. The example here changes the cells type, which will automatically updated the value from 1 to 1.0
    -r.cells.last.type = :float
    -
    +# cells can also be accessed via Row#cells. The example here changes the cells type, which will automatically updated the value from 1 to 1.0 +r.cells.last.type = :float
    @@ -176,9 +172,8 @@ Manually creating and manipulating Cell objects -

    -The row this cell belongs to. -

    +
    +

    The row this cell belongs to.

    @@ -203,9 +198,8 @@ The row this cell belongs to. -

    -The index of the cellXfs item to be applied to this cell. -

    +
    +

    The index of the cellXfs item to be applied to this cell.

    @@ -230,9 +224,8 @@ The index of the cellXfs item to be applied to this cell. -

    -The cell’s data type. -

    +
    +

    The cell's data type.

    @@ -257,9 +250,8 @@ The cell’s data type. -

    -The value of this cell. -

    +
    +

    The value of this cell.

    @@ -281,78 +273,6 @@ The value of this cell.
  • - - (Object) cast_value(v) - - - - - - - - - - - - -

    -Cast the value into this cells data type. -

    -
    - -
  • - - -
  • - - - - (Symbol) cell_type_from_value(v) - - - - - - - - - - - - -

    -Determines the cell type based on the cell value. -

    -
    - -
  • - - -
  • - - - - (String) col_ref - - - - - - - - - - - - -

    -converts the column index into alphabetical values. -

    -
    - -
  • - - -
  • - - - (Integer) index @@ -366,9 +286,8 @@ converts the column index into alphabetical values. -

    -The index of the cell in the containing row. -

    +
    +

    The index of the cell in the containing row.

  • @@ -392,9 +311,8 @@ The index of the cell in the containing row. -

    -A new instance of Cell. -

    +
    +

    A new instance of Cell.

    @@ -416,9 +334,8 @@ A new instance of Cell. -

    -The alpha(column)numeric(row) reference for this sell. -

    +
    +

    The alpha(column)numeric(row) reference for this sell.

    @@ -440,9 +357,8 @@ The alpha(column)numeric(row) reference for this sell. -

    -The absolute alpha(column)numeric(row) reference for this sell. -

    +
    +

    The absolute alpha(column)numeric(row) reference for this sell.

    @@ -464,9 +380,8 @@ The absolute alpha(column)numeric(row) reference for this sell. -

    -Serializes the cell. -

    +
    +

    Serializes the cell.

    @@ -487,9 +402,8 @@ Serializes the cell.

    -

    -A new instance of Cell -

    + +

    A new instance of Cell

    @@ -508,9 +422,8 @@ A new instance of Cell — -

    -The row this cell belongs to. -

    +
    +

    The row this cell belongs to.

    @@ -527,9 +440,8 @@ The row this cell belongs to. — -

    -The value associated with this cell. -

    +
    +

    The value associated with this cell.

    @@ -546,9 +458,8 @@ The value associated with this cell. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -571,10 +482,9 @@ a customizable set of options - —

    -The intended data type for this cell. If not specified the data type will -be determined internally based on the vlue provided. -

    + —
    +

    The intended data type for this cell. If not specified the data type will +be determined internally based on the vlue provided.

    @@ -584,10 +494,9 @@ be determined internally based on the vlue provided. - —

    -The index of the cellXfs item to be applied to this cell. If not specified, -the default style (0) will be applied. -

    + —
    +

    The index of the cellXfs item to be applied to this cell. If not specified, +the default style (0) will be applied.

    @@ -614,16 +523,15 @@ the default style (0) will be applied.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 69
     
    -def initialize(row, value="", options={})
    -  self.row=row
    -  #reference for validation
    -  @styles = row.worksheet.workbook.styles
    -  @type= options[:type] || cell_type_from_value(value)
    -  self.style = options[:style] || 0 
    -  @value = cast_value(value)
    -  @row.cells << self
    -end
    -
    +def initialize(row, value="", options={}) + self.row=row + #reference for validation + @styles = row.worksheet.workbook.styles + @type= options[:type] || cell_type_from_value(value) + self.style = options[:style] || 0 + @value = cast_value(value) + @row.cells << self +end @@ -646,9 +554,8 @@ the default style (0) will be applied.

    -

    -The row this cell belongs to. -

    + +

    The row this cell belongs to.

    @@ -682,10 +589,9 @@ The row this cell belongs to.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 33
     
    -def row
    -  @row
    -end
    -
    +def row + @row +end @@ -703,9 +609,8 @@ The row this cell belongs to.

    -

    -The index of the cellXfs item to be applied to this cell. -

    + +

    The index of the cellXfs item to be applied to this cell.

    @@ -746,10 +651,9 @@ The index of the cellXfs item to be applied to this cell.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 29
     
    -def style
    -  @style
    -end
    -
    +def style + @style +end @@ -770,26 +674,22 @@ The index of the cellXfs item to be applied to this cell.
    Note: -

    -If the value provided cannot be cast into the type specified, type is -changed to :string and the following logic is applied. -

    -
    - :string to :integer or :float, type coversions always return 0 or 0.0
    - :string, :integer, or :float to :time conversions always return the original value as a string and set the cells type to :string.
    -
    -

    -No support is currently implemented for parsing time strings. -

    +
    +

    If the value provided cannot be cast into the type specified, type is +changed to :string and the following logic is applied.

    + +
    :string to :integer or :float, type coversions always return 0 or 0.0    
    +:string, :integer, or :float to :time conversions always return the original value as a string and set the cells type to :string.
    + +

    No support is currently implemented for parsing time strings.

    -

    -The cell’s data type. Currently only four types are supported, :time, + +

    The cell's data type. Currently only four types are supported, :time, :float, :integer and :string. Changing the type for a cell will recast the value into that type. If no type option is specified in the constructor, -the type is automatically determed. -

    +the type is automatically determed.

    @@ -807,9 +707,8 @@ the type is automatically determed. — -

    -The type of data this cell’s value is cast to. -

    +
    +

    The type of data this cell’s value is cast to.

    @@ -826,9 +725,8 @@ The type of data this cell’s value is cast to. — -

    -Cell.type must be one of [:time, :float, :integer, :string] -

    +
    +

    Cell.type must be one of [:time, :float, :integer, :string]

    @@ -855,10 +753,9 @@ Cell.type must be one of [:time, :float, :integer, :string]
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 46
     
    -def type
    -  @type
    -end
    -
    +def type + @type +end @@ -876,9 +773,8 @@ Cell.type must be one of [:time, :float, :integer, :string]

    -

    -The value of this cell. -

    + +

    The value of this cell.

    @@ -896,9 +792,8 @@ The value of this cell. -

    -casted value based on cell’s type attribute. -

    +
    +

    casted value based on cell’s type attribute.

    @@ -918,10 +813,9 @@ casted value based on cell’s type attribute.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 57
     
    -def value
    -  @value
    -end
    -
    +def value + @value +end @@ -935,377 +829,7 @@ casted value based on cell’s type attribute.
    -

    - - - (Object) cast_value(v) - - - -

    -
    - -
    - Note: -

    -About Time - Time in OOXML is different from what you might expect. -The history as to why is interesting, but you can safely assume that if you -are generating docs on a mac, you will want to specify Workbook.1904 as -true when using time typed values. -

    -
    -
    - -

    -Cast the value into this cells data type. -

    - - -
    -
    -
    - - -

    See Also:

    -
      - -
    • Axlsx#date1904
    • - -
    - -
    - - - - -
    -
    -
    -
    -169
    -170
    -171
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -181
    -182
    -183
    -184
    -185
    -186
    -187
    -188
    -189
    -190
    -191
    -
    -
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 169
    -
    -def cast_value(v)
    -  if @type == :time && v.is_a?(Time)
    -    #todo consider a time parsing method to convert strings to time
    -    epoc = Workbook.date1904 ? Time.local(1904,1,1,0,0,0,0,v.zone) : Time.local(1900,1,1,0,0,0,0,v.zone)
    -    ((v - epoc) /60.0/60.0/24.0).to_f
    -  elsif @type == :float
    -    v.to_f
    -  elsif @type == :integer
    -    v.to_i
    -  else
    -    @type = :string
    -    v.to_s
    -    # curious as to why this would be the cells responsibility
    -    # convert your values before passing them in wankers! CGI.unescapeHTML(v.to_s).to_xs
    -    # to revert, load this once when the gem is loaded.
    -    # unless String.method_defined? :to_xs
    -    #   require 'fast_xs' #dep
    -    #   class String
    -    #     alias_method :to_xs, :fast_xs
    -    #   end
    -    # end
    -  end
    -end
    -
    -
    -
    - -
    -

    - - - (Symbol) cell_type_from_value(v) - - - -

    -
    - -
    - Note: -

    -This is only used when a cell is created but no :type option is specified, -the following rules apply: -

    -
      -
    1. If the value is an instance of Time, the type is set to :time - -
    2. -
    3. :float and :integer types are determined by regular expression matching. - -
    4. -
    5. Anything that does not meet either of the above is determined to be -:string. - -
    6. -
    -
    -
    - -

    -Determines the cell type based on the cell value. -

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Symbol) - - - - — -

      -The determined type -

      -
      - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
    -162
    -163
    -
    -
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 153
    -
    -def cell_type_from_value(v)      
    -  if v.is_a? Time
    -    :time
    -  elsif v.to_s.match(/\A[+-]?\d+?\Z/) #numeric
    -    :integer
    -  elsif v.to_s.match(/\A[+-]?\d+\.\d+?\Z/) #float
    -    :float
    -  else
    -    :string
    -  end
    -end
    -
    -
    -
    - -
    -

    - - - (String) col_ref - - - -

    -
    - -
    - Note: -

    -This follows the standard spreadsheet convention of naming columns A to Z, -followed by AA to AZ etc. -

    -
    -
    - -

    -converts the column index into alphabetical values. -

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -136
    -137
    -138
    -139
    -140
    -141
    -142
    -143
    -144
    -145
    -146
    -147
    -148
    -149
    -150
    -151
    -152
    -153
    -154
    -155
    -156
    -157
    -158
    -159
    -160
    -161
    -162
    -163
    -164
    -165
    -166
    -167
    -168
    -169
    -170
    -171
    -172
    -173
    -174
    -175
    -176
    -177
    -178
    -179
    -180
    -181
    -182
    -183
    -184
    -185
    -186
    -187
    -188
    -189
    -190
    -191
    -192
    -
    -
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 136
    -
    -def col_ref
    -    chars = []
    -    index = self.index
    -    while index >= 26 do
    -      chars << ((index % 26) + 65).chr
    -      index /= 26
    -    end
    -    chars << ((chars.empty? ? index : index-1) + 65).chr
    -    chars.reverse.join
    -  end
    -
    -  # Determines the cell type based on the cell value. 
    -  # @note This is only used when a cell is created but no :type option is specified, the following rules apply:
    -  #   1. If the value is an instance of Time, the type is set to :time
    -  #   2. :float and :integer types are determined by regular expression matching.
    -  #   3. Anything that does not meet either of the above is determined to be :string.
    -  # @return [Symbol] The determined type
    -  def cell_type_from_value(v)      
    -    if v.is_a? Time
    -      :time
    -    elsif v.to_s.match(/\A[+-]?\d+?\Z/) #numeric
    -      :integer
    -    elsif v.to_s.match(/\A[+-]?\d+\.\d+?\Z/) #float
    -      :float
    -    else
    -      :string
    -    end
    -  end
    -
    -  # Cast the value into this cells data type. 
    -  # @note 
    -  #   About Time - Time in OOXML is *different* from what you might expect. The history as to why is interesting,  but you can safely assume that if you are generating docs on a mac, you will want to specify Workbook.1904 as true when using time typed values.
    -  # @see Axlsx#date1904
    -  def cast_value(v)
    -    if @type == :time && v.is_a?(Time)
    -      #todo consider a time parsing method to convert strings to time
    -      epoc = Workbook.date1904 ? Time.local(1904,1,1,0,0,0,0,v.zone) : Time.local(1900,1,1,0,0,0,0,v.zone)
    -      ((v - epoc) /60.0/60.0/24.0).to_f
    -    elsif @type == :float
    -      v.to_f
    -    elsif @type == :integer
    -      v.to_i
    -    else
    -      @type = :string
    -      v.to_s
    -      # curious as to why this would be the cells responsibility
    -      # convert your values before passing them in wankers! CGI.unescapeHTML(v.to_s).to_xs
    -      # to revert, load this once when the gem is loaded.
    -      # unless String.method_defined? :to_xs
    -      #   require 'fast_xs' #dep
    -      #   class String
    -      #     alias_method :to_xs, :fast_xs
    -      #   end
    -      # end
    -    end
    -  end    
    -end
    -
    -
    -
    - -
    -

    +

    - (Integer) index @@ -1313,9 +837,8 @@ converts the column index into alphabetical values.

    -

    -The index of the cell in the containing row. -

    + +

    The index of the cell in the containing row.

    @@ -1333,9 +856,8 @@ The index of the cell in the containing row. — -

    -The index of the cell in the containing row. -

    +
    +

    The index of the cell in the containing row.

    @@ -1355,10 +877,9 @@ The index of the cell in the containing row.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 80
     
    -def index
    -  @row.cells.index(self)
    -end
    -
    +def index + @row.cells.index(self) +end @@ -1373,9 +894,8 @@ The index of the cell in the containing row.

    -

    -The alpha(column)numeric(row) reference for this sell. -

    + +

    The alpha(column)numeric(row) reference for this sell.

    @@ -1385,12 +905,10 @@ The alpha(column)numeric(row) reference for this sell.

    Examples:

    -

    -Relative Cell Reference -

    +

    +

    Relative Cell Reference

    -
    ws.rows.first.cells.first.r #=> "A1" 
    -
    +
    ws.rows.first.cells.first.r #=> "A1" 
    @@ -1405,9 +923,8 @@ Relative Cell Reference — -

    -The alpha(column)numeric(row) reference for this sell. -

    +
    +

    The alpha(column)numeric(row) reference for this sell.

    @@ -1427,10 +944,9 @@ The alpha(column)numeric(row) reference for this sell.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 87
     
    -def r
    -  "#{col_ref}#{@row.index+1}"      
    -end
    -
    +def r + "#{col_ref}#{@row.index+1}" +end @@ -1445,9 +961,8 @@ The alpha(column)numeric(row) reference for this sell.

    -

    -The absolute alpha(column)numeric(row) reference for this sell. -

    + +

    The absolute alpha(column)numeric(row) reference for this sell.

    @@ -1457,12 +972,10 @@ The absolute alpha(column)numeric(row) reference for this sell.

    Examples:

    -

    -Absolute Cell Reference -

    +

    +

    Absolute Cell Reference

    -
    ws.rows.first.cells.first.r #=> "$A$1" 
    -
    +
    ws.rows.first.cells.first.r #=> "$A$1" 
    @@ -1477,9 +990,8 @@ Absolute Cell Reference — -

    -The absolute alpha(column)numeric(row) reference for this sell. -

    +
    +

    The absolute alpha(column)numeric(row) reference for this sell.

    @@ -1499,10 +1011,9 @@ The absolute alpha(column)numeric(row) reference for this sell.
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 94
     
    -def r_abs
    -  "$#{r.split('').join('$')}"
    -end
    -
    +def r_abs + "$#{r.split('').join('$')}" +end @@ -1520,16 +1031,14 @@ The absolute alpha(column)numeric(row) reference for this sell.
    Note: -

    -Shared Strings are not used in this library. All values are set directly in -the each sheet. -

    +
    +

    Shared Strings are not used in this library. All values are set directly in +the each sheet.

    -

    -Serializes the cell -

    + +

    Serializes the cell

    @@ -1548,9 +1057,8 @@ Serializes the cell — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1568,9 +1076,8 @@ The document builder instance this objects xml will be added to. — -

    -xml text for the cell -

    +
    +

    xml text for the cell

    @@ -1599,19 +1106,18 @@ xml text for the cell
    # File 'lib/axlsx/workbook/worksheet/cell.rb', line 114
     
    -def to_xml(xml)
    -  # Both 1.8 and 1.9 return the same 'fast_xf'
    -  # &#12491;&#12507;&#12531;&#12468;
    -  # &#12491;&#12507;&#12531;&#12468;
    -  
    -  # however nokogiri does a nice 'force_encoding' which we shall remove!
    -  if @type == :string 
    -    xml.c(:r => r, :t=>:inlineStr, :s=>style) { xml.is { xml.t @value.to_s } }
    -  else
    -    xml.c(:r => r, :s => style) { xml.v value }
    -  end
    -end
    -
    +def to_xml(xml) + # Both 1.8 and 1.9 return the same 'fast_xf' + # &#12491;&#12507;&#12531;&#12468; + # &#12491;&#12507;&#12531;&#12468; + + # however nokogiri does a nice 'force_encoding' which we shall remove! + if @type == :string + xml.c(:r => r, :t=>:inlineStr, :s=>style) { xml.is { xml.t @value.to_s } } + else + xml.c(:r => r, :s => style) { xml.v value } + end +end @@ -1622,9 +1128,9 @@ xml text for the cell
    diff --git a/doc/Axlsx/CellAlignment.html b/doc/Axlsx/CellAlignment.html index 8d87931f..7d071f50 100644 --- a/doc/Axlsx/CellAlignment.html +++ b/doc/Axlsx/CellAlignment.html @@ -97,16 +97,14 @@
    Note: -

    -Using Styles#add_style is the recommended way to manage cell alignment. -

    +
    +

    Using Styles#add_style is the recommended way to manage cell alignment.

    -

    -CellAlignment stores information about the cell alignment of a style Xf -Object. -

    + +

    CellAlignment stores information about the cell alignment of a style Xf +Object.

    @@ -145,9 +143,8 @@ Object. -

    -The horizontal alignment of the cell. -

    +
    +

    The horizontal alignment of the cell.

    @@ -172,9 +169,8 @@ The horizontal alignment of the cell. -

    -The amount of indent. -

    +
    +

    The amount of indent.

    @@ -199,9 +195,8 @@ The amount of indent. -

    -Indicate if the last line should be justified. -

    +
    +

    Indicate if the last line should be justified.

    @@ -226,10 +221,9 @@ Indicate if the last line should be justified. -

    -The reading order of the text 0 Context Dependent 1 Left-to-Right 2 -Right-to-Left. -

    +
    +

    The reading order of the text 0 Context Dependent 1 Left-to-Right 2 +Right-to-Left.

    @@ -254,9 +248,8 @@ Right-to-Left. -

    -The amount of relativeIndent. -

    +
    +

    The amount of relativeIndent.

    @@ -281,9 +274,8 @@ The amount of relativeIndent. -

    -Indicate if the text should be shrunk to the fit in the cell. -

    +
    +

    Indicate if the text should be shrunk to the fit in the cell.

    @@ -308,9 +300,8 @@ Indicate if the text should be shrunk to the fit in the cell. -

    -The textRotation of the cell. -

    +
    +

    The textRotation of the cell.

    @@ -335,9 +326,8 @@ The textRotation of the cell. -

    -The vertical alignment of the cell. -

    +
    +

    The vertical alignment of the cell.

    @@ -362,9 +352,8 @@ The vertical alignment of the cell. -

    -Indicate if the text of the cell should wrap. -

    +
    +

    Indicate if the text of the cell should wrap.

    @@ -401,9 +390,8 @@ Indicate if the text of the cell should wrap. -

    -Create a new cell_alignment object. -

    +
    +

    Create a new cell_alignment object.

    @@ -425,9 +413,8 @@ Create a new cell_alignment object. -

    -Serializes the cell alignment. -

    +
    +

    Serializes the cell alignment.

    @@ -448,9 +435,8 @@ Serializes the cell alignment.

    -

    -Create a new cell_alignment object -

    + +

    Create a new cell_alignment object

    @@ -471,9 +457,8 @@ Create a new cell_alignment object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -586,12 +571,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 72
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -617,25 +601,22 @@ a customizable set of options
    Note: -

    -The horizontal cell alignement style must be one of -

    -
    - :general
    - :left
    - :center
    - :right
    - :fill
    - :justify
    - :centerContinuous
    - :distributed
    -
    +
    +

    The horizontal cell alignement style must be one of

    + +
    :general
    +:left
    +:center
    +:right
    +:fill
    +:justify
    +:centerContinuous
    +:distributed
    -

    -The horizontal alignment of the cell. -

    + +

    The horizontal alignment of the cell.

    @@ -669,10 +650,9 @@ The horizontal alignment of the cell.
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 18
     
    -def horizontal
    -  @horizontal
    -end
    -
    +def horizontal + @horizontal +end @@ -690,9 +670,8 @@ The horizontal alignment of the cell.

    -

    -The amount of indent -

    + +

    The amount of indent

    @@ -726,10 +705,9 @@ The amount of indent
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 41
     
    -def indent
    -  @indent
    -end
    -
    +def indent + @indent +end @@ -747,9 +725,8 @@ The amount of indent

    -

    -Indicate if the last line should be justified. -

    + +

    Indicate if the last line should be justified.

    @@ -783,10 +760,9 @@ Indicate if the last line should be justified.
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 49
     
    -def justifyLastLine
    -  @justifyLastLine
    -end
    -
    +def justifyLastLine + @justifyLastLine +end @@ -804,10 +780,9 @@ Indicate if the last line should be justified.

    -

    -The reading order of the text 0 Context Dependent 1 Left-to-Right 2 -Right-to-Left -

    + +

    The reading order of the text 0 Context Dependent 1 Left-to-Right 2 +Right-to-Left

    @@ -841,10 +816,9 @@ Right-to-Left
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 60
     
    -def readingOrder
    -  @readingOrder
    -end
    -
    +def readingOrder + @readingOrder +end @@ -862,9 +836,8 @@ Right-to-Left

    -

    -The amount of relativeIndent -

    + +

    The amount of relativeIndent

    @@ -898,10 +871,9 @@ The amount of relativeIndent
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 45
     
    -def relativeIndent
    -  @relativeIndent
    -end
    -
    +def relativeIndent + @relativeIndent +end @@ -919,9 +891,8 @@ The amount of relativeIndent

    -

    -Indicate if the text should be shrunk to the fit in the cell. -

    + +

    Indicate if the text should be shrunk to the fit in the cell.

    @@ -955,10 +926,9 @@ Indicate if the text should be shrunk to the fit in the cell.
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 53
     
    -def shrinkToFit
    -  @shrinkToFit
    -end
    -
    +def shrinkToFit + @shrinkToFit +end @@ -976,9 +946,8 @@ Indicate if the text should be shrunk to the fit in the cell.

    -

    -The textRotation of the cell. -

    + +

    The textRotation of the cell.

    @@ -1012,10 +981,9 @@ The textRotation of the cell.
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 33
     
    -def textRotation
    -  @textRotation
    -end
    -
    +def textRotation + @textRotation +end @@ -1036,22 +1004,19 @@ The textRotation of the cell.
    Note: -

    -The vertical cell allingment style must be one of the following: -

    -
    - :top
    - :center
    - :bottom
    - :justify
    - :distributed
    -
    +
    +

    The vertical cell allingment style must be one of the following:

    + +
    :top
    +:center
    +:bottom
    +:justify
    +:distributed
    -

    -The vertical alignment of the cell. -

    + +

    The vertical alignment of the cell.

    @@ -1085,10 +1050,9 @@ The vertical alignment of the cell.
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 29
     
    -def vertical
    -  @vertical
    -end
    -
    +def vertical + @vertical +end @@ -1106,9 +1070,8 @@ The vertical alignment of the cell.

    -

    -Indicate if the text of the cell should wrap -

    + +

    Indicate if the text of the cell should wrap

    @@ -1142,10 +1105,9 @@ Indicate if the text of the cell should wrap
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 37
     
    -def wrapText
    -  @wrapText
    -end
    -
    +def wrapText + @wrapText +end @@ -1167,9 +1129,8 @@ Indicate if the text of the cell should wrap

    -

    -Serializes the cell alignment -

    + +

    Serializes the cell alignment

    @@ -1188,9 +1149,8 @@ Serializes the cell alignment — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1224,10 +1184,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/cell_alignment.rb', line 100
     
    -def to_xml(xml)
    -  xml.alignment(self.instance_values)      
    -end
    -
    +def to_xml(xml) + xml.alignment(self.instance_values) +end @@ -1238,9 +1197,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/CellProtection.html b/doc/Axlsx/CellProtection.html index 2270800b..0e231d64 100644 --- a/doc/Axlsx/CellProtection.html +++ b/doc/Axlsx/CellProtection.html @@ -97,16 +97,14 @@
    Note: -

    -Using Styles#add_style is the recommended way to manage cell protection. -

    +
    +

    Using Styles#add_style is the recommended way to manage cell protection.

    -

    -CellProtection stores information about locking or hiding cells in -spreadsheet. -

    + +

    CellProtection stores information about locking or hiding cells in +spreadsheet.

    @@ -145,9 +143,8 @@ spreadsheet. -

    -specifies locking for cells that have the style containing this protection. -

    +
    +

    specifies locking for cells that have the style containing this protection.

    @@ -172,9 +169,8 @@ specifies locking for cells that have the style containing this protection. -

    -specifies if the cells that have the style containing this protection. -

    +
    +

    specifies if the cells that have the style containing this protection.

    @@ -211,9 +207,8 @@ specifies if the cells that have the style containing this protection. -

    -Creates a new CellProtection. -

    +
    +

    Creates a new CellProtection.

    @@ -235,9 +230,8 @@ Creates a new CellProtection. -

    -Serializes the cell protection. -

    +
    +

    Serializes the cell protection.

    @@ -258,9 +252,8 @@ Serializes the cell protection.

    -

    -Creates a new CellProtection -

    + +

    Creates a new CellProtection

    @@ -281,9 +274,8 @@ Creates a new CellProtection — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -302,9 +294,8 @@ a customizable set of options - —

    -value for hidden protection -

    + —
    +

    value for hidden protection

    @@ -314,9 +305,8 @@ value for hidden protection - —

    -value for locked protection -

    + —
    +

    value for locked protection

    @@ -339,12 +329,11 @@ value for locked protection
    # File 'lib/axlsx/stylesheet/cell_protection.rb', line 18
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -367,9 +356,8 @@ value for locked protection

    -

    -specifies locking for cells that have the style containing this protection -

    + +

    specifies locking for cells that have the style containing this protection

    @@ -403,10 +391,9 @@ specifies locking for cells that have the style containing this protection
    # File 'lib/axlsx/stylesheet/cell_protection.rb', line 9
     
    -def 
    -  @hidden
    -end
    -
    +def + @hidden +end @@ -424,9 +411,8 @@ specifies locking for cells that have the style containing this protection

    -

    -specifies if the cells that have the style containing this protection -

    + +

    specifies if the cells that have the style containing this protection

    @@ -460,10 +446,9 @@ specifies if the cells that have the style containing this protection
    # File 'lib/axlsx/stylesheet/cell_protection.rb', line 13
     
    -def locked
    -  @locked
    -end
    -
    +def locked + @locked +end @@ -485,9 +470,8 @@ specifies if the cells that have the style containing this protection

    -

    -Serializes the cell protection -

    + +

    Serializes the cell protection

    @@ -506,9 +490,8 @@ Serializes the cell protection — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -542,10 +525,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/cell_protection.rb', line 32
     
    -def to_xml(xml)
    -  xml.protection(self.instance_values)
    -end
    -
    +def to_xml(xml) + xml.protection(self.instance_values) +end @@ -556,9 +538,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/CellStyle.html b/doc/Axlsx/CellStyle.html index 3574cb20..8a469a4b 100644 --- a/doc/Axlsx/CellStyle.html +++ b/doc/Axlsx/CellStyle.html @@ -97,16 +97,14 @@
    Note: -

    -Using Styles#add_style is the recommended way to manage cell styling. -

    +
    +

    Using Styles#add_style is the recommended way to manage cell styling.

    -

    -CellStyle defines named styles that reference defined formatting records -and can be used in your worksheet. -

    + +

    CellStyle defines named styles that reference defined formatting records +and can be used in your worksheet.

    @@ -145,9 +143,8 @@ and can be used in your worksheet. -

    -The buildinId to use when this named style is applied. -

    +
    +

    The buildinId to use when this named style is applied.

    @@ -172,9 +169,8 @@ The buildinId to use when this named style is applied. -

    -Indicates that the build in style reference has been customized. -

    +
    +

    Indicates that the build in style reference has been customized.

    @@ -199,10 +195,9 @@ Indicates that the build in style reference has been customized. -

    -Determines if this named style should show in the list of styles when using -excel. -

    +
    +

    Determines if this named style should show in the list of styles when using +excel.

    @@ -227,10 +222,9 @@ excel. -

    -Determines if this formatting is for an outline style, and what level of -the outline it is to be applied to. -

    +
    +

    Determines if this formatting is for an outline style, and what level of +the outline it is to be applied to.

    @@ -255,9 +249,8 @@ the outline it is to be applied to. -

    -The name of this cell style. -

    +
    +

    The name of this cell style.

    @@ -282,9 +275,8 @@ The name of this cell style. -

    -The formatting record id this named style utilizes. -

    +
    +

    The formatting record id this named style utilizes.

    @@ -321,9 +313,8 @@ The formatting record id this named style utilizes. -

    -Creats a new CellStyle object. -

    +
    +

    Creats a new CellStyle object.

    @@ -345,9 +336,8 @@ Creats a new CellStyle object. -

    -Serializes the cell style. -

    +
    +

    Serializes the cell style.

    @@ -368,9 +358,8 @@ Serializes the cell style.

    -

    -Creats a new CellStyle object -

    + +

    Creats a new CellStyle object

    @@ -391,9 +380,8 @@ Creats a new CellStyle object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -479,12 +467,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 39
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -507,9 +494,8 @@ a customizable set of options

    -

    -The buildinId to use when this named style is applied -

    + +

    The buildinId to use when this named style is applied

    @@ -550,10 +536,9 @@ The buildinId to use when this named style is applied
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 18
     
    -def builtinId
    -  @builtinId
    -end
    -
    +def builtinId + @builtinId +end @@ -571,9 +556,8 @@ The buildinId to use when this named style is applied

    -

    -Indicates that the build in style reference has been customized. -

    + +

    Indicates that the build in style reference has been customized.

    @@ -607,10 +591,9 @@ Indicates that the build in style reference has been customized.
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 30
     
    -def customBuiltin
    -  @customBuiltin
    -end
    -
    +def customBuiltin + @customBuiltin +end @@ -628,10 +611,9 @@ Indicates that the build in style reference has been customized.

    -

    -Determines if this named style should show in the list of styles when using -excel -

    + +

    Determines if this named style should show in the list of styles when using +excel

    @@ -665,10 +647,9 @@ excel
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 26
     
    -def 
    -  @hidden
    -end
    -
    +def + @hidden +end @@ -686,10 +667,9 @@ excel

    -

    -Determines if this formatting is for an outline style, and what level of -the outline it is to be applied to. -

    + +

    Determines if this formatting is for an outline style, and what level of +the outline it is to be applied to.

    @@ -723,10 +703,9 @@ the outline it is to be applied to.
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 22
     
    -def iLevel
    -  @iLevel
    -end
    -
    +def iLevel + @iLevel +end @@ -744,9 +723,8 @@ the outline it is to be applied to.

    -

    -The name of this cell style -

    + +

    The name of this cell style

    @@ -780,10 +758,9 @@ The name of this cell style
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 8
     
    -def name
    -  @name
    -end
    -
    +def name + @name +end @@ -801,9 +778,8 @@ The name of this cell style

    -

    -The formatting record id this named style utilizes -

    + +

    The formatting record id this named style utilizes

    @@ -844,10 +820,9 @@ The formatting record id this named style utilizes
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 13
     
    -def xfId
    -  @xfId
    -end
    -
    +def xfId + @xfId +end @@ -869,9 +844,8 @@ The formatting record id this named style utilizes

    -

    -Serializes the cell style -

    + +

    Serializes the cell style

    @@ -890,9 +864,8 @@ Serializes the cell style — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -926,10 +899,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/cell_style.rb', line 60
     
    -def to_xml(xml)
    -  xml.cellStyle(self.instance_values)
    -end
    -
    +def to_xml(xml) + xml.cellStyle(self.instance_values) +end @@ -940,9 +912,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Chart.html b/doc/Axlsx/Chart.html index 77cc801b..c017f7ca 100644 --- a/doc/Axlsx/Chart.html +++ b/doc/Axlsx/Chart.html @@ -97,16 +97,14 @@
    Note: -

    -Worksheet#add_chart is the recommended way to create charts for your -worksheets. -

    +
    +

    Worksheet#add_chart is the recommended way to create charts for your +worksheets.

    -

    -A Chart is the superclass for specific charts -

    + +

    A Chart is the superclass for specific charts

    @@ -149,9 +147,8 @@ A Chart is the superclass for specific charts -

    -A reference to the graphic frame that owns this chart. -

    +
    +

    A reference to the graphic frame that owns this chart.

    @@ -176,9 +173,8 @@ A reference to the graphic frame that owns this chart. -

    -A collection of series objects that are applied to the chart. -

    +
    +

    A collection of series objects that are applied to the chart.

    @@ -203,9 +199,8 @@ A collection of series objects that are applied to the chart. -

    -The type of series to use for this chart. -

    +
    +

    The type of series to use for this chart.

    @@ -230,9 +225,8 @@ The type of series to use for this chart. -

    -Show the legend in the chart. -

    +
    +

    Show the legend in the chart.

    @@ -257,9 +251,8 @@ Show the legend in the chart. -

    -The style for the chart. -

    +
    +

    The style for the chart.

    @@ -284,9 +277,8 @@ The style for the chart. -

    -The title object for the chart. -

    +
    +

    The title object for the chart.

    @@ -311,9 +303,8 @@ The title object for the chart. -

    -The 3D view properties for the chart. -

    +
    +

    The 3D view properties for the chart.

    @@ -348,9 +339,8 @@ The 3D view properties for the chart. -

    -Adds a new series to the chart’s series collection. -

    +
    +

    Adds a new series to the chart's series collection.

    @@ -372,10 +362,9 @@ Adds a new series to the chart’s series collection. -

    -This is a short cut method to set the end anchor position If you need finer -granularity in positioning use graphic_frame.anchor.to.colOff / rowOff. -

    +
    +

    This is a short cut method to set the end anchor position If you need finer +granularity in positioning use graphic_frame.anchor.to.colOff / rowOff.

    @@ -397,10 +386,9 @@ granularity in positioning use graphic_frame.anchor.to.colOff / rowOff. -

    -backwards compatibility to allow chart.to and chart.from access to anchor -markers. -

    +
    +

    backwards compatibility to allow chart.to and chart.from access to anchor +markers.

    @@ -422,9 +410,8 @@ markers. -

    -The index of this chart in the workbooks charts collection. -

    +
    +

    The index of this chart in the workbooks charts collection.

    @@ -448,9 +435,8 @@ The index of this chart in the workbooks charts collection. -

    -Creates a new chart object. -

    +
    +

    Creates a new chart object.

    @@ -472,9 +458,8 @@ Creates a new chart object. -

    -The part name for this chart. -

    +
    +

    The part name for this chart.

    @@ -496,11 +481,10 @@ The part name for this chart. -

    -This is a short cut method to set the start anchor position If you need +

    +

    This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff. -

    +rowOff.

    @@ -522,10 +506,9 @@ rowOff. -

    -backwards compatibility to allow chart.to and chart.from access to anchor -markers. -

    +
    +

    backwards compatibility to allow chart.to and chart.from access to anchor +markers.

    @@ -547,9 +530,8 @@ markers. -

    -Chart Serialization serializes the chart. -

    +
    +

    Chart Serialization serializes the chart.

    @@ -570,9 +552,8 @@ Chart Serialization serializes the chart.

    -

    -Creates a new chart object -

    + +

    Creates a new chart object

    @@ -591,9 +572,8 @@ Creates a new chart object — -

    -The frame that holds this chart. -

    +
    +

    The frame that holds this chart.

    @@ -610,9 +590,8 @@ The frame that holds this chart. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -674,9 +653,8 @@ a customizable set of options — -

    -the object that the method was called on -

    +
    +

    the object that the method was called on

    @@ -707,21 +685,20 @@ the object that the method was called on
    # File 'lib/axlsx/drawing/chart.rb', line 44
     
    -def initialize(frame, options={})
    -  @style = 2
    -  @graphic_frame=frame
    -  @graphic_frame.anchor.drawing.worksheet.workbook.charts << self
    -  @series = SimpleTypedList.new Series
    -  @show_legend = true
    -  @series_type = Series
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -  start_at(*options[:start_at]) if options[:start_at]
    -  end_at(*options[:end_at]) if options[:start_at]
    -  yield self if block_given?
    -end
    -
    +def initialize(frame, options={}) + @style = 2 + @graphic_frame=frame + @graphic_frame.anchor.drawing.worksheet.workbook.charts << self + @series = SimpleTypedList.new Series + @show_legend = true + @series_type = Series + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end + start_at(*options[:start_at]) if options[:start_at] + end_at(*options[:end_at]) if options[:start_at] + yield self if block_given? +end @@ -744,9 +721,8 @@ the object that the method was called on

    -

    -A reference to the graphic frame that owns this chart -

    + +

    A reference to the graphic frame that owns this chart

    @@ -780,10 +756,9 @@ A reference to the graphic frame that owns this chart
    # File 'lib/axlsx/drawing/chart.rb', line 14
     
    -def graphic_frame
    -  @graphic_frame
    -end
    -
    +def graphic_frame + @graphic_frame +end @@ -801,9 +776,8 @@ A reference to the graphic frame that owns this chart

    -

    -A collection of series objects that are applied to the chart -

    + +

    A collection of series objects that are applied to the chart

    @@ -837,10 +811,9 @@ A collection of series objects that are applied to the chart
    # File 'lib/axlsx/drawing/chart.rb', line 18
     
    -def series
    -  @series
    -end
    -
    +def series + @series +end @@ -858,9 +831,8 @@ A collection of series objects that are applied to the chart

    -

    -The type of series to use for this chart. -

    + +

    The type of series to use for this chart.

    @@ -894,10 +866,9 @@ The type of series to use for this chart.
    # File 'lib/axlsx/drawing/chart.rb', line 22
     
    -def series_type
    -  @series_type
    -end
    -
    +def series_type + @series_type +end @@ -915,9 +886,8 @@ The type of series to use for this chart.

    -

    -Show the legend in the chart -

    + +

    Show the legend in the chart

    @@ -951,10 +921,9 @@ Show the legend in the chart
    # File 'lib/axlsx/drawing/chart.rb', line 38
     
    -def show_legend
    -  @show_legend
    -end
    -
    +def show_legend + @show_legend +end @@ -972,9 +941,8 @@ Show the legend in the chart

    -

    -The style for the chart. see ECMA Part 1 §21.2.2.196 -

    + +

    The style for the chart. see ECMA Part 1 §21.2.2.196

    @@ -1008,10 +976,9 @@ The style for the chart. see ECMA Part 1 §21.2.2.196
    # File 'lib/axlsx/drawing/chart.rb', line 34
     
    -def style
    -  @style
    -end
    -
    +def style + @style +end @@ -1029,9 +996,8 @@ The style for the chart. see ECMA Part 1 §21.2.2.196

    -

    -The title object for the chart. -

    + +

    The title object for the chart.

    @@ -1065,10 +1031,9 @@ The title object for the chart.
    # File 'lib/axlsx/drawing/chart.rb', line 29
     
    -def title
    -  @title
    -end
    -
    +def title + @title +end @@ -1086,9 +1051,8 @@ The title object for the chart.

    -

    -The 3D view properties for the chart -

    + +

    The 3D view properties for the chart

    @@ -1109,10 +1073,9 @@ The 3D view properties for the chart
    # File 'lib/axlsx/drawing/chart.rb', line 10
     
    -def view3D
    -  @view3D
    -end
    -
    +def view3D + @view3D +end @@ -1134,9 +1097,8 @@ The 3D view properties for the chart

    -

    -Adds a new series to the chart’s series collection. -

    + +

    Adds a new series to the chart's series collection.

    @@ -1178,11 +1140,10 @@ Adds a new series to the chart’s series collection.
    # File 'lib/axlsx/drawing/chart.rb', line 106
     
    -def add_series(options={})
    -  @series_type.new(self, options)
    -  @series.last
    -end
    -
    +def add_series(options={}) + @series_type.new(self, options) + @series.last +end @@ -1197,10 +1158,9 @@ Adds a new series to the chart’s series collection.

    -

    -This is a short cut method to set the end anchor position If you need finer -granularity in positioning use graphic_frame.anchor.to.colOff / rowOff -

    + +

    This is a short cut method to set the end anchor position If you need finer +granularity in positioning use graphic_frame.anchor.to.colOff / rowOff

    @@ -1219,9 +1179,8 @@ granularity in positioning use graphic_frame.anchor.to.colOff / rowOff — -

    -The column -

    +
    +

    The column

    @@ -1236,9 +1195,8 @@ The column — -

    -The row -

    +
    +

    The row

    @@ -1273,11 +1231,10 @@ The row
    # File 'lib/axlsx/drawing/chart.rb', line 154
     
    -def end_at(x, y)
    -  @graphic_frame.anchor.to.col = x
    -  @graphic_frame.anchor.to.row = y
    -end
    -
    +def end_at(x, y) + @graphic_frame.anchor.to.col = x + @graphic_frame.anchor.to.row = y +end @@ -1295,16 +1252,14 @@ The row
    Note: -

    -This will be disconinued in version 2.0.0. please use the start_at method -

    +
    +

    This will be disconinued in version 2.0.0. please use the start_at method

    -

    -backwards compatibility to allow chart.to and chart.from access to anchor -markers -

    + +

    backwards compatibility to allow chart.to and chart.from access to anchor +markers

    @@ -1325,10 +1280,9 @@ markers
    # File 'lib/axlsx/drawing/chart.rb', line 99
     
    -def from
    -  @graphic_frame.anchor.from
    -end
    -
    +def from + @graphic_frame.anchor.from +end @@ -1343,9 +1297,8 @@ markers

    -

    -The index of this chart in the workbooks charts collection -

    + +

    The index of this chart in the workbooks charts collection

    @@ -1379,10 +1332,9 @@ The index of this chart in the workbooks charts collection
    # File 'lib/axlsx/drawing/chart.rb', line 61
     
    -def index
    -  @graphic_frame.anchor.drawing.worksheet.workbook.charts.index(self)
    -end
    -
    +def index + @graphic_frame.anchor.drawing.worksheet.workbook.charts.index(self) +end @@ -1397,9 +1349,8 @@ The index of this chart in the workbooks charts collection

    -

    -The part name for this chart -

    + +

    The part name for this chart

    @@ -1433,10 +1384,9 @@ The part name for this chart
    # File 'lib/axlsx/drawing/chart.rb', line 67
     
    -def pn
    -  "#{CHART_PN % (index+1)}"
    -end
    -
    +def pn + "#{CHART_PN % (index+1)}" +end @@ -1451,11 +1401,10 @@ The part name for this chart

    -

    -This is a short cut method to set the start anchor position If you need + +

    This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff -

    +rowOff

    @@ -1474,9 +1423,8 @@ rowOff — -

    -The column -

    +
    +

    The column

    @@ -1491,9 +1439,8 @@ The column — -

    -The row -

    +
    +

    The row

    @@ -1528,11 +1475,10 @@ The row
    # File 'lib/axlsx/drawing/chart.rb', line 143
     
    -def start_at(x, y)
    -  @graphic_frame.anchor.from.col = x
    -  @graphic_frame.anchor.from.row = y
    -end
    -
    +def start_at(x, y) + @graphic_frame.anchor.from.col = x + @graphic_frame.anchor.from.row = y +end @@ -1550,16 +1496,14 @@ The row
    Note: -

    -This will be disconinued in version 2.0.0. Please use the end_at method -

    +
    +

    This will be disconinued in version 2.0.0. Please use the end_at method

    -

    -backwards compatibility to allow chart.to and chart.from access to anchor -markers -

    + +

    backwards compatibility to allow chart.to and chart.from access to anchor +markers

    @@ -1580,10 +1524,9 @@ markers
    # File 'lib/axlsx/drawing/chart.rb', line 93
     
    -def to
    -  @graphic_frame.anchor.to
    -end
    -
    +def to + @graphic_frame.anchor.to +end @@ -1598,9 +1541,8 @@ markers

    -

    -Chart Serialization serializes the chart -

    + +

    Chart Serialization serializes the chart

    @@ -1641,30 +1583,29 @@ Chart Serialization serializes the chart
    # File 'lib/axlsx/drawing/chart.rb', line 113
     
    -def to_xml
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.send('c:chartSpace',:'xmlns:c' => XML_NS_C, :'xmlns:a' => XML_NS_A) {
    -      xml.send('c:date1904', :val=>Axlsx::Workbook.date1904)
    -      xml.send('c:style', :val=>style)
    -      xml.send('c:chart') {
    -        @title.to_xml(xml) unless @title.nil?
    -        @view3D.to_xml(xml) unless @view3D.nil?
    -        xml.send('c:plotArea') {
    -          xml.send('c:layout')
    -          yield xml if block_given?
    -        }
    -        if @show_legend
    -          xml.send('c:legend') {
    -            xml.send('c:legendPos', :val => "r")
    -            xml.send('c:layout')
    -          }
    -        end
    -      }
    -    }
    -  end
    -  builder.to_xml
    -end
    -
    +def to_xml + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.send('c:chartSpace',:xmlns:c' => XML_NS_C, :xmlns:a' => XML_NS_A) { + xml.send('c:date1904', :val=>Axlsx::Workbook.date1904) + xml.send('c:style', :val=>style) + xml.send('c:chart') { + @title.to_xml(xml) unless @title.nil? + @view3D.to_xml(xml) unless @view3D.nil? + xml.send('c:plotArea') { + xml.send('c:layout') + yield xml if block_given? + } + if @show_legend + xml.send('c:legend') { + xml.send('c:legendPos', :val => "r") + xml.send('c:layout') + } + end + } + } + end + builder.to_xml +end @@ -1675,9 +1616,9 @@ Chart Serialization serializes the chart
    diff --git a/doc/Axlsx/Color.html b/doc/Axlsx/Color.html index cabe0d1d..9ea589ac 100644 --- a/doc/Axlsx/Color.html +++ b/doc/Axlsx/Color.html @@ -94,9 +94,8 @@

    Overview

    -

    -The color class represents a color used for borders, fills an fonts -

    + +

    The color class represents a color used for borders, fills an fonts

    @@ -128,9 +127,8 @@ The color class represents a color used for borders, fills an fonts -

    -Determines if the color is system color dependant. -

    +
    +

    Determines if the color is system color dependant.

    @@ -155,9 +153,8 @@ Determines if the color is system color dependant. -

    -The color as defined in rgb terms. -

    +
    +

    The color as defined in rgb terms.

    @@ -182,9 +179,8 @@ The color as defined in rgb terms. -

    -The tint value. -

    +
    +

    The tint value.

    @@ -221,9 +217,8 @@ The tint value. -

    -Creates a new Color object. -

    +
    +

    Creates a new Color object.

    @@ -245,9 +240,8 @@ Creates a new Color object. -

    -Serializes the color. -

    +
    +

    Serializes the color.

    @@ -268,9 +262,8 @@ Serializes the color.

    -

    -Creates a new Color object -

    + +

    Creates a new Color object

    @@ -291,9 +284,8 @@ Creates a new Color object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -353,13 +345,12 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/color.rb', line 34
     
    -def initialize(options={})
    -  @rgb = "FF000000"
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -end
    -
    +def initialize(options={}) + @rgb = "FF000000" + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -382,9 +373,8 @@ a customizable set of options

    -

    -Determines if the color is system color dependant -

    + +

    Determines if the color is system color dependant

    @@ -418,10 +408,9 @@ Determines if the color is system color dependant
    # File 'lib/axlsx/stylesheet/color.rb', line 6
     
    -def auto
    -  @auto
    -end
    -
    +def auto + @auto +end @@ -442,16 +431,14 @@ Determines if the color is system color dependant
    Note: -

    -rgb colors need to conform to ST_UnsignedIntHex. That basically means put -‘FF’ before you color -

    +
    +

    rgb colors need to conform to ST_UnsignedIntHex. That basically means put +'FF' before you color

    -

    -The color as defined in rgb terms. -

    + +

    The color as defined in rgb terms.

    @@ -461,13 +448,11 @@ The color as defined in rgb terms.

    Examples:

    -

    -rgb colors -

    +

    +

    rgb colors

    -
    "FF000000" is black
    -"FFFFFFFF" is white
    -
    +
    "FF000000" is black
    +"FFFFFFFF" is white
    @@ -498,10 +483,9 @@ rgb colors
    # File 'lib/axlsx/stylesheet/color.rb', line 19
     
    -def rgb
    -  @rgb
    -end
    -
    +def rgb + @rgb +end @@ -522,15 +506,13 @@ rgb colors
    Note: -

    -valid values are between -1.0 and 1.0 -

    +
    +

    valid values are between -1.0 and 1.0

    -

    -The tint value. -

    + +

    The tint value.

    @@ -564,10 +546,9 @@ The tint value.
    # File 'lib/axlsx/stylesheet/color.rb', line 28
     
    -def tint
    -  @tint
    -end
    -
    +def tint + @tint +end @@ -589,9 +570,8 @@ The tint value.

    -

    -Serializes the color -

    + +

    Serializes the color

    @@ -610,9 +590,8 @@ Serializes the color — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -644,8 +623,7 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/color.rb', line 57
     
    -def to_xml(xml) xml.color(self.instance_values) end
    -
    +def to_xml(xml) xml.color(self.instance_values) end @@ -656,9 +634,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/ContentType.html b/doc/Axlsx/ContentType.html index 70bd847c..d89927b6 100644 --- a/doc/Axlsx/ContentType.html +++ b/doc/Axlsx/ContentType.html @@ -96,10 +96,9 @@

    Overview

    -

    -ContentTypes used in the package. This is automatcially managed by the -package package. -

    + +

    ContentTypes used in the package. This is automatcially managed by the +package package.

    @@ -150,9 +149,8 @@ package package. -

    -A new instance of ContentType. -

    +
    +

    A new instance of ContentType.

    @@ -174,9 +172,8 @@ A new instance of ContentType. -

    -Generates the xml document for [Content_Types].xml. -

    +
    +

    Generates the xml document for [Content_Types].xml.

    @@ -202,9 +199,8 @@ Generates the xml document for [Content_Types].xml.

    -

    -A new instance of ContentType -

    + +

    A new instance of ContentType

    @@ -225,10 +221,9 @@ A new instance of ContentType
    # File 'lib/axlsx/content_type/content_type.rb', line 8
     
    -def initialize
    -  super [Override, Default]
    -end
    -
    +def initialize + super [Override, Default] +end @@ -260,9 +255,8 @@ A new instance of ContentType

    -

    -Generates the xml document for [Content_Types].xml -

    + +

    Generates the xml document for [Content_Types].xml

    @@ -280,9 +274,8 @@ Generates the xml document for [Content_Types].xml — -

    -The document as a string. -

    +
    +

    The document as a string.

    @@ -307,15 +300,14 @@ The document as a string.
    # File 'lib/axlsx/content_type/content_type.rb', line 14
     
    -def to_xml()
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.Types(:xmlns => Axlsx::XML_NS_T) {
    -      each { |type| type.to_xml(xml) }
    -    }
    -  end
    -  builder.to_xml
    -end
    -
    +def to_xml() + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.Types(:xmlns => Axlsx::XML_NS_T) { + each { |type| type.to_xml(xml) } + } + end + builder.to_xml +end @@ -326,9 +318,9 @@ The document as a string.
    diff --git a/doc/Axlsx/Core.html b/doc/Axlsx/Core.html index 37251c2a..d12bac9f 100644 --- a/doc/Axlsx/Core.html +++ b/doc/Axlsx/Core.html @@ -97,15 +97,13 @@
    Note: -

    -Packages manage their own core object. -

    +
    +

    Packages manage their own core object.

    -

    -The core object for the package. -

    + +

    The core object for the package.

    @@ -144,9 +142,8 @@ The core object for the package. -

    -The author of the document. -

    +
    +

    The author of the document.

    @@ -183,9 +180,8 @@ The author of the document. -

    -Creates a new Core object. -

    +
    +

    Creates a new Core object.

    @@ -207,9 +203,8 @@ Creates a new Core object. -

    -Serializes the core object. -

    +
    +

    Serializes the core object.

    @@ -230,9 +225,8 @@ Serializes the core object.

    -

    -Creates a new Core object. -

    + +

    Creates a new Core object.

    @@ -253,9 +247,8 @@ Creates a new Core object. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -294,10 +287,9 @@ a customizable set of options
    # File 'lib/axlsx/doc_props/core.rb', line 12
     
    -def initialize(options={})
    -  @creator = options[:creator] || 'axlsx'      
    -end
    -
    +def initialize(options={}) + @creator = options[:creator] || 'axlsx' +end @@ -320,9 +312,8 @@ a customizable set of options

    -

    -The author of the document. By default this is ‘axlsx’ -

    + +

    The author of the document. By default this is 'axlsx'

    @@ -356,10 +347,9 @@ The author of the document. By default this is ‘axlsx’
    # File 'lib/axlsx/doc_props/core.rb', line 8
     
    -def creator
    -  @creator
    -end
    -
    +def creator + @creator +end @@ -381,10 +371,9 @@ The author of the document. By default this is ‘axlsx’

    -

    -Serializes the core object. The created dcterms item is set to the current -time when this method is called. -

    + +

    Serializes the core object. The created dcterms item is set to the current +time when this method is called.

    @@ -430,22 +419,21 @@ time when this method is called.
    # File 'lib/axlsx/doc_props/core.rb', line 18
     
    -def to_xml()
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.send('cp:coreProperties', 
    -             :"xmlns:cp" => CORE_NS, 
    -             :'xmlns:dc' => CORE_NS_DC, 
    -             :'xmlns:dcmitype'=>CORE_NS_DCMIT, 
    -             :'xmlns:dcterms'=>CORE_NS_DCT, 
    -             :'xmlns:xsi'=>CORE_NS_XSI) {
    -      xml['dc'].creator self.creator
    -      xml['dcterms'].created Time.now.strftime('%Y-%m-%dT%H:%M:%S'), :'xsi:type'=>"dcterms:W3CDTF"
    -      xml['cp'].revision 0
    -    }
    -  end  
    -  builder.to_xml
    -end
    -
    +def to_xml() + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.send('cp:coreProperties', + :xmlns:cp" => CORE_NS, + :xmlns:dc' => CORE_NS_DC, + :xmlns:dcmitype'=>CORE_NS_DCMIT, + :xmlns:dcterms'=>CORE_NS_DCT, + :xmlns:xsi'=>CORE_NS_XSI) { + xml['dc'].creator self.creator + xml['dcterms'].created Time.now.strftime('%Y-%m-%dT%H:%M:%S'), :xsi:type'=>"dcterms:W3CDTF" + xml['cp'].revision 0 + } + end + builder.to_xml +end @@ -456,9 +444,9 @@ time when this method is called.
    diff --git a/doc/Axlsx/DataTypeValidator.html b/doc/Axlsx/DataTypeValidator.html index ee08feeb..11225234 100644 --- a/doc/Axlsx/DataTypeValidator.html +++ b/doc/Axlsx/DataTypeValidator.html @@ -94,11 +94,10 @@

    Overview

    -

    -Validate that the class of the value provided is either an instance or the + +

    Validate that the class of the value provided is either an instance or the class of the allowed types and that any specified additional validation -returns true. -

    +returns true.

    @@ -135,9 +134,8 @@ returns true. -

    -Perform validation. -

    +
    +

    Perform validation.

    @@ -161,9 +159,8 @@ Perform validation.

    -

    -Perform validation -

    + +

    Perform validation

    @@ -182,9 +179,8 @@ Perform validation — -

    -The name of what is being validated. This is included in the error message -

    +
    +

    The name of what is being validated. This is included in the error message

    @@ -199,9 +195,8 @@ The name of what is being validated. This is included in the error message — -

    -A single class or array of classes that the value is validated against. -

    +
    +

    A single class or array of classes that the value is validated against.

    @@ -218,9 +213,8 @@ A single class or array of classes that the value is validated against. — -

    -Any block that must evaluate to true for the value to be valid -

    +
    +

    Any block that must evaluate to true for the value to be valid

    @@ -238,9 +232,8 @@ Any block that must evaluate to true for the value to be valid — -

    -true if validation succeeds. -

    +
    +

    true if validation succeeds.

    @@ -257,10 +250,9 @@ true if validation succeeds. — -

    -Raised if the class of the value provided is not in the specified array of -types or the block passed returns false -

    +
    +

    Raised if the class of the value provided is not in the specified array of +types or the block passed returns false

    @@ -294,17 +286,16 @@ types or the block passed returns false
    # File 'lib/axlsx/util/validators.rb', line 34
     
    -def self.validate(name, types, v, other= lambda{|arg| true })
    -  types = [types] unless types.is_a? Array
    -  valid_type = false
    -  if v.class == Class
    -    types.each { |t| valid_type = true if v.ancestors.include?(t) }
    -  else
    -    types.each { |t| valid_type = true if v.is_a?(t) }
    -  end
    -  raise ArgumentError, (ERR_TYPE % [v.inspect, name, types.inspect]) unless (other.call(v) && valid_type)
    -end
    -
    +def self.validate(name, types, v, other= lambda{|arg| true }) + types = [types] unless types.is_a? Array + valid_type = false + if v.class == Class + types.each { |t| valid_type = true if v.ancestors.include?(t) } + else + types.each { |t| valid_type = true if v.is_a?(t) } + end + raise ArgumentError, (ERR_TYPE % [v.inspect, name, types.inspect]) unless (other.call(v) && valid_type) +end @@ -315,9 +306,9 @@ types or the block passed returns false
    diff --git a/doc/Axlsx/Default.html b/doc/Axlsx/Default.html index 7f380873..898601b5 100644 --- a/doc/Axlsx/Default.html +++ b/doc/Axlsx/Default.html @@ -94,10 +94,9 @@

    Overview

    -

    -An default content part. These parts are automatically created by for you -based on the content of your package. -

    + +

    An default content part. These parts are automatically created by for you +based on the content of your package.

    @@ -129,9 +128,8 @@ based on the content of your package. -

    -The type of content. -

    +
    +

    The type of content.

    @@ -156,9 +154,8 @@ The type of content. -

    -The extension of the content type. -

    +
    +

    The extension of the content type.

    @@ -195,9 +192,8 @@ The extension of the content type. -

    -Creates a new Default object. -

    +
    +

    Creates a new Default object.

    @@ -219,9 +215,8 @@ Creates a new Default object. -

    -Serializes the object to xml. -

    +
    +

    Serializes the object to xml.

    @@ -242,9 +237,8 @@ Serializes the object to xml.

    -

    -Creates a new Default object -

    + +

    Creates a new Default object

    @@ -265,9 +259,8 @@ Creates a new Default object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -312,10 +305,9 @@ a customizable set of options — -

    -An argument error is raised if both Extension and ContentType are not -specified. -

    +
    +

    An argument error is raised if both Extension and ContentType are not +specified.

    @@ -338,13 +330,12 @@ specified.
    # File 'lib/axlsx/content_type/default.rb', line 17
     
    -def initialize(options={})
    -  raise ArgumentError, "Extension and ContentType are required" unless options[:Extension] && options[:ContentType]
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end      
    -end
    -
    +def initialize(options={}) + raise ArgumentError, "Extension and ContentType are required" unless options[:Extension] && options[:ContentType] + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -367,9 +358,8 @@ specified.

    -

    -The type of content. -

    + +

    The type of content.

    @@ -403,10 +393,9 @@ The type of content.
    # File 'lib/axlsx/content_type/default.rb', line 11
     
    -def ContentType
    -  @ContentType
    -end
    -
    +def ContentType + @ContentType +end @@ -424,9 +413,8 @@ The type of content.

    -

    -The extension of the content type. -

    + +

    The extension of the content type.

    @@ -460,10 +448,9 @@ The extension of the content type.
    # File 'lib/axlsx/content_type/default.rb', line 7
     
    -def Extension
    -  @Extension
    -end
    -
    +def Extension + @Extension +end @@ -485,9 +472,8 @@ The extension of the content type.

    -

    -Serializes the object to xml -

    + +

    Serializes the object to xml

    @@ -506,9 +492,8 @@ Serializes the object to xml — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -542,10 +527,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/content_type/default.rb', line 33
     
    -def to_xml(xml)
    -  xml.Default(self.instance_values)
    -end
    -
    +def to_xml(xml) + xml.Default(self.instance_values) +end @@ -556,9 +540,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Drawing.html b/doc/Axlsx/Drawing.html index d0ed25f3..51c5008a 100644 --- a/doc/Axlsx/Drawing.html +++ b/doc/Axlsx/Drawing.html @@ -97,19 +97,17 @@
    Note: -

    -The recommended way to manage drawings is to use the Worksheet.add_chart -method. -

    +
    +

    The recommended way to manage drawings is to use the Worksheet.add_chart +method.

    -

    -A Drawing is a canvas for charts. Each worksheet has a single drawing that + +

    A Drawing is a canvas for charts. Each worksheet has a single drawing that manages anchors. The anchors reference the charts via graphical frames. This is not a trivial relationship so please do follow the advice in the -note. see README for an example of how to create a chart. -

    +note. see README for an example of how to create a chart.

    @@ -150,10 +148,9 @@ note. see README for an example of how to create a chart. -

    -A collection of anchors for this drawing only TwoCellAnchors are supported -in this version. -

    +
    +

    A collection of anchors for this drawing only TwoCellAnchors are supported +in this version.

    @@ -178,9 +175,8 @@ in this version. -

    -The worksheet that owns the drawing. -

    +
    +

    The worksheet that owns the drawing.

    @@ -215,9 +211,8 @@ The worksheet that owns the drawing. -

    -Adds a chart to the drawing. -

    +
    +

    Adds a chart to the drawing.

    @@ -239,9 +234,8 @@ Adds a chart to the drawing. -

    -Adds an image to the chart. -

    +
    +

    Adds an image to the chart.

    @@ -263,9 +257,8 @@ Adds an image to the chart. -

    -An array of charts that are associated with this drawing’s anchors. -

    +
    +

    An array of charts that are associated with this drawing's anchors.

    @@ -287,10 +280,8 @@ An array of charts that are associated with this drawing’s anchors. -

    -An array of image objects that are associated with this drawing’s -anchors. -

    +
    +

    An array of image objects that are associated with this drawing's anchors.

    @@ -312,10 +303,8 @@ anchors. -

    -The index of this drawing in the owning workbooks’s drawings -collection. -

    +
    +

    The index of this drawing in the owning workbooks's drawings collection.

    @@ -339,9 +328,8 @@ collection. -

    -Creates a new Drawing object. -

    +
    +

    Creates a new Drawing object.

    @@ -363,9 +351,8 @@ Creates a new Drawing object. -

    -The part name for this drawing. -

    +
    +

    The part name for this drawing.

    @@ -387,9 +374,8 @@ The part name for this drawing. -

    -The drawing’s relationships. -

    +
    +

    The drawing's relationships.

    @@ -411,9 +397,8 @@ The drawing’s relationships. -

    -The relational part name for this drawing. -

    +
    +

    The relational part name for this drawing.

    @@ -435,9 +420,8 @@ The relational part name for this drawing. -

    -The relation reference id for this drawing. -

    +
    +

    The relation reference id for this drawing.

    @@ -459,9 +443,8 @@ The relation reference id for this drawing. -

    -Serializes the drawing. -

    +
    +

    Serializes the drawing.

    @@ -482,9 +465,8 @@ Serializes the drawing.

    -

    -Creates a new Drawing object -

    + +

    Creates a new Drawing object

    @@ -503,9 +485,8 @@ Creates a new Drawing object — -

    -The worksheet that owns this drawing -

    +
    +

    The worksheet that owns this drawing

    @@ -529,13 +510,12 @@ The worksheet that owns this drawing
    # File 'lib/axlsx/drawing/drawing.rb', line 52
     
    -def initialize(worksheet)
    -  DataTypeValidator.validate "Drawing.worksheet", Worksheet, worksheet
    -  @worksheet = worksheet
    -  @worksheet.workbook.drawings << self
    -  @anchors = SimpleTypedList.new [TwoCellAnchor, OneCellAnchor]
    -end
    -
    +def initialize(worksheet) + DataTypeValidator.validate "Drawing.worksheet", Worksheet, worksheet + @worksheet = worksheet + @worksheet.workbook.drawings << self + @anchors = SimpleTypedList.new [TwoCellAnchor, OneCellAnchor] +end @@ -558,10 +538,9 @@ The worksheet that owns this drawing

    -

    -A collection of anchors for this drawing only TwoCellAnchors are supported -in this version -

    + +

    A collection of anchors for this drawing only TwoCellAnchors are supported +in this version

    @@ -595,10 +574,9 @@ in this version
    # File 'lib/axlsx/drawing/drawing.rb', line 48
     
    -def anchors
    -  @anchors
    -end
    -
    +def anchors + @anchors +end @@ -616,9 +594,8 @@ in this version

    -

    -The worksheet that owns the drawing -

    + +

    The worksheet that owns the drawing

    @@ -652,10 +629,9 @@ The worksheet that owns the drawing
    # File 'lib/axlsx/drawing/drawing.rb', line 43
     
    -def worksheet
    -  @worksheet
    -end
    -
    +def worksheet + @worksheet +end @@ -680,16 +656,14 @@ The worksheet that owns the drawing
    Note: -

    -The recommended way to manage charts is to use Worksheet.add_chart. Please -refer to that method for documentation. -

    +
    +

    The recommended way to manage charts is to use Worksheet.add_chart. Please +refer to that method for documentation.

    -

    -Adds a chart to the drawing. -

    + +

    Adds a chart to the drawing.

    @@ -718,11 +692,10 @@ Adds a chart to the drawing.
    # File 'lib/axlsx/drawing/drawing.rb', line 70
     
    -def add_chart(chart_type, options={})
    -  TwoCellAnchor.new(self, options)
    -  @anchors.last.add_chart(chart_type, options)
    -end
    -
    +def add_chart(chart_type, options={}) + TwoCellAnchor.new(self, options) + @anchors.last.add_chart(chart_type, options) +end @@ -740,16 +713,14 @@ Adds a chart to the drawing.
    Note: -

    -The recommended way to manage images is to use Worksheet.add_image. Please -refer to that method for documentation. -

    +
    +

    The recommended way to manage images is to use Worksheet.add_image. Please +refer to that method for documentation.

    -

    -Adds an image to the chart -

    + +

    Adds an image to the chart

    @@ -778,11 +749,10 @@ Adds an image to the chart
    # File 'lib/axlsx/drawing/drawing.rb', line 62
     
    -def add_image(options={})
    -  OneCellAnchor.new(self, options)
    -  @anchors.last.object
    -end
    -
    +def add_image(options={}) + OneCellAnchor.new(self, options) + @anchors.last.object +end @@ -797,9 +767,8 @@ Adds an image to the chart

    -

    -An array of charts that are associated with this drawing’s anchors -

    + +

    An array of charts that are associated with this drawing's anchors

    @@ -834,11 +803,10 @@ An array of charts that are associated with this drawing’s anchors
    # File 'lib/axlsx/drawing/drawing.rb', line 77
     
    -def charts
    -  charts = @anchors.select { |a| a.object.is_a?(GraphicFrame) }
    -  charts.map { |a| a.object.chart }
    -end
    -
    +def charts + charts = @anchors.select { |a| a.object.is_a?(GraphicFrame) } + charts.map { |a| a.object.chart } +end @@ -853,10 +821,8 @@ An array of charts that are associated with this drawing’s anchors

    -

    -An array of image objects that are associated with this drawing’s -anchors -

    + +

    An array of image objects that are associated with this drawing's anchors

    @@ -891,11 +857,10 @@ anchors
    # File 'lib/axlsx/drawing/drawing.rb', line 84
     
    -def images
    -  images = @anchors.select { |a| a.object.is_a?(Pic) }
    -  images.map { |a| a.object }
    -end
    -
    +def images + images = @anchors.select { |a| a.object.is_a?(Pic) } + images.map { |a| a.object } +end @@ -910,10 +875,8 @@ anchors

    -

    -The index of this drawing in the owning workbooks’s drawings -collection. -

    + +

    The index of this drawing in the owning workbooks's drawings collection.

    @@ -947,10 +910,9 @@ collection.
    # File 'lib/axlsx/drawing/drawing.rb', line 91
     
    -def index
    -  @worksheet.workbook.drawings.index(self)
    -end
    -
    +def index + @worksheet.workbook.drawings.index(self) +end @@ -965,9 +927,8 @@ collection.

    -

    -The part name for this drawing -

    + +

    The part name for this drawing

    @@ -1001,10 +962,9 @@ The part name for this drawing
    # File 'lib/axlsx/drawing/drawing.rb', line 103
     
    -def pn
    -  "#{DRAWING_PN % (index+1)}"
    -end
    -
    +def pn + "#{DRAWING_PN % (index+1)}" +end @@ -1019,9 +979,8 @@ The part name for this drawing

    -

    -The drawing’s relationships. -

    + +

    The drawing's relationships.

    @@ -1062,17 +1021,16 @@ The drawing’s relationships.
    # File 'lib/axlsx/drawing/drawing.rb', line 115
     
    -def relationships
    -  r = Relationships.new
    -  charts.each do |chart|
    -    r << Relationship.new(CHART_R, "../#{chart.pn}")
    -  end
    -  images.each do |image|
    -    r << Relationship.new(IMAGE_R, "../#{image.pn}")
    -  end
    -  r
    -end
    -
    +def relationships + r = Relationships.new + charts.each do |chart| + r << Relationship.new(CHART_R, "../#{chart.pn}") + end + images.each do |image| + r << Relationship.new(IMAGE_R, "../#{image.pn}") + end + r +end @@ -1087,9 +1045,8 @@ The drawing’s relationships.

    -

    -The relational part name for this drawing -

    + +

    The relational part name for this drawing

    @@ -1123,10 +1080,9 @@ The relational part name for this drawing
    # File 'lib/axlsx/drawing/drawing.rb', line 109
     
    -def rels_pn
    -  "#{DRAWING_RELS_PN % (index+1)}"
    -end
    -
    +def rels_pn + "#{DRAWING_RELS_PN % (index+1)}" +end @@ -1141,9 +1097,8 @@ The relational part name for this drawing

    -

    -The relation reference id for this drawing -

    + +

    The relation reference id for this drawing

    @@ -1177,10 +1132,9 @@ The relation reference id for this drawing
    # File 'lib/axlsx/drawing/drawing.rb', line 97
     
    -def rId
    -  "rId#{index+1}"
    -end
    -
    +def rId + "rId#{index+1}" +end @@ -1195,9 +1149,8 @@ The relation reference id for this drawing

    -

    -Serializes the drawing -

    + +

    Serializes the drawing

    @@ -1236,15 +1189,14 @@ Serializes the drawing
    # File 'lib/axlsx/drawing/drawing.rb', line 128
     
    -def to_xml
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.send('xdr:wsDr', :'xmlns:xdr'=>XML_NS_XDR, :'xmlns:a'=>XML_NS_A) {
    -      anchors.each {|anchor| anchor.to_xml(xml) }
    -    }        
    -  end
    -  builder.to_xml
    -end
    -
    +def to_xml + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.send('xdr:wsDr', :xmlns:xdr'=>XML_NS_XDR, :xmlns:a'=>XML_NS_A) { + anchors.each {|anchor| anchor.to_xml(xml) } + } + end + builder.to_xml +end @@ -1255,9 +1207,9 @@ Serializes the drawing
    diff --git a/doc/Axlsx/Fill.html b/doc/Axlsx/Fill.html index 3171e6b2..38b18ba8 100644 --- a/doc/Axlsx/Fill.html +++ b/doc/Axlsx/Fill.html @@ -97,17 +97,15 @@
    Note: -

    -The recommended way to manage styles in your workbook is to use -Styles#add_style. -

    +
    +

    The recommended way to manage styles in your workbook is to use +Styles#add_style.

    -

    -The Fill is a formatting object that manages the background color, and -pattern for cells. -

    + +

    The Fill is a formatting object that manages the background color, and +pattern for cells.

    @@ -150,9 +148,8 @@ pattern for cells. -

    -The type of fill. -

    +
    +

    The type of fill.

    @@ -189,9 +186,8 @@ The type of fill. -

    -Creates a new Fill object. -

    +
    +

    Creates a new Fill object.

    @@ -213,9 +209,8 @@ Creates a new Fill object. -

    -Serializes the fill. -

    +
    +

    Serializes the fill.

    @@ -236,9 +231,8 @@ Serializes the fill.

    -

    -Creates a new Fill object -

    + +

    Creates a new Fill object

    @@ -271,9 +265,8 @@ Creates a new Fill object — -

    -if the fill_type parameter is not a PatternFill or a GradientFill instance -

    +
    +

    if the fill_type parameter is not a PatternFill or a GradientFill instance

    @@ -293,10 +286,9 @@ if the fill_type parameter is not a PatternFill or a GradientFill instance
    # File 'lib/axlsx/stylesheet/fill.rb', line 16
     
    -def initialize(fill_type)
    -  self.fill_type = fill_type
    -end
    -
    +def initialize(fill_type) + self.fill_type = fill_type +end @@ -319,9 +311,8 @@ if the fill_type parameter is not a PatternFill or a GradientFill instance

    -

    -The type of fill -

    + +

    The type of fill

    @@ -355,10 +346,9 @@ The type of fill
    # File 'lib/axlsx/stylesheet/fill.rb', line 11
     
    -def fill_type
    -  @fill_type
    -end
    -
    +def fill_type + @fill_type +end @@ -380,9 +370,8 @@ The type of fill

    -

    -Serializes the fill -

    + +

    Serializes the fill

    @@ -401,9 +390,8 @@ Serializes the fill — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -437,10 +425,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/fill.rb', line 23
     
    -def to_xml(xml)
    -  xml.fill { @fill_type.to_xml(xml) }
    -end
    -
    +def to_xml(xml) + xml.fill { @fill_type.to_xml(xml) } +end @@ -451,9 +438,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Font.html b/doc/Axlsx/Font.html index 80ee6bd2..8b6156c5 100644 --- a/doc/Axlsx/Font.html +++ b/doc/Axlsx/Font.html @@ -97,15 +97,13 @@
    Note: -

    -The recommended way to manage fonts, and other styles is Styles#add_style -

    +
    +

    The recommended way to manage fonts, and other styles is Styles#add_style

    -

    -The Font class details a font instance for use in styling cells. -

    + +

    The Font class details a font instance for use in styling cells.

    @@ -144,9 +142,8 @@ The Font class details a font instance for use in styling cells. -

    -Indicates if the font should be rendered in bold. -

    +
    +

    Indicates if the font should be rendered in bold.

    @@ -171,9 +168,8 @@ Indicates if the font should be rendered in bold. -

    -The charset of the font. -

    +
    +

    The charset of the font.

    @@ -198,9 +194,8 @@ The charset of the font. -

    -The color of the font. -

    +
    +

    The color of the font.

    @@ -225,9 +220,8 @@ The color of the font. -

    -Indicates if the font should be condensed. -

    +
    +

    Indicates if the font should be condensed.

    @@ -252,9 +246,8 @@ Indicates if the font should be condensed. -

    -The font’s extend property. -

    +
    +

    The font's extend property.

    @@ -279,9 +272,8 @@ The font’s extend property. -

    -The font’s family. -

    +
    +

    The font's family.

    @@ -306,9 +298,8 @@ The font’s family. -

    -Indicates if the font should be rendered italicized. -

    +
    +

    Indicates if the font should be rendered italicized.

    @@ -333,9 +324,8 @@ Indicates if the font should be rendered italicized. -

    -The name of the font. -

    +
    +

    The name of the font.

    @@ -360,9 +350,8 @@ The name of the font. -

    -Indicates if the font should be rendered with an outline. -

    +
    +

    Indicates if the font should be rendered with an outline.

    @@ -387,9 +376,8 @@ Indicates if the font should be rendered with an outline. -

    -Indicates if the font should be rendered with a shadow. -

    +
    +

    Indicates if the font should be rendered with a shadow.

    @@ -414,9 +402,8 @@ Indicates if the font should be rendered with a shadow. -

    -Indicates if the font should be rendered with a strikthrough. -

    +
    +

    Indicates if the font should be rendered with a strikthrough.

    @@ -441,9 +428,8 @@ Indicates if the font should be rendered with a strikthrough. -

    -The size of the font. -

    +
    +

    The size of the font.

    @@ -480,9 +466,8 @@ The size of the font. -

    -Creates a new Font. -

    +
    +

    Creates a new Font.

    @@ -504,9 +489,8 @@ Creates a new Font. -

    -Serializes the fill. -

    +
    +

    Serializes the fill.

    @@ -527,9 +511,8 @@ Serializes the fill.

    -

    -Creates a new Font -

    + +

    Creates a new Font

    @@ -550,9 +533,8 @@ Creates a new Font — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -701,12 +683,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/font.rb', line 98
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -729,9 +710,8 @@ a customizable set of options

    -

    -Indicates if the font should be rendered in bold -

    + +

    Indicates if the font should be rendered in bold

    @@ -765,10 +745,9 @@ Indicates if the font should be rendered in bold
    # File 'lib/axlsx/stylesheet/font.rb', line 50
     
    -def b
    -  @b
    -end
    -
    +def b + @b +end @@ -789,37 +768,34 @@ Indicates if the font should be rendered in bold
    Note: -

    -The following values are defined in the OOXML specification and are OS -dependant values -

    -
    - 0   ANSI_CHARSET
    - 1   DEFAULT_CHARSET
    - 2   SYMBOL_CHARSET
    - 77  MAC_CHARSET
    - 128 SHIFTJIS_CHARSET
    - 129 HANGUL_CHARSET
    - 130 JOHAB_CHARSET
    - 134 GB2312_CHARSET
    - 136 CHINESEBIG5_CHARSET
    - 161 GREEK_CHARSET
    - 162 TURKISH_CHARSET
    - 163 VIETNAMESE_CHARSET
    - 177 HEBREW_CHARSET
    - 178 ARABIC_CHARSET
    - 186 BALTIC_CHARSET
    - 204 RUSSIAN_CHARSET
    - 222 THAI_CHARSET
    - 238 EASTEUROPE_CHARSET
    - 255 OEM_CHARSET
    -
    +
    +

    The following values are defined in the OOXML specification and are OS +dependant values

    + +
    0   ANSI_CHARSET
    +1   DEFAULT_CHARSET
    +2   SYMBOL_CHARSET
    +77  MAC_CHARSET
    +128 SHIFTJIS_CHARSET
    +129 HANGUL_CHARSET
    +130 JOHAB_CHARSET
    +134 GB2312_CHARSET
    +136 CHINESEBIG5_CHARSET
    +161 GREEK_CHARSET
    +162 TURKISH_CHARSET
    +163 VIETNAMESE_CHARSET
    +177 HEBREW_CHARSET
    +178 ARABIC_CHARSET
    +186 BALTIC_CHARSET
    +204 RUSSIAN_CHARSET
    +222 THAI_CHARSET
    +238 EASTEUROPE_CHARSET
    +255 OEM_CHARSET
    -

    -The charset of the font -

    + +

    The charset of the font

    @@ -853,10 +829,9 @@ The charset of the font
    # File 'lib/axlsx/stylesheet/font.rb', line 33
     
    -def charset
    -  @charset
    -end
    -
    +def charset + @charset +end @@ -874,9 +849,8 @@ The charset of the font

    -

    -The color of the font -

    + +

    The color of the font

    @@ -910,10 +884,9 @@ The color of the font
    # File 'lib/axlsx/stylesheet/font.rb', line 78
     
    -def color
    -  @color
    -end
    -
    +def color + @color +end @@ -931,9 +904,8 @@ The color of the font

    -

    -Indicates if the font should be condensed -

    + +

    Indicates if the font should be condensed

    @@ -967,10 +939,9 @@ Indicates if the font should be condensed
    # File 'lib/axlsx/stylesheet/font.rb', line 70
     
    -def condense
    -  @condense
    -end
    -
    +def condense + @condense +end @@ -988,9 +959,8 @@ Indicates if the font should be condensed

    -

    -The font’s extend property -

    + +

    The font's extend property

    @@ -1024,10 +994,9 @@ The font’s extend property
    # File 'lib/axlsx/stylesheet/font.rb', line 74
     
    -def extend
    -  @extend
    -end
    -
    +def extend + @extend +end @@ -1048,24 +1017,21 @@ The font’s extend property
    Note: -

    -The following are defined OOXML specification -

    -
    - 0 Not applicable.
    - 1 Roman
    - 2 Swiss
    - 3 Modern
    - 4 Script
    - 5 Decorative
    - 6..14 Reserved for future use
    -
    +
    +

    The following are defined OOXML specification

    + +
    0 Not applicable.
    +1 Roman
    +2 Swiss
    +3 Modern
    +4 Script
    +5 Decorative
    +6..14 Reserved for future use
    -

    -The font’s family -

    + +

    The font's family

    @@ -1099,10 +1065,9 @@ The font’s family
    # File 'lib/axlsx/stylesheet/font.rb', line 46
     
    -def family
    -  @family
    -end
    -
    +def family + @family +end @@ -1120,9 +1085,8 @@ The font’s family

    -

    -Indicates if the font should be rendered italicized -

    + +

    Indicates if the font should be rendered italicized

    @@ -1156,10 +1120,9 @@ Indicates if the font should be rendered italicized
    # File 'lib/axlsx/stylesheet/font.rb', line 54
     
    -def i
    -  @i
    -end
    -
    +def i + @i +end @@ -1177,9 +1140,8 @@ Indicates if the font should be rendered italicized

    -

    -The name of the font -

    + +

    The name of the font

    @@ -1213,10 +1175,9 @@ The name of the font
    # File 'lib/axlsx/stylesheet/font.rb', line 8
     
    -def name
    -  @name
    -end
    -
    +def name + @name +end @@ -1234,9 +1195,8 @@ The name of the font

    -

    -Indicates if the font should be rendered with an outline -

    + +

    Indicates if the font should be rendered with an outline

    @@ -1270,10 +1230,9 @@ Indicates if the font should be rendered with an outline
    # File 'lib/axlsx/stylesheet/font.rb', line 62
     
    -def outline
    -  @outline
    -end
    -
    +def outline + @outline +end @@ -1291,9 +1250,8 @@ Indicates if the font should be rendered with an outline

    -

    -Indicates if the font should be rendered with a shadow -

    + +

    Indicates if the font should be rendered with a shadow

    @@ -1327,10 +1285,9 @@ Indicates if the font should be rendered with a shadow
    # File 'lib/axlsx/stylesheet/font.rb', line 66
     
    -def shadow
    -  @shadow
    -end
    -
    +def shadow + @shadow +end @@ -1348,9 +1305,8 @@ Indicates if the font should be rendered with a shadow

    -

    -Indicates if the font should be rendered with a strikthrough -

    + +

    Indicates if the font should be rendered with a strikthrough

    @@ -1384,10 +1340,9 @@ Indicates if the font should be rendered with a strikthrough
    # File 'lib/axlsx/stylesheet/font.rb', line 58
     
    -def strike
    -  @strike
    -end
    -
    +def strike + @strike +end @@ -1405,9 +1360,8 @@ Indicates if the font should be rendered with a strikthrough

    -

    -The size of the font. -

    + +

    The size of the font.

    @@ -1441,10 +1395,9 @@ The size of the font.
    # File 'lib/axlsx/stylesheet/font.rb', line 82
     
    -def sz
    -  @sz
    -end
    -
    +def sz + @sz +end @@ -1466,9 +1419,8 @@ The size of the font.

    -

    -Serializes the fill -

    + +

    Serializes the fill

    @@ -1487,9 +1439,8 @@ Serializes the fill — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1527,14 +1478,13 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/font.rb', line 131
     
    -def to_xml(xml)
    -  xml.font {
    -    self.instance_values.each do |k, v|
    -      v.is_a?(Color) ? v.to_xml(xml) : xml.send(k, {:val => v})            
    -    end
    -  }
    -end
    -
    +def to_xml(xml) + xml.font { + self.instance_values.each do |k, v| + v.is_a?(Color) ? v.to_xml(xml) : xml.send(k, {:val => v}) + end + } +end @@ -1545,9 +1495,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/GradientFill.html b/doc/Axlsx/GradientFill.html index 019d2fe8..e29c0524 100644 --- a/doc/Axlsx/GradientFill.html +++ b/doc/Axlsx/GradientFill.html @@ -94,9 +94,8 @@

    Overview

    -

    -A GradientFill defines the color and positioning for gradiant cell fill. -

    + +

    A GradientFill defines the color and positioning for gradiant cell fill.

    @@ -135,9 +134,8 @@ A GradientFill defines the color and positioning for gradiant cell fill. -

    -Percentage format bottom. -

    +
    +

    Percentage format bottom.

    @@ -162,9 +160,8 @@ Percentage format bottom. -

    -Angle of the linear gradient. -

    +
    +

    Angle of the linear gradient.

    @@ -189,9 +186,8 @@ Angle of the linear gradient. -

    -Percentage format left. -

    +
    +

    Percentage format left.

    @@ -216,9 +212,8 @@ Percentage format left. -

    -Percentage format right. -

    +
    +

    Percentage format right.

    @@ -243,9 +238,8 @@ Percentage format right. -

    -Collection of stop objects. -

    +
    +

    Collection of stop objects.

    @@ -270,9 +264,8 @@ Collection of stop objects. -

    -Percentage format top. -

    +
    +

    Percentage format top.

    @@ -297,9 +290,8 @@ Percentage format top. -

    -The type of gradient. -

    +
    +

    The type of gradient.

    @@ -336,9 +328,8 @@ The type of gradient. -

    -Creates a new GradientFill object. -

    +
    +

    Creates a new GradientFill object.

    @@ -360,9 +351,8 @@ Creates a new GradientFill object. -

    -Serializes the gradientFill. -

    +
    +

    Serializes the gradientFill.

    @@ -383,9 +373,8 @@ Serializes the gradientFill.

    -

    -Creates a new GradientFill object -

    + +

    Creates a new GradientFill object

    @@ -406,9 +395,8 @@ Creates a new GradientFill object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -496,14 +484,13 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 46
     
    -def initialize(options={})
    -  options[:type] ||= :linear
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -  @stop = SimpleTypedList.new GradientStop
    -end
    -
    +def initialize(options={}) + options[:type] ||= :linear + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end + @stop = SimpleTypedList.new GradientStop +end @@ -526,9 +513,8 @@ a customizable set of options

    -

    -Percentage format bottom -

    + +

    Percentage format bottom

    @@ -562,10 +548,9 @@ Percentage format bottom
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 33
     
    -def bottom
    -  @bottom
    -end
    -
    +def bottom + @bottom +end @@ -583,9 +568,8 @@ Percentage format bottom

    -

    -Angle of the linear gradient -

    + +

    Angle of the linear gradient

    @@ -619,10 +603,9 @@ Angle of the linear gradient
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 17
     
    -def degree
    -  @degree
    -end
    -
    +def degree + @degree +end @@ -640,9 +623,8 @@ Angle of the linear gradient

    -

    -Percentage format left -

    + +

    Percentage format left

    @@ -676,10 +658,9 @@ Percentage format left
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 21
     
    -def left
    -  @left
    -end
    -
    +def left + @left +end @@ -697,9 +678,8 @@ Percentage format left

    -

    -Percentage format right -

    + +

    Percentage format right

    @@ -733,10 +713,9 @@ Percentage format right
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 25
     
    -def right
    -  @right
    -end
    -
    +def right + @right +end @@ -754,9 +733,8 @@ Percentage format right

    -

    -Collection of stop objects -

    + +

    Collection of stop objects

    @@ -790,10 +768,9 @@ Collection of stop objects
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 37
     
    -def stop
    -  @stop
    -end
    -
    +def stop + @stop +end @@ -811,9 +788,8 @@ Collection of stop objects

    -

    -Percentage format top -

    + +

    Percentage format top

    @@ -847,10 +823,9 @@ Percentage format top
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 29
     
    -def top
    -  @top
    -end
    -
    +def top + @top +end @@ -871,19 +846,16 @@ Percentage format top
    Note: -

    -valid options are -

    -
    - :linear
    - :path
    -
    +
    +

    valid options are

    + +
    :linear
    +:path
    -

    -The type of gradient. -

    + +

    The type of gradient.

    @@ -917,10 +889,9 @@ The type of gradient.
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 13
     
    -def type
    -  @type
    -end
    -
    +def type + @type +end @@ -942,9 +913,8 @@ The type of gradient.

    -

    -Serializes the gradientFill -

    + +

    Serializes the gradientFill

    @@ -963,9 +933,8 @@ Serializes the gradientFill — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1001,12 +970,11 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/gradient_fill.rb', line 70
     
    -def to_xml(xml)
    -  xml.gradientFill(self.instance_values.reject { |k,v| k.to_sym == :stop }) {
    -    @stop.each { |s| s.to_xml(xml) }
    -  }
    -end
    -
    +def to_xml(xml) + xml.gradientFill(self.instance_values.reject { |k,v| k.to_sym == :stop }) { + @stop.each { |s| s.to_xml(xml) } + } +end @@ -1017,9 +985,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/GradientStop.html b/doc/Axlsx/GradientStop.html index 6d4546d7..e17bba97 100644 --- a/doc/Axlsx/GradientStop.html +++ b/doc/Axlsx/GradientStop.html @@ -94,9 +94,8 @@

    Overview

    -

    -The GradientStop object represents a color point in a gradient. -

    + +

    The GradientStop object represents a color point in a gradient.

    @@ -135,9 +134,8 @@ The GradientStop object represents a color point in a gradient. -

    -The color for this gradient stop. -

    +
    +

    The color for this gradient stop.

    @@ -162,9 +160,8 @@ The color for this gradient stop. -

    -The position of the color. -

    +
    +

    The position of the color.

    @@ -201,9 +198,8 @@ The position of the color. -

    -Creates a new GradientStop object. -

    +
    +

    Creates a new GradientStop object.

    @@ -225,9 +221,8 @@ Creates a new GradientStop object. -

    -Serializes the gradientStop. -

    +
    +

    Serializes the gradientStop.

    @@ -248,9 +243,8 @@ Serializes the gradientStop.

    -

    -Creates a new GradientStop object -

    + +

    Creates a new GradientStop object

    @@ -298,11 +292,10 @@ Creates a new GradientStop object
    # File 'lib/axlsx/stylesheet/gradient_stop.rb', line 18
     
    -def initialize(color, position)
    -  self.color = color
    -  self.position = position
    -end
    -
    +def initialize(color, position) + self.color = color + self.position = position +end @@ -325,9 +318,8 @@ Creates a new GradientStop object

    -

    -The color for this gradient stop -

    + +

    The color for this gradient stop

    @@ -368,10 +360,9 @@ The color for this gradient stop
    # File 'lib/axlsx/stylesheet/gradient_stop.rb', line 9
     
    -def color
    -  @color
    -end
    -
    +def color + @color +end @@ -389,9 +380,8 @@ The color for this gradient stop

    -

    -The position of the color -

    + +

    The position of the color

    @@ -425,10 +415,9 @@ The position of the color
    # File 'lib/axlsx/stylesheet/gradient_stop.rb', line 13
     
    -def position
    -  @position
    -end
    -
    +def position + @position +end @@ -450,9 +439,8 @@ The position of the color

    -

    -Serializes the gradientStop -

    + +

    Serializes the gradientStop

    @@ -471,9 +459,8 @@ Serializes the gradientStop — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -505,8 +492,7 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/gradient_stop.rb', line 31
     
    -def to_xml(xml) xml.stop(:position => self.position) {self.color.to_xml(xml)} end
    -
    +def to_xml(xml) xml.stop(:position => self.position) {self.color.to_xml(xml)} end @@ -517,9 +503,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/GraphicFrame.html b/doc/Axlsx/GraphicFrame.html index 0ca334a2..be8ce3fa 100644 --- a/doc/Axlsx/GraphicFrame.html +++ b/doc/Axlsx/GraphicFrame.html @@ -97,15 +97,13 @@
    Note: -

    -The recommended way to manage charts is Worksheet#add_chart -

    +
    +

    The recommended way to manage charts is Worksheet#add_chart

    -

    -A graphic frame defines a container for a chart object -

    + +

    A graphic frame defines a container for a chart object

    @@ -144,9 +142,8 @@ A graphic frame defines a container for a chart object -

    -A anchor that holds this frame. -

    +
    +

    A anchor that holds this frame.

    @@ -171,9 +168,8 @@ A anchor that holds this frame. -

    -A reference to the chart object associated with this frame. -

    +
    +

    A reference to the chart object associated with this frame.

    @@ -210,9 +206,8 @@ A reference to the chart object associated with this frame. -

    -Creates a new GraphicFrame object. -

    +
    +

    Creates a new GraphicFrame object.

    @@ -234,9 +229,8 @@ Creates a new GraphicFrame object. -

    -The relationship id for this graphic. -

    +
    +

    The relationship id for this graphic.

    @@ -258,9 +252,8 @@ The relationship id for this graphic. -

    -Serializes the graphic frame. -

    +
    +

    Serializes the graphic frame.

    @@ -281,9 +274,8 @@ Serializes the graphic frame.

    -

    -Creates a new GraphicFrame object -

    + +

    Creates a new GraphicFrame object

    @@ -332,12 +324,11 @@ Creates a new GraphicFrame object
    # File 'lib/axlsx/drawing/graphic_frame.rb', line 18
     
    -def initialize(anchor, chart_type, options)
    -  DataTypeValidator.validate "Drawing.chart_type", Chart, chart_type 
    -  @anchor = anchor
    -  @chart = chart_type.new(self, options)
    -end
    -
    +def initialize(anchor, chart_type, options) + DataTypeValidator.validate "Drawing.chart_type", Chart, chart_type + @anchor = anchor + @chart = chart_type.new(self, options) +end @@ -360,9 +351,8 @@ Creates a new GraphicFrame object

    -

    -A anchor that holds this frame -

    + +

    A anchor that holds this frame

    @@ -396,10 +386,9 @@ A anchor that holds this frame
    # File 'lib/axlsx/drawing/graphic_frame.rb', line 13
     
    -def anchor
    -  @anchor
    -end
    -
    +def anchor + @anchor +end @@ -417,9 +406,8 @@ A anchor that holds this frame

    -

    -A reference to the chart object associated with this frame -

    + +

    A reference to the chart object associated with this frame

    @@ -453,10 +441,9 @@ A reference to the chart object associated with this frame
    # File 'lib/axlsx/drawing/graphic_frame.rb', line 9
     
    -def chart
    -  @chart
    -end
    -
    +def chart + @chart +end @@ -478,9 +465,8 @@ A reference to the chart object associated with this frame

    -

    -The relationship id for this graphic -

    + +

    The relationship id for this graphic

    @@ -514,10 +500,9 @@ The relationship id for this graphic
    # File 'lib/axlsx/drawing/graphic_frame.rb', line 26
     
    -def rId 
    -  "rId#{@anchor.index+1}"
    -end
    -
    +def rId + "rId#{@anchor.index+1}" +end @@ -532,9 +517,8 @@ The relationship id for this graphic

    -

    -Serializes the graphic frame -

    + +

    Serializes the graphic frame

    @@ -553,9 +537,8 @@ Serializes the graphic frame — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -604,25 +587,24 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/graphic_frame.rb', line 33
     
    -def to_xml(xml)
    -  xml.send('xdr:graphicFrame') {        
    -    xml.send('xdr:nvGraphicFramePr') {
    -      xml.send('xdr:cNvPr', :id=>2, :name=>chart.title)
    -      xml.send('xdr:cNvGraphicFramePr')                
    -    }
    -    xml.send('xdr:xfrm') {
    -      xml.send('a:off', :x=>0, :y=>0)
    -      xml.send('a:ext', :cx=>0, :cy=>0)
    -    }
    -    xml.send('a:graphic') {
    -      xml.send('a:graphicData', :uri=>XML_NS_C) {
    -        xml.send('c:chart', :'xmlns:c'=>XML_NS_C, :'xmlns:r'=>XML_NS_R, :'r:id'=>rId)
    -      }
    -    }
    -  }
    -  
    -end
    -
    +def to_xml(xml) + xml.send('xdr:graphicFrame') { + xml.send('xdr:nvGraphicFramePr') { + xml.send('xdr:cNvPr', :id=>2, :name=>chart.title) + xml.send('xdr:cNvGraphicFramePr') + } + xml.send('xdr:xfrm') { + xml.send('a:off', :x=>0, :y=>0) + xml.send('a:ext', :cx=>0, :cy=>0) + } + xml.send('a:graphic') { + xml.send('a:graphicData', :uri=>XML_NS_C) { + xml.send('c:chart', :xmlns:c'=>XML_NS_C, :xmlns:r'=>XML_NS_R, :r:id'=>rId) + } + } + } + +end @@ -633,9 +615,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Line3DChart.html b/doc/Axlsx/Line3DChart.html index 42667ca9..efeaea3e 100644 --- a/doc/Axlsx/Line3DChart.html +++ b/doc/Axlsx/Line3DChart.html @@ -96,10 +96,9 @@

    Overview

    -

    -The Line3DChart is a three dimentional line chart (who would have guessed?) -that you can add to your worksheet. -

    + +

    The Line3DChart is a three dimentional line chart (who would have guessed?) +that you can add to your worksheet.

    @@ -109,21 +108,19 @@ that you can add to your worksheet.

    Examples:

    -

    -Creating a chart -

    +

    +

    Creating a chart

    -
    # This example creates a line in a single sheet.
    -require "rubygems" # if that is your preferred way to manage gems!
    -require "axlsx"
    +      
    # This example creates a line in a single sheet.
    +require "rubygems" # if that is your preferred way to manage gems!
    +require "axlsx"
     
    -p = Axlsx::Package.new
    -ws = p.workbook.add_worksheet
    -ws.add_row :values => ["This is a chart with no data in the sheet"]
    +p = Axlsx::Package.new
    +ws = p.workbook.add_worksheet
    +ws.add_row :values => ["This is a chart with no data in the sheet"]
     
    -chart = ws.add_chart(Axlsx::Line3DChart, :start_at=> [0,1], :end_at=>[0,6], :title=>"Most Popular Pets")
    -chart.add_series :data => [1, 9, 10], :labels => ["Slimy Reptiles", "Fuzzy Bunnies", "Rottweiler"]
    -
    +chart = ws.add_chart(Axlsx::Line3DChart, :start_at=> [0,1], :end_at=>[0,6], :title=>"Most Popular Pets") +chart.add_series :data => [1, 9, 10], :labels => ["Slimy Reptiles", "Fuzzy Bunnies", "Rottweiler"]
    @@ -151,9 +148,8 @@ Creating a chart
    GAP_AMOUNT_PERCENT =
    -

    -validation regex for gap amount percent -

    + +

    validation regex for gap amount percent

    @@ -163,8 +159,7 @@ validation regex for gap amount percent
    -
    /0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
    -
    +
    /0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
    @@ -196,9 +191,8 @@ validation regex for gap amount percent -

    -the category axis. -

    +
    +

    the category axis.

    @@ -223,10 +217,9 @@ the category axis. -

    -space between bar or column clusters, as a percentage of the bar or column -width. -

    +
    +

    space between bar or column clusters, as a percentage of the bar or column +width.

    @@ -251,9 +244,8 @@ width. -

    -grouping for a column, line, or area chart. -

    +
    +

    grouping for a column, line, or area chart.

    @@ -278,9 +270,8 @@ grouping for a column, line, or area chart. -

    -the category axis. -

    +
    +

    the category axis.

    @@ -305,9 +296,8 @@ the category axis. -

    -the category axis. -

    +
    +

    the category axis.

    @@ -352,9 +342,8 @@ the category axis. -

    -Creates a new line chart object. -

    +
    +

    Creates a new line chart object.

    @@ -376,9 +365,8 @@ Creates a new line chart object. -

    -Serializes the bar chart. -

    +
    +

    Serializes the bar chart.

    @@ -409,9 +397,8 @@ Serializes the bar chart.

    -

    -Creates a new line chart object -

    + +

    Creates a new line chart object

    @@ -430,9 +417,8 @@ Creates a new line chart object — -

    -The workbook that owns this chart. -

    +
    +

    The workbook that owns this chart.

    @@ -449,9 +435,8 @@ The workbook that owns this chart. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -592,20 +577,19 @@ a customizable set of options
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 61
     
    -def initialize(frame, options={})
    -  @gapDepth = nil
    -  @grouping = :standard
    -  @catAxId = rand(8 ** 8)
    -  @valAxId = rand(8 ** 8)
    -  @serAxId = rand(8 ** 8)
    -  @catAxis = CatAxis.new(@catAxId, @valAxId)
    -  @valAxis = ValAxis.new(@valAxId, @catAxId)
    -  @serAxis = SerAxis.new(@serAxId, @valAxId)
    -  super(frame, options)      
    -  @series_type = LineSeries
    -  @view3D = View3D.new({:perspective=>30}.merge(options))
    -end
    -
    +def initialize(frame, options={}) + @gapDepth = nil + @grouping = :standard + @catAxId = rand(8 ** 8) + @valAxId = rand(8 ** 8) + @serAxId = rand(8 ** 8) + @catAxis = CatAxis.new(@catAxId, @valAxId) + @valAxis = ValAxis.new(@valAxId, @catAxId) + @serAxis = SerAxis.new(@serAxId, @valAxId) + super(frame, options) + @series_type = LineSeries + @view3D = View3D.new({:perspective=>30}.merge(options)) +end @@ -628,9 +612,8 @@ a customizable set of options

    -

    -the category axis -

    + +

    the category axis

    @@ -664,10 +647,9 @@ the category axis
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 25
     
    -def catAxis
    -  @catAxis
    -end
    -
    +def catAxis + @catAxis +end @@ -685,10 +667,9 @@ the category axis

    -

    -space between bar or column clusters, as a percentage of the bar or column -width. -

    + +

    space between bar or column clusters, as a percentage of the bar or column +width.

    @@ -722,10 +703,9 @@ width.
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 37
     
    -def gapDepth
    -  @gapDepth
    -end
    -
    +def gapDepth + @gapDepth +end @@ -743,10 +723,9 @@ width.

    -

    -grouping for a column, line, or area chart. must be one of -[:percentStacked, :clustered, :standard, :stacked] -

    + +

    grouping for a column, line, or area chart. must be one of +[:percentStacked, :clustered, :standard, :stacked]

    @@ -780,10 +759,9 @@ grouping for a column, line, or area chart. must be one of
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 42
     
    -def grouping
    -  @grouping
    -end
    -
    +def grouping + @grouping +end @@ -801,9 +779,8 @@ grouping for a column, line, or area chart. must be one of

    -

    -the category axis -

    + +

    the category axis

    @@ -837,10 +814,9 @@ the category axis
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 33
     
    -def serAxis
    -  @serAxis
    -end
    -
    +def serAxis + @serAxis +end @@ -858,9 +834,8 @@ the category axis

    -

    -the category axis -

    + +

    the category axis

    @@ -894,10 +869,9 @@ the category axis
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 29
     
    -def valAxis
    -  @valAxis
    -end
    -
    +def valAxis + @valAxis +end @@ -919,9 +893,8 @@ the category axis

    -

    -Serializes the bar chart -

    + +

    Serializes the bar chart

    @@ -968,23 +941,22 @@ Serializes the bar chart
    # File 'lib/axlsx/drawing/line_3D_chart.rb', line 89
     
    -def to_xml
    -  super() do |xml|
    -    xml.send('c:line3DChart') {
    -      xml.send('c:grouping', :val=>grouping)
    -      xml.send('c:varyColors', :val=>1)
    -      @series.each { |ser| ser.to_xml(xml) }
    -      xml.send('c:gapDepth', :val=>@gapDepth) unless @gapDepth.nil?
    -      xml.send('c:axId', :val=>@catAxId)
    -      xml.send('c:axId', :val=>@valAxId)
    -      xml.send('c:axId', :val=>@serAxId)
    -    }
    -    @catAxis.to_xml(xml)
    -    @valAxis.to_xml(xml)
    -    @serAxis.to_xml(xml)
    -  end
    -end
    -
    +def to_xml + super() do |xml| + xml.send('c:line3DChart') { + xml.send('c:grouping', :val=>grouping) + xml.send('c:varyColors', :val=>1) + @series.each { |ser| ser.to_xml(xml) } + xml.send('c:gapDepth', :val=>@gapDepth) unless @gapDepth.nil? + xml.send('c:axId', :val=>@catAxId) + xml.send('c:axId', :val=>@valAxId) + xml.send('c:axId', :val=>@serAxId) + } + @catAxis.to_xml(xml) + @valAxis.to_xml(xml) + @serAxis.to_xml(xml) + end +end @@ -995,9 +967,9 @@ Serializes the bar chart
    diff --git a/doc/Axlsx/LineSeries.html b/doc/Axlsx/LineSeries.html index dbc5fa45..4ba5b171 100644 --- a/doc/Axlsx/LineSeries.html +++ b/doc/Axlsx/LineSeries.html @@ -99,15 +99,13 @@
    Note: -

    -The recommended way to manage series is to use Chart#add_series -

    +
    +

    The recommended way to manage series is to use Chart#add_series

    -

    -A LineSeries defines the title, data and labels for line charts -

    + +

    A LineSeries defines the title, data and labels for line charts

    @@ -152,9 +150,8 @@ A LineSeries defines the title, data and labels for line charts -

    -The data for this series. -

    +
    +

    The data for this series.

    @@ -179,9 +176,8 @@ The data for this series. -

    -The labels for this series. -

    +
    +

    The labels for this series.

    @@ -226,9 +222,8 @@ The labels for this series. -

    -Creates a new series. -

    +
    +

    Creates a new series.

    @@ -250,9 +245,8 @@ Creates a new series. -

    -Serializes the series. -

    +
    +

    Serializes the series.

    @@ -283,9 +277,8 @@ Serializes the series.

    -

    -Creates a new series -

    + +

    Creates a new series

    @@ -317,9 +310,8 @@ Creates a new series — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -372,13 +364,12 @@ a customizable set of options
    # File 'lib/axlsx/drawing/line_series.rb', line 20
     
    -def initialize(chart, options={})
    -  @labels, @data = nil, nil
    -  super(chart, options)
    -  @labels = CatAxisData.new(options[:labels]) unless options[:labels].nil?
    -  @data = ValAxisData.new(options[:data]) unless options[:data].nil?
    -end
    -
    +def initialize(chart, options={}) + @labels, @data = nil, nil + super(chart, options) + @labels = CatAxisData.new(options[:labels]) unless options[:labels].nil? + @data = ValAxisData.new(options[:data]) unless options[:data].nil? +end @@ -401,9 +392,8 @@ a customizable set of options

    -

    -The data for this series. -

    + +

    The data for this series.

    @@ -437,10 +427,9 @@ The data for this series.
    # File 'lib/axlsx/drawing/line_series.rb', line 10
     
    -def data
    -  @data
    -end
    -
    +def data + @data +end @@ -458,9 +447,8 @@ The data for this series.

    -

    -The labels for this series. -

    + +

    The labels for this series.

    @@ -494,10 +482,9 @@ The labels for this series.
    # File 'lib/axlsx/drawing/line_series.rb', line 14
     
    -def labels
    -  @labels
    -end
    -
    +def labels + @labels +end @@ -519,9 +506,8 @@ The labels for this series.

    -

    -Serializes the series -

    + +

    Serializes the series

    @@ -540,9 +526,8 @@ Serializes the series — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -579,13 +564,12 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/line_series.rb', line 30
     
    -def to_xml(xml)
    -  super(xml) do |xml_inner|
    -    @labels.to_xml(xml_inner) unless @labels.nil?
    -    @data.to_xml(xml_inner) unless @data.nil?
    -  end      
    -end
    -
    +def to_xml(xml) + super(xml) do |xml_inner| + @labels.to_xml(xml_inner) unless @labels.nil? + @data.to_xml(xml_inner) unless @data.nil? + end +end @@ -596,9 +580,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Marker.html b/doc/Axlsx/Marker.html index 81613635..610eb316 100644 --- a/doc/Axlsx/Marker.html +++ b/doc/Axlsx/Marker.html @@ -97,17 +97,15 @@
    Note: -

    -The recommended way to manage markers is Worksheet#add_chart Markers are -created for a two cell anchor based on the :start and :end options. -

    +
    +

    The recommended way to manage markers is Worksheet#add_chart Markers are +created for a two cell anchor based on the :start and :end options.

    -

    -The Marker class defines a point in the worksheet that drawing anchors -attach to. -

    + +

    The Marker class defines a point in the worksheet that drawing anchors +attach to.

    @@ -146,9 +144,8 @@ attach to. -

    -The column this marker anchors to. -

    +
    +

    The column this marker anchors to.

    @@ -173,9 +170,8 @@ The column this marker anchors to. -

    -The offset distance from this marker’s column. -

    +
    +

    The offset distance from this marker's column.

    @@ -200,9 +196,8 @@ The offset distance from this marker’s column. -

    -The row this marker anchors to. -

    +
    +

    The row this marker anchors to.

    @@ -227,9 +222,8 @@ The row this marker anchors to. -

    -The offset distance from this marker’s row. -

    +
    +

    The offset distance from this marker's row.

    @@ -264,9 +258,8 @@ The offset distance from this marker’s row. -

    -shortcut to set the column, row position for this marker. -

    +
    +

    shortcut to set the column, row position for this marker.

    @@ -290,9 +283,8 @@ shortcut to set the column, row position for this marker. -

    -Creates a new Marker object. -

    +
    +

    Creates a new Marker object.

    @@ -314,9 +306,8 @@ Creates a new Marker object. -

    -Serializes the marker. -

    +
    +

    Serializes the marker.

    @@ -337,9 +328,8 @@ Serializes the marker.

    -

    -Creates a new Marker object -

    + +

    Creates a new Marker object

    @@ -360,9 +350,8 @@ Creates a new Marker object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -431,13 +420,12 @@ a customizable set of options
    # File 'lib/axlsx/drawing/marker.rb', line 28
     
    -def initialize(options={})
    -  @col, @colOff, @row, @rowOff = 0, 0, 0, 0
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end      
    -end
    -
    +def initialize(options={}) + @col, @colOff, @row, @rowOff = 0, 0, 0, 0 + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -460,9 +448,8 @@ a customizable set of options

    -

    -The column this marker anchors to -

    + +

    The column this marker anchors to

    @@ -496,10 +483,9 @@ The column this marker anchors to
    # File 'lib/axlsx/drawing/marker.rb', line 9
     
    -def col
    -  @col
    -end
    -
    +def col + @col +end @@ -517,9 +503,8 @@ The column this marker anchors to

    -

    -The offset distance from this marker’s column -

    + +

    The offset distance from this marker's column

    @@ -553,10 +538,9 @@ The offset distance from this marker’s column
    # File 'lib/axlsx/drawing/marker.rb', line 13
     
    -def colOff
    -  @colOff
    -end
    -
    +def colOff + @colOff +end @@ -574,9 +558,8 @@ The offset distance from this marker’s column

    -

    -The row this marker anchors to -

    + +

    The row this marker anchors to

    @@ -610,10 +593,9 @@ The row this marker anchors to
    # File 'lib/axlsx/drawing/marker.rb', line 17
     
    -def row
    -  @row
    -end
    -
    +def row + @row +end @@ -631,9 +613,8 @@ The row this marker anchors to

    -

    -The offset distance from this marker’s row -

    + +

    The offset distance from this marker's row

    @@ -667,10 +648,9 @@ The offset distance from this marker’s row
    # File 'lib/axlsx/drawing/marker.rb', line 21
     
    -def rowOff
    -  @rowOff
    -end
    -
    +def rowOff + @rowOff +end @@ -692,9 +672,8 @@ The offset distance from this marker’s row

    -

    -shortcut to set the column, row position for this marker -

    + +

    shortcut to set the column, row position for this marker

    @@ -713,9 +692,8 @@ shortcut to set the column, row position for this marker — -

    -the column for the marker -

    +
    +

    the column for the marker

    @@ -730,9 +708,8 @@ the column for the marker — -

    -the row of the marker -

    +
    +

    the row of the marker

    @@ -754,11 +731,10 @@ the row of the marker
    # File 'lib/axlsx/drawing/marker.rb', line 47
     
    -def coord(col, row)
    -  self.col = col
    -  self.row = row
    -end
    -
    +def coord(col, row) + self.col = col + self.row = row +end @@ -773,9 +749,8 @@ the row of the marker

    -

    -Serializes the marker -

    + +

    Serializes the marker

    @@ -794,9 +769,8 @@ Serializes the marker — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -832,12 +806,11 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/marker.rb', line 54
     
    -def to_xml(xml)
    -  [:col, :colOff, :row, :rowOff].each do |k|
    -    xml.send("xdr:#{k.to_s}", self.send(k))
    -  end      
    -end
    -
    +def to_xml(xml) + [:col, :colOff, :row, :rowOff].each do |k| + xml.send("xdr:#{k.to_s}", self.send(k)) + end +end @@ -848,9 +821,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/NumFmt.html b/doc/Axlsx/NumFmt.html index 8dd0ac81..173c94aa 100644 --- a/doc/Axlsx/NumFmt.html +++ b/doc/Axlsx/NumFmt.html @@ -97,16 +97,14 @@
    Note: -

    -The recommended way to manage styles is Styles#add_style -

    +
    +

    The recommended way to manage styles is Styles#add_style

    -

    -A NumFmt object defines an identifier and formatting code for data in -cells. -

    + +

    A NumFmt object defines an identifier and formatting code for data in +cells.

    @@ -138,9 +136,8 @@ cells. -

    -The formatting to use for this number format. -

    +
    +

    The formatting to use for this number format.

    @@ -165,9 +162,8 @@ The formatting to use for this number format. -

    -An unsinged integer referencing a standard or custom number format. -

    +
    +

    An unsinged integer referencing a standard or custom number format.

    @@ -204,9 +200,8 @@ An unsinged integer referencing a standard or custom number format. -

    -A new instance of NumFmt. -

    +
    +

    A new instance of NumFmt.

    @@ -228,10 +223,9 @@ A new instance of NumFmt. -

    -Creates a numFmt element applying the instance values of this object as -attributes. -

    +
    +

    Creates a numFmt element applying the instance values of this object as +attributes.

    @@ -252,9 +246,8 @@ attributes.

    -

    -A new instance of NumFmt -

    + +

    A new instance of NumFmt

    @@ -279,14 +272,13 @@ A new instance of NumFmt
    # File 'lib/axlsx/stylesheet/num_fmt.rb', line 45
     
    -def initialize(options={})
    -  @numFmtId = 0
    -  @formatCode = ""
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -end
    -
    +def initialize(options={}) + @numFmtId = 0 + @formatCode = "" + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -309,9 +301,8 @@ A new instance of NumFmt

    -

    -The formatting to use for this number format. -

    + +

    The formatting to use for this number format.

    @@ -329,9 +320,8 @@ The formatting to use for this number format. — -

    -The formatting to use for this number format. -

    +
    +

    The formatting to use for this number format.

    @@ -358,10 +348,9 @@ The formatting to use for this number format.
    # File 'lib/axlsx/stylesheet/num_fmt.rb', line 44
     
    -def formatCode
    -  @formatCode
    -end
    -
    +def formatCode + @formatCode +end @@ -382,51 +371,48 @@ The formatting to use for this number format.
    Note: -

    -These are the known formats I can dig up. The constant NUM_FMT_PERCENT is +

    +

    These are the known formats I can dig up. The constant NUM_FMT_PERCENT is 9, and uses the default % formatting. Axlsx also defines a few formats for date and time that are commonly used in asia as NUM_FMT_YYYYMMDD and -NUM_FRM_YYYYMMDDHHMMSS. -

    -
    - 1 0
    - 2 0.00
    - 3 #,##0
    - 4 #,##0.00
    - 5 $#,##0_);($#,##0)
    - 6 $#,##0_);[Red]($#,##0)
    - 7 $#,##0.00_);($#,##0.00)
    - 8 $#,##0.00_);[Red]($#,##0.00)
    - 9 0%
    - 10 0.00%
    - 11 0.00E+00
    - 12 # ?/?
    - 13 # ??/??
    - 14 m/d/yyyy
    - 15 d-mmm-yy
    - 16 d-mmm
    - 17 mmm-yy
    - 18 h:mm AM/PM
    - 19 h:mm:ss AM/PM
    - 20 h:mm
    - 21 h:mm:ss
    - 22 m/d/yyyy h:mm
    - 37 #,##0_);(#,##0)
    - 38 #,##0_);[Red](#,##0)
    - 39 #,##0.00_);(#,##0.00)
    - 40 #,##0.00_);[Red](#,##0.00)
    - 45 mm:ss
    - 46 [h]:mm:ss
    - 47 mm:ss.0
    - 48 ##0.0E+0
    - 49 @
    -
    +NUM_FRM_YYYYMMDDHHMMSS.

    + +
    1 0
    +2 0.00
    +3 #,##0
    +4 #,##0.00
    +5 $#,##0_);($#,##0)
    +6 $#,##0_);[Red]($#,##0)
    +7 $#,##0.00_);($#,##0.00)
    +8 $#,##0.00_);[Red]($#,##0.00)
    +9 0%
    +10 0.00%
    +11 0.00E+00
    +12 # ?/?
    +13 # ??/??
    +14 m/d/yyyy
    +15 d-mmm-yy
    +16 d-mmm
    +17 mmm-yy
    +18 h:mm AM/PM
    +19 h:mm:ss AM/PM
    +20 h:mm
    +21 h:mm:ss
    +22 m/d/yyyy h:mm
    +37 #,##0_);(#,##0)
    +38 #,##0_);[Red](#,##0)
    +39 #,##0.00_);(#,##0.00)
    +40 #,##0.00_);[Red](#,##0.00)
    +45 mm:ss
    +46 [h]:mm:ss
    +47 mm:ss.0
    +48 ##0.0E+0
    +49 @
    -

    -An unsinged integer referencing a standard or custom number format. -

    + +

    An unsinged integer referencing a standard or custom number format.

    @@ -444,9 +430,8 @@ An unsinged integer referencing a standard or custom number format. — -

    -An unsinged integer referencing a standard or custom number format. -

    +
    +

    An unsinged integer referencing a standard or custom number format.

    @@ -473,10 +458,9 @@ An unsinged integer referencing a standard or custom number format.
    # File 'lib/axlsx/stylesheet/num_fmt.rb', line 40
     
    -def numFmtId
    -  @numFmtId
    -end
    -
    +def numFmtId + @numFmtId +end @@ -498,10 +482,9 @@ An unsinged integer referencing a standard or custom number format.

    -

    -Creates a numFmt element applying the instance values of this object as -attributes. -

    + +

    Creates a numFmt element applying the instance values of this object as +attributes.

    @@ -520,9 +503,8 @@ attributes. — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -541,8 +523,7 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/num_fmt.rb', line 60
     
    -def to_xml(xml) xml.numFmt(self.instance_values) end
    -
    +def to_xml(xml) xml.numFmt(self.instance_values) end @@ -553,9 +534,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/OneCellAnchor.html b/doc/Axlsx/OneCellAnchor.html index f75e35e3..b3d7a91c 100644 --- a/doc/Axlsx/OneCellAnchor.html +++ b/doc/Axlsx/OneCellAnchor.html @@ -97,16 +97,14 @@
    Note: -

    -The recommended way to manage drawings, images and charts is -Worksheet#add_chart or Worksheet#add_image. -

    +
    +

    The recommended way to manage drawings, images and charts is +Worksheet#add_chart or Worksheet#add_image.

    -

    -This class details a single cell anchor for drawings. -

    + +

    This class details a single cell anchor for drawings.

    @@ -147,9 +145,8 @@ This class details a single cell anchor for drawings. -

    -The drawing that holds this anchor. -

    +
    +

    The drawing that holds this anchor.

    @@ -174,9 +171,8 @@ The drawing that holds this anchor. -

    -A marker that defines the from cell anchor. -

    +
    +

    A marker that defines the from cell anchor.

    @@ -201,10 +197,9 @@ A marker that defines the from cell anchor. -

    -the height of the graphic object in pixels this is converted to EMU at a 92 -ppi resolution. -

    +
    +

    the height of the graphic object in pixels this is converted to EMU at a 92 +ppi resolution.

    @@ -229,9 +224,8 @@ ppi resolution. -

    -The object this anchor hosts. -

    +
    +

    The object this anchor hosts.

    @@ -256,9 +250,8 @@ The object this anchor hosts. -

    -the width of the graphic object in pixels. -

    +
    +

    the width of the graphic object in pixels.

    @@ -293,9 +286,8 @@ the width of the graphic object in pixels. -

    -The index of this anchor in the drawing. -

    +
    +

    The index of this anchor in the drawing.

    @@ -319,9 +311,8 @@ The index of this anchor in the drawing. -

    -Creates a new OneCellAnchor object and an Pic associated with it. -

    +
    +

    Creates a new OneCellAnchor object and an Pic associated with it.

    @@ -343,9 +334,8 @@ Creates a new OneCellAnchor object and an Pic associated with it. -

    -Serializes the anchor. -

    +
    +

    Serializes the anchor.

    @@ -366,9 +356,8 @@ Serializes the anchor.

    -

    -Creates a new OneCellAnchor object and an Pic associated with it. -

    + +

    Creates a new OneCellAnchor object and an Pic associated with it.

    @@ -400,9 +389,8 @@ Creates a new OneCellAnchor object and an Pic associated with it. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -423,9 +411,8 @@ a customizable set of options - —

    -the col, row to start at -

    + —
    +

    the col, row to start at

    @@ -453,9 +440,8 @@ the col, row to start at - —

    -the file location of the image you will render -

    + —
    +

    the file location of the image you will render

    @@ -465,9 +451,8 @@ the file location of the image you will render - —

    -the name attribute for the rendered image -

    + —
    +

    the name attribute for the rendered image

    @@ -477,9 +462,8 @@ the name attribute for the rendered image - —

    -the description of the image rendered -

    + —
    +

    the description of the image rendered

    @@ -508,18 +492,17 @@ the description of the image rendered
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 39
     
    -def initialize(drawing, options={})
    -  @drawing = drawing
    -  @width = 0
    -  @height = 0
    -  drawing.anchors << self      
    -  @from = Marker.new
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -  @object = Pic.new(self, options)
    -end
    -
    +def initialize(drawing, options={}) + @drawing = drawing + @width = 0 + @height = 0 + drawing.anchors << self + @from = Marker.new + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end + @object = Pic.new(self, options) +end @@ -542,9 +525,8 @@ the description of the image rendered

    -

    -The drawing that holds this anchor -

    + +

    The drawing that holds this anchor

    @@ -578,10 +560,9 @@ The drawing that holds this anchor
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 18
     
    -def drawing
    -  @drawing
    -end
    -
    +def drawing + @drawing +end @@ -599,10 +580,9 @@ The drawing that holds this anchor

    -

    -A marker that defines the from cell anchor. The default from column and row -are 0 and 0 respectively -

    + +

    A marker that defines the from cell anchor. The default from column and row +are 0 and 0 respectively

    @@ -636,10 +616,9 @@ are 0 and 0 respectively
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 10
     
    -def from
    -  @from
    -end
    -
    +def from + @from +end @@ -657,10 +636,9 @@ are 0 and 0 respectively

    -

    -the height of the graphic object in pixels this is converted to EMU at a 92 -ppi resolution -

    + +

    the height of the graphic object in pixels this is converted to EMU at a 92 +ppi resolution

    @@ -694,10 +672,9 @@ ppi resolution
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 28
     
    -def height
    -  @height
    -end
    -
    +def height + @height +end @@ -715,9 +692,8 @@ ppi resolution

    -

    -The object this anchor hosts -

    + +

    The object this anchor hosts

    @@ -751,10 +727,9 @@ The object this anchor hosts
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 14
     
    -def object
    -  @object
    -end
    -
    +def object + @object +end @@ -772,10 +747,9 @@ The object this anchor hosts

    -

    -the width of the graphic object in pixels. this is converted to EMU at a 92 -ppi resolution -

    + +

    the width of the graphic object in pixels. this is converted to EMU at a 92 +ppi resolution

    @@ -809,10 +783,9 @@ ppi resolution
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 23
     
    -def width
    -  @width
    -end
    -
    +def width + @width +end @@ -834,9 +807,8 @@ ppi resolution

    -

    -The index of this anchor in the drawing -

    + +

    The index of this anchor in the drawing

    @@ -870,10 +842,9 @@ The index of this anchor in the drawing
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 59
     
    -def index
    -  @drawing.anchors.index(self)
    -end
    -
    +def index + @drawing.anchors.index(self) +end @@ -888,9 +859,8 @@ The index of this anchor in the drawing

    -

    -Serializes the anchor -

    + +

    Serializes the anchor

    @@ -909,9 +879,8 @@ Serializes the anchor — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -952,17 +921,16 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/one_cell_anchor.rb', line 66
     
    -def to_xml(xml)
    -  xml.send('xdr:oneCellAnchor') {
    -    xml.send('xdr:from') {
    -      from.to_xml(xml)
    -    }
    -    xml.send('xdr:ext', ext)
    -    @object.to_xml(xml)
    -    xml.send('xdr:clientData')
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('xdr:oneCellAnchor') { + xml.send('xdr:from') { + from.to_xml(xml) + } + xml.send('xdr:ext', ext) + @object.to_xml(xml) + xml.send('xdr:clientData') + } +end @@ -973,9 +941,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Override.html b/doc/Axlsx/Override.html index 1a0de048..af349ffe 100644 --- a/doc/Axlsx/Override.html +++ b/doc/Axlsx/Override.html @@ -94,10 +94,9 @@

    Overview

    -

    -An override content part. These parts are automatically created by for you -based on the content of your package. -

    + +

    An override content part. These parts are automatically created by for you +based on the content of your package.

    @@ -129,9 +128,8 @@ based on the content of your package. -

    -The type of content. -

    +
    +

    The type of content.

    @@ -156,9 +154,8 @@ The type of content. -

    -The name and location of the part. -

    +
    +

    The name and location of the part.

    @@ -195,9 +192,8 @@ The name and location of the part. -

    -Creates a new Override object. -

    +
    +

    Creates a new Override object.

    @@ -219,9 +215,8 @@ Creates a new Override object. -

    -Serializes the Override object to xml. -

    +
    +

    Serializes the Override object to xml.

    @@ -242,9 +237,8 @@ Serializes the Override object to xml.

    -

    -Creates a new Override object -

    + +

    Creates a new Override object

    @@ -265,9 +259,8 @@ Creates a new Override object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -312,10 +305,9 @@ a customizable set of options — -

    -An argument error is raised if both PartName and ContentType are not -specified. -

    +
    +

    An argument error is raised if both PartName and ContentType are not +specified.

    @@ -338,13 +330,12 @@ specified.
    # File 'lib/axlsx/content_type/override.rb', line 17
     
    -def initialize(options={})
    -  raise ArgumentError, "PartName and ContentType are required" unless options[:PartName] && options[:ContentType]
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end      
    -end
    -
    +def initialize(options={}) + raise ArgumentError, "PartName and ContentType are required" unless options[:PartName] && options[:ContentType] + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -367,9 +358,8 @@ specified.

    -

    -The type of content. -

    + +

    The type of content.

    @@ -403,10 +393,9 @@ The type of content.
    # File 'lib/axlsx/content_type/override.rb', line 7
     
    -def ContentType
    -  @ContentType
    -end
    -
    +def ContentType + @ContentType +end @@ -424,9 +413,8 @@ The type of content.

    -

    -The name and location of the part. -

    + +

    The name and location of the part.

    @@ -460,10 +448,9 @@ The name and location of the part.
    # File 'lib/axlsx/content_type/override.rb', line 11
     
    -def PartName
    -  @PartName
    -end
    -
    +def PartName + @PartName +end @@ -485,9 +472,8 @@ The name and location of the part.

    -

    -Serializes the Override object to xml -

    + +

    Serializes the Override object to xml

    @@ -506,9 +492,8 @@ Serializes the Override object to xml — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -529,10 +514,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/content_type/override.rb', line 33
     
    -def to_xml(xml)
    -  xml.Override(self.instance_values)
    -end
    -
    +def to_xml(xml) + xml.Override(self.instance_values) +end @@ -543,9 +527,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Package.html b/doc/Axlsx/Package.html index e1afdd68..df054277 100644 --- a/doc/Axlsx/Package.html +++ b/doc/Axlsx/Package.html @@ -94,11 +94,10 @@

    Overview

    -

    -Package is responsible for managing all the bits and peices that Open + +

    Package is responsible for managing all the bits and peices that Open Office XML requires to make a valid xlsx document including valdation and -serialization. -

    +serialization.

    @@ -137,9 +136,8 @@ serialization. -

    -Initializes your package. -

    +
    +

    Initializes your package.

    @@ -161,9 +159,8 @@ Initializes your package. -

    -Accepts a ruport table for serialization to xlsx. -

    +
    +

    Accepts a ruport table for serialization to xlsx.

    @@ -185,9 +182,8 @@ Accepts a ruport table for serialization to xlsx. -

    -Serialize your workbook to disk as an xlsx document. -

    +
    +

    Serialize your workbook to disk as an xlsx document.

    @@ -209,9 +205,8 @@ Serialize your workbook to disk as an xlsx document. -

    -Validate all parts of the package against xsd schema. -

    +
    +

    Validate all parts of the package against xsd schema.

    @@ -233,9 +228,8 @@ Validate all parts of the package against xsd schema. -

    -The workbook this package will serialize or validate. -

    +
    +

    The workbook this package will serialize or validate.

    @@ -277,9 +271,8 @@ The workbook this package will serialize or validate.

    -

    -Initializes your package -

    + +

    Initializes your package

    @@ -289,12 +282,10 @@ Initializes your package

    Examples:

    -

    -Package.new :author => ‘you!’, :workbook => Workbook.new -

    +

    +

    Package.new :author => ‘you!’, :workbook => Workbook.new

    -
    -
    +
    
         
       

    Parameters:

    @@ -312,10 +303,9 @@ Package.new :author => ‘you!’, :workbook => Workbook.new — -

    -A hash that you can use to specify the author and workbook for this -package. -

    +
    +

    A hash that you can use to specify the author and workbook for this +package.

    @@ -334,9 +324,8 @@ package. - —

    -The author of the document -

    + —
    +

    The author of the document

    @@ -369,9 +358,8 @@ The author of the document — -

    -the object that the method was called on -

    +
    +

    the object that the method was called on

    @@ -394,13 +382,12 @@ the object that the method was called on
    # File 'lib/axlsx/package.rb', line 12
     
    -def initialize(options={})
    -  @workbook = nil
    -  @core, @app = Core.new, App.new
    -  @core.creator = options[:author] || @core.creator
    -  yield self if block_given?
    -end
    -
    +def initialize(options={}) + @workbook = nil + @core, @app = Core.new, App.new + @core.creator = options[:author] || @core.creator + yield self if block_given? +end @@ -422,9 +409,8 @@ the object that the method was called on

    -

    -Accepts a ruport table for serialization to xlsx -

    + +

    Accepts a ruport table for serialization to xlsx

    @@ -443,9 +429,8 @@ Accepts a ruport table for serialization to xlsx — -

    -a ruport Table object -

    +
    +

    a ruport Table object

    @@ -466,10 +451,9 @@ a ruport Table object
    # File 'lib/axlsx/package.rb', line 21
     
    -def ruport_table(table)
    -  puts table
    -end
    -
    +def ruport_table(table) + puts table +end @@ -487,17 +471,15 @@ a ruport Table object
    Note: -

    -A tremendous amount of effort has gone into ensuring that you cannot create +

    +

    A tremendous amount of effort has gone into ensuring that you cannot create invalid xlsx documents. confirm_valid should be used in the rare case that -you cannot open the serialized file. -

    +you cannot open the serialized file.

    -

    -Serialize your workbook to disk as an xlsx document. -

    + +

    Serialize your workbook to disk as an xlsx document.

    @@ -508,13 +490,12 @@ Serialize your workbook to disk as an xlsx document.

    Examples:

    -
    # This is how easy it is to create a valid xlsx file. Of course you might want to add a sheet or two, and maybe some data, styles and charts.
    -# Take a look at the README for an example of how to do it!
    -f = File.open('test.xlsx', 'w')
    -Package.new.serialize(f)
    +      
    # This is how easy it is to create a valid xlsx file. Of course you might want to add a sheet or two, and maybe some data, styles and charts.
    +# Take a look at the README for an example of how to do it!
    +f = File.open('test.xlsx', 'w')
    +Package.new.serialize(f)
     
    -# You will find a file called test.xlsx
    -
    +# You will find a file called test.xlsx

    Parameters:

    @@ -530,9 +511,8 @@ Serialize your workbook to disk as an xlsx document. — -

    -The file you want to serialize your package to -

    +
    +

    The file you want to serialize your package to

    @@ -549,9 +529,8 @@ The file you want to serialize your package to — -

    -Validate the package prior to serialization. -

    +
    +

    Validate the package prior to serialization.

    @@ -569,10 +548,9 @@ Validate the package prior to serialization. — -

    -False if confirm_valid and validation errors exist. True if the package was -serialized -

    +
    +

    False if confirm_valid and validation errors exist. True if the package was +serialized

    @@ -614,25 +592,24 @@ serialized
    # File 'lib/axlsx/package.rb', line 61
     
    -def serialize(output, confirm_valid=false)
    -  return false unless !confirm_valid || self.validate.empty?
    -  p = parts
    -  Zip::ZipOutputStream.open(output) do |zip|
    -    p.each do |part| 
    -      unless part[:doc].nil?
    -        zip.put_next_entry(part[:entry]); 
    -        zip.puts(part[:doc])
    -      end
    -      unless part[:path].nil?
    -        zip.put_next_entry(part[:entry]); 
    -        # binread for 1.9.3
    -        zip.write IO.respond_to?(:binread) ? IO.binread(part[:path]) : IO.read(part[:path])
    -      end          
    -    end
    -  end
    -  true
    -end
    -
    +def serialize(output, confirm_valid=false) + return false unless !confirm_valid || self.validate.empty? + p = parts + Zip::ZipOutputStream.open(output) do |zip| + p.each do |part| + unless part[:doc].nil? + zip.put_next_entry(part[:entry]); + zip.puts(part[:doc]) + end + unless part[:path].nil? + zip.put_next_entry(part[:entry]); + # binread for 1.9.3 + zip.write IO.respond_to?(:binread) ? IO.binread(part[:path]) : IO.read(part[:path]) + end + end + end + true +end @@ -650,25 +627,22 @@ serialized
    Note: -

    -This gem includes all schema from OfficeOpenXML-XMLSchema-Transitional.zip +

    +

    This gem includes all schema from OfficeOpenXML-XMLSchema-Transitional.zip and OpenPackagingConventions-XMLSchema.zip as per ECMA-376, Third edition. opc schema require an internet connection to import remote schema from dublin core for dc, dcterms and xml namespaces. Those remote schema are -included in this gem, and the original files have been altered to refer to -the local versions. -

    -

    -If by chance you are able to creat a package that does not validate it +included in this gem, and the original files have been altered to refer to +the local versions.

    + +

    If by chance you are able to creat a package that does not validate it indicates that the internal validation is not robust enough and needs to be -improved. Please report your errors to the gem author. -

    +improved. Please report your errors to the gem author.

    -

    -Validate all parts of the package against xsd schema. -

    + +

    Validate all parts of the package against xsd schema.

    @@ -679,11 +653,10 @@ Validate all parts of the package against xsd schema.

    Examples:

    -
    # The following will output any error messages found in serialization.
    -p = Axlsx::Package.new
    -# ... code to create sheets, charts, styles etc.
    -p.validate.each { |error| puts error.message }
    -
    +
    # The following will output any error messages found in serialization.
    +p = Axlsx::Package.new
    +# ... code to create sheets, charts, styles etc.
    +p.validate.each { |error| puts error.message }
    @@ -698,9 +671,8 @@ Validate all parts of the package against xsd schema. — -

    -An array of all validation errors found. -

    +
    +

    An array of all validation errors found.

    @@ -729,12 +701,11 @@ An array of all validation errors found.
    # File 'lib/axlsx/package.rb', line 95
     
    -def validate
    -  errors = []
    -  parts.each { |part| errors.concat validate_single_doc(part[:schema], part[:doc]) unless part[:schema].nil? }
    -  errors
    -end
    -
    +def validate + errors = [] + parts.each { |part| errors.concat validate_single_doc(part[:schema], part[:doc]) unless part[:schema].nil? } + errors +end @@ -752,25 +723,22 @@ An array of all validation errors found.
    Note: -

    -As there are multiple ways to instantiate a workbook for the package, here -are a few examples: -

    -
    -  # assign directly during package instanciation
    -  wb = Package.new(:workbook => Workbook.new).workbook
    -
    -  # get a fresh workbook automatically from the package
    -  wb = Pacakge.new().workbook
    -  #     # set the workbook after creating the package
    -  wb = Package.new().workbook = Workbook.new
    -
    +
    +

    As there are multiple ways to instantiate a workbook for the package, here +are a few examples:

    + +
    # assign directly during package instanciation
    +wb = Package.new(:workbook => Workbook.new).workbook
    +
    +# get a fresh workbook automatically from the package
    +wb = Pacakge.new().workbook
    +#     # set the workbook after creating the package
    +wb = Package.new().workbook = Workbook.new
    -

    -The workbook this package will serialize or validate. -

    + +

    The workbook this package will serialize or validate.

    @@ -801,10 +769,9 @@ The workbook this package will serialize or validate. — -

    -If no workbook instance has been assigned with this package a new Workbook -instance is returned. -

    +
    +

    If no workbook instance has been assigned with this package a new Workbook +instance is returned.

    @@ -821,9 +788,8 @@ instance is returned. -

    -ArgumentError if workbook parameter is not a Workbook instance. -

    +
    +

    ArgumentError if workbook parameter is not a Workbook instance.

    @@ -845,12 +811,11 @@ ArgumentError if workbook parameter is not a Workbook instance.
    # File 'lib/axlsx/package.rb', line 37
     
    -def workbook
    -  @workbook || @workbook = Workbook.new
    -  yield @workbook if block_given?
    -  @workbook
    -end
    -
    +def workbook + @workbook || @workbook = Workbook.new + yield @workbook if block_given? + @workbook +end @@ -890,8 +855,7 @@ ArgumentError if workbook parameter is not a Workbook instance.
    # File 'lib/axlsx/package.rb', line 44
     
    -def workbook=(workbook) DataTypeValidator.validate "Package.workbook", Workbook, workbook; @workbook = workbook end
    -
    +def workbook=(workbook) DataTypeValidator.validate "Package.workbook", Workbook, workbook; @workbook = workbook; end @@ -902,9 +866,9 @@ ArgumentError if workbook parameter is not a Workbook instance.
    diff --git a/doc/Axlsx/PatternFill.html b/doc/Axlsx/PatternFill.html index 5e7f0e06..e6b5fa3e 100644 --- a/doc/Axlsx/PatternFill.html +++ b/doc/Axlsx/PatternFill.html @@ -97,15 +97,13 @@
    Note: -

    -The recommended way to manage styles is with Styles#add_style -

    +
    +

    The recommended way to manage styles is with Styles#add_style

    -

    -A PatternFill is the pattern and solid fill styling for a cell. -

    + +

    A PatternFill is the pattern and solid fill styling for a cell.

    @@ -144,9 +142,8 @@ A PatternFill is the pattern and solid fill styling for a cell. -

    -The color to use for the background of the fill when the type is not solid. -

    +
    +

    The color to use for the background of the fill when the type is not solid.

    @@ -171,9 +168,8 @@ The color to use for the background of the fill when the type is not solid. -

    -The color to use for the the background in solid fills. -

    +
    +

    The color to use for the the background in solid fills.

    @@ -198,9 +194,8 @@ The color to use for the the background in solid fills. -

    -The pattern type to use. -

    +
    +

    The pattern type to use.

    @@ -237,9 +232,8 @@ The pattern type to use. -

    -Creates a new PatternFill Object. -

    +
    +

    Creates a new PatternFill Object.

    @@ -261,9 +255,8 @@ Creates a new PatternFill Object. -

    -Serializes the pattern fill. -

    +
    +

    Serializes the pattern fill.

    @@ -284,9 +277,8 @@ Serializes the pattern fill.

    -

    -Creates a new PatternFill Object -

    + +

    Creates a new PatternFill Object

    @@ -307,9 +299,8 @@ Creates a new PatternFill Object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -369,13 +360,12 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/pattern_fill.rb', line 44
     
    -def initialize(options={})
    -  @patternType = :none
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + @patternType = :none + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -398,9 +388,8 @@ a customizable set of options

    -

    -The color to use for the background of the fill when the type is not solid. -

    + +

    The color to use for the background of the fill when the type is not solid.

    @@ -434,10 +423,9 @@ The color to use for the background of the fill when the type is not solid.
    # File 'lib/axlsx/stylesheet/pattern_fill.rb', line 13
     
    -def bgColor
    -  @bgColor
    -end
    -
    +def bgColor + @bgColor +end @@ -455,9 +443,8 @@ The color to use for the background of the fill when the type is not solid.

    -

    -The color to use for the the background in solid fills. -

    + +

    The color to use for the the background in solid fills.

    @@ -491,10 +478,9 @@ The color to use for the the background in solid fills.
    # File 'lib/axlsx/stylesheet/pattern_fill.rb', line 9
     
    -def fgColor
    -  @fgColor
    -end
    -
    +def fgColor + @fgColor +end @@ -515,36 +501,33 @@ The color to use for the the background in solid fills.
    Note: -

    -patternType must be one of -

    -
    - :none
    - :solid
    - :mediumGray
    - :darkGray
    - :lightGray
    - :darkHorizontal
    - :darkVertical
    - :darkDown
    - :darkUp
    - :darkGrid
    - :darkTrellis
    - :lightHorizontal
    - :lightVertical
    - :lightDown
    - :lightUp
    - :lightGrid
    - :lightTrellis
    - :gray125
    - :gray0625
    -
    +
    +

    patternType must be one of

    + +
    :none
    +:solid
    +:mediumGray
    +:darkGray
    +:lightGray
    +:darkHorizontal
    +:darkVertical
    +:darkDown
    +:darkUp
    +:darkGrid
    +:darkTrellis
    +:lightHorizontal
    +:lightVertical
    +:lightDown
    +:lightUp
    +:lightGrid
    +:lightTrellis
    +:gray125
    +:gray0625
    -

    -The pattern type to use -

    + +

    The pattern type to use

    @@ -572,10 +555,9 @@ The pattern type to use
    # File 'lib/axlsx/stylesheet/pattern_fill.rb', line 38
     
    -def patternType
    -  @patternType
    -end
    -
    +def patternType + @patternType +end @@ -597,9 +579,8 @@ The pattern type to use

    -

    -Serializes the pattern fill -

    + +

    Serializes the pattern fill

    @@ -618,9 +599,8 @@ Serializes the pattern fill — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -656,12 +636,11 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/pattern_fill.rb', line 60
     
    -def to_xml(xml) 
    -  xml.patternFill(:patternType => self.patternType) { 
    -    self.instance_values.reject { |k,v| k.to_sym == :patternType }.each { |k,v| xml.send(k, v.instance_values) }    
    -  }
    -end
    -
    +def to_xml(xml) + xml.patternFill(:patternType => self.patternType) { + self.instance_values.reject { |k,v| k.to_sym == :patternType }.each { |k,v| xml.send(k, v.instance_values) } + } +end @@ -672,9 +651,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Pic.html b/doc/Axlsx/Pic.html index e131236c..6e99b241 100644 --- a/doc/Axlsx/Pic.html +++ b/doc/Axlsx/Pic.html @@ -94,10 +94,9 @@

    Overview

    -

    -a Pic object represents an image in your worksheet Worksheet#add_image is -the recommended way to manage images in your sheets -

    + +

    a Pic object represents an image in your worksheet Worksheet#add_image is +the recommended way to manage images in your sheets

    @@ -120,9 +119,8 @@ the recommended way to manage images in your sheets
    ALLOWED_EXTENSIONS =
    -

    -allowed file extenstions -

    + +

    allowed file extenstions

    @@ -132,8 +130,7 @@ allowed file extenstions
    -
    ['gif', 'jpeg', 'png', 'jpg']
    -
    +
    ['gif', 'jpeg', 'png', 'jpg']
    @@ -161,9 +158,8 @@ allowed file extenstions -

    -The anchor for this image. -

    +
    +

    The anchor for this image.

    @@ -188,9 +184,8 @@ The anchor for this image. -

    -A description of the picture. -

    +
    +

    A description of the picture.

    @@ -215,10 +210,9 @@ A description of the picture. -

    -The path to the image you want to include Only local images are supported -at this time and only jpg support. -

    +
    +

    The path to the image you want to include Only local images are supported +at this time and only jpg support.

    @@ -243,9 +237,8 @@ at this time and only jpg support. -

    -The name to use for this picture. -

    +
    +

    The name to use for this picture.

    @@ -280,9 +273,8 @@ The name to use for this picture. -

    -returns the extension of image_src without the preceeding ’.’. -

    +
    +

    returns the extension of image_src without the preceeding '.'.

    @@ -304,9 +296,8 @@ returns the extension of image_src without the preceeding ’.’. -

    -The file name of image_src without any path information. -

    +
    +

    The file name of image_src without any path information.

    @@ -328,9 +319,8 @@ The file name of image_src without any path information. -

    -providing access to update the anchor’s height attribute. -

    +
    +

    providing access to update the anchor's height attribute.

    @@ -373,9 +363,8 @@ providing access to update the anchor’s height attribute. -

    -The index of this image in the workbooks images collections. -

    +
    +

    The index of this image in the workbooks images collections.

    @@ -399,9 +388,8 @@ The index of this image in the workbooks images collections. -

    -Creates a new Pic(ture) object. -

    +
    +

    Creates a new Pic(ture) object.

    @@ -423,10 +411,9 @@ Creates a new Pic(ture) object. -

    -The part name for this image used in serialization and relationship -building. -

    +
    +

    The part name for this image used in serialization and relationship +building.

    @@ -448,11 +435,10 @@ building. -

    -This is a short cut method to set the start anchor position If you need +

    +

    This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff. -

    +rowOff.

    @@ -474,9 +460,8 @@ rowOff. -

    -Serializes the picture. -

    +
    +

    Serializes the picture.

    @@ -498,9 +483,8 @@ Serializes the picture. -

    -providing access to the anchor’s width attribute. -

    +
    +

    providing access to the anchor's width attribute.

    @@ -542,9 +526,8 @@ providing access to the anchor’s width attribute.

    -

    -Creates a new Pic(ture) object -

    + +

    Creates a new Pic(ture) object

    @@ -563,9 +546,8 @@ Creates a new Pic(ture) object — -

    -the anchor that holds this image -

    +
    +

    the anchor that holds this image

    @@ -582,9 +564,8 @@ the anchor that holds this image — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -682,9 +663,8 @@ a customizable set of options — -

    -the object that the method was called on -

    +
    +

    the object that the method was called on

    @@ -710,16 +690,15 @@ the object that the method was called on
    # File 'lib/axlsx/drawing/pic.rb', line 38
     
    -def initialize(anchor, options={})
    -  @anchor = anchor
    -  @anchor.drawing.worksheet.workbook.images << self
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -  start_at(*options[:start_at]) if options[:start_at]
    -  yield self if block_given?
    -end
    -
    +def initialize(anchor, options={}) + @anchor = anchor + @anchor.drawing.worksheet.workbook.images << self + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end + start_at(*options[:start_at]) if options[:start_at] + yield self if block_given? +end @@ -742,9 +721,8 @@ the object that the method was called on

    -

    -The anchor for this image -

    + +

    The anchor for this image

    @@ -778,10 +756,9 @@ The anchor for this image
    # File 'lib/axlsx/drawing/pic.rb', line 27
     
    -def anchor
    -  @anchor
    -end
    -
    +def anchor + @anchor +end @@ -799,9 +776,8 @@ The anchor for this image

    -

    -A description of the picture -

    + +

    A description of the picture

    @@ -835,10 +811,9 @@ A description of the picture
    # File 'lib/axlsx/drawing/pic.rb', line 18
     
    -def descr
    -  @descr
    -end
    -
    +def descr + @descr +end @@ -856,10 +831,9 @@ A description of the picture

    -

    -The path to the image you want to include Only local images are supported -at this time and only jpg support -

    + +

    The path to the image you want to include Only local images are supported +at this time and only jpg support

    @@ -893,10 +867,9 @@ at this time and only jpg support
    # File 'lib/axlsx/drawing/pic.rb', line 23
     
    -def image_src
    -  @image_src
    -end
    -
    +def image_src + @image_src +end @@ -914,9 +887,8 @@ at this time and only jpg support

    -

    -The name to use for this picture -

    + +

    The name to use for this picture

    @@ -950,10 +922,9 @@ The name to use for this picture
    # File 'lib/axlsx/drawing/pic.rb', line 13
     
    -def name
    -  @name
    -end
    -
    +def name + @name +end @@ -975,9 +946,8 @@ The name to use for this picture

    -

    -returns the extension of image_src without the preceeding ’.’ -

    + +

    returns the extension of image_src without the preceeding '.'

    @@ -1011,10 +981,9 @@ returns the extension of image_src without the preceeding ’.’
    # File 'lib/axlsx/drawing/pic.rb', line 70
     
    -def extname
    -  File.extname(image_src).delete('.') unless image_src.nil?
    -end
    -
    +def extname + File.extname(image_src).delete('.') unless image_src.nil? +end @@ -1029,9 +998,8 @@ returns the extension of image_src without the preceeding ’.’

    -

    -The file name of image_src without any path information -

    + +

    The file name of image_src without any path information

    @@ -1065,10 +1033,9 @@ The file name of image_src without any path information
    # File 'lib/axlsx/drawing/pic.rb', line 64
     
    -def file_name
    -  File.basename(image_src) unless image_src.nil?
    -end
    -
    +def file_name + File.basename(image_src) unless image_src.nil? +end @@ -1083,9 +1050,8 @@ The file name of image_src without any path information

    -

    -providing access to update the anchor’s height attribute -

    + +

    providing access to update the anchor's height attribute

    @@ -1128,10 +1094,9 @@ providing access to update the anchor’s height attribute
    # File 'lib/axlsx/drawing/pic.rb', line 101
     
    -def height
    -  @anchor.height
    -end
    -
    +def height + @anchor.height +end @@ -1173,10 +1138,9 @@ providing access to update the anchor’s height attribute
    # File 'lib/axlsx/drawing/pic.rb', line 106
     
    -def height=(v)
    -  @anchor.height = v
    -end
    -
    +def height=(v) + @anchor.height = v +end @@ -1191,9 +1155,8 @@ providing access to update the anchor’s height attribute

    -

    -The index of this image in the workbooks images collections -

    + +

    The index of this image in the workbooks images collections

    @@ -1227,10 +1190,9 @@ The index of this image in the workbooks images collections
    # File 'lib/axlsx/drawing/pic.rb', line 76
     
    -def index
    -  @anchor.drawing.worksheet.workbook.images.index(self)
    -end
    -
    +def index + @anchor.drawing.worksheet.workbook.images.index(self) +end @@ -1245,10 +1207,9 @@ The index of this image in the workbooks images collections

    -

    -The part name for this image used in serialization and relationship -building -

    + +

    The part name for this image used in serialization and relationship +building

    @@ -1282,10 +1243,9 @@ building
    # File 'lib/axlsx/drawing/pic.rb', line 82
     
    -def pn
    -  "#{IMAGE_PN % [(index+1), extname]}"
    -end
    -
    +def pn + "#{IMAGE_PN % [(index+1), extname]}" +end @@ -1300,11 +1260,10 @@ building

    -

    -This is a short cut method to set the start anchor position If you need + +

    This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / -rowOff -

    +rowOff

    @@ -1323,9 +1282,8 @@ rowOff — -

    -The column -

    +
    +

    The column

    @@ -1340,9 +1298,8 @@ The column — -

    -The row -

    +
    +

    The row

    @@ -1377,11 +1334,10 @@ The row
    # File 'lib/axlsx/drawing/pic.rb', line 116
     
    -def start_at(x, y)
    -  @anchor.from.col = x
    -  @anchor.from.row = y
    -end
    -
    +def start_at(x, y) + @anchor.from.col = x + @anchor.from.row = y +end @@ -1396,9 +1352,8 @@ The row

    -

    -Serializes the picture -

    + +

    Serializes the picture

    @@ -1417,9 +1372,8 @@ Serializes the picture — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1475,32 +1429,31 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/pic.rb', line 124
     
    -def to_xml(xml)
    -  xml.send('xdr:pic') {
    -    xml.send('xdr:nvPicPr') {
    -      xml.send('xdr:cNvPr', :id=>"2", :name=>name, :descr=>descr)
    -      xml.send('xdr:cNvPicPr') {
    -        xml.send('a:picLocks', :noChangeAspect=>1)
    -      }
    -    }
    -    xml.send('xdr:blipFill') {
    -      xml.send('a:blip', :'xmlns:r' => XML_NS_R, :'r:embed'=>"rId1")
    -      xml.send('a:stretch') {
    -        xml.send('a:fillRect')
    -      }
    -    }
    -    xml.send('xdr:spPr') {
    -      xml.send('a:xfrm') {
    -        xml.send('a:off', :x=>0, :y=>0)
    -        xml.send('a:ext', :cx=>2336800, :cy=>2161540)
    -      }
    -      xml.send('a:prstGeom', :prst=>:rect) {
    -        xml.send('a:avLst')
    -      }
    -    }
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('xdr:pic') { + xml.send('xdr:nvPicPr') { + xml.send('xdr:cNvPr', :id=>"2", :name=>name, :descr=>descr) + xml.send('xdr:cNvPicPr') { + xml.send('a:picLocks', :noChangeAspect=>1) + } + } + xml.send('xdr:blipFill') { + xml.send('a:blip', :xmlns:r' => XML_NS_R, :r:embed'=>"rId1") + xml.send('a:stretch') { + xml.send('a:fillRect') + } + } + xml.send('xdr:spPr') { + xml.send('a:xfrm') { + xml.send('a:off', :x=>0, :y=>0) + xml.send('a:ext', :cx=>2336800, :cy=>2161540) + } + xml.send('a:prstGeom', :prst=>:rect) { + xml.send('a:avLst') + } + } + } +end @@ -1515,9 +1468,8 @@ The document builder instance this objects xml will be added to.

    -

    -providing access to the anchor’s width attribute -

    + +

    providing access to the anchor's width attribute

    @@ -1560,10 +1512,9 @@ providing access to the anchor’s width attribute
    # File 'lib/axlsx/drawing/pic.rb', line 89
     
    -def width
    -  @anchor.width
    -end
    -
    +def width + @anchor.width +end @@ -1605,10 +1556,9 @@ providing access to the anchor’s width attribute
    # File 'lib/axlsx/drawing/pic.rb', line 94
     
    -def width=(v)
    -  @anchor.width = v
    -end
    -
    +def width=(v) + @anchor.width = v +end @@ -1619,9 +1569,9 @@ providing access to the anchor’s width attribute
    diff --git a/doc/Axlsx/Pie3DChart.html b/doc/Axlsx/Pie3DChart.html index 8703fd0b..93e662a4 100644 --- a/doc/Axlsx/Pie3DChart.html +++ b/doc/Axlsx/Pie3DChart.html @@ -96,10 +96,9 @@

    Overview

    -

    -The Pie3DChart is a three dimentional piechart (who would have guessed?) -that you can add to your worksheet. -

    + +

    The Pie3DChart is a three dimentional piechart (who would have guessed?) +that you can add to your worksheet.

    @@ -161,9 +160,8 @@ that you can add to your worksheet. -

    -Creates a new pie chart object. -

    +
    +

    Creates a new pie chart object.

    @@ -185,9 +183,8 @@ Creates a new pie chart object. -

    -Serializes the pie chart. -

    +
    +

    Serializes the pie chart.

    @@ -218,9 +215,8 @@ Serializes the pie chart.

    -

    -Creates a new pie chart object -

    + +

    Creates a new pie chart object

    @@ -239,9 +235,8 @@ Creates a new pie chart object — -

    -The workbook that owns this chart. -

    +
    +

    The workbook that owns this chart.

    @@ -258,9 +253,8 @@ The workbook that owns this chart. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -393,12 +387,11 @@ a customizable set of options
    # File 'lib/axlsx/drawing/pie_3D_chart.rb', line 24
     
    -def initialize(frame, options={})
    -  super(frame, options)
    -  @series_type = PieSeries
    -  @view3D = View3D.new({:rotX=>30, :perspective=>30}.merge(options))
    -end
    -
    +def initialize(frame, options={}) + super(frame, options) + @series_type = PieSeries + @view3D = View3D.new({:rotX=>30, :perspective=>30}.merge(options)) +end @@ -420,9 +413,8 @@ a customizable set of options

    -

    -Serializes the pie chart -

    + +

    Serializes the pie chart

    @@ -461,15 +453,14 @@ Serializes the pie chart
    # File 'lib/axlsx/drawing/pie_3D_chart.rb', line 32
     
    -def to_xml
    -  super() do |xml|
    -    xml.send('c:pie3DChart') {
    -      xml.send('c:varyColors', :val=>1)
    -      @series.each { |ser| ser.to_xml(xml) }
    -    }                      
    -  end
    -end
    -
    +def to_xml + super() do |xml| + xml.send('c:pie3DChart') { + xml.send('c:varyColors', :val=>1) + @series.each { |ser| ser.to_xml(xml) } + } + end +end @@ -480,9 +471,9 @@ Serializes the pie chart
    diff --git a/doc/Axlsx/PieSeries.html b/doc/Axlsx/PieSeries.html index 59d0146c..b3b8333c 100644 --- a/doc/Axlsx/PieSeries.html +++ b/doc/Axlsx/PieSeries.html @@ -99,16 +99,14 @@
    Note: -

    -The recommended way to manage series is to use Chart#add_series -

    +
    +

    The recommended way to manage series is to use Chart#add_series

    -

    -A PieSeries defines the data and labels and explosion for pie charts -series. -

    + +

    A PieSeries defines the data and labels and explosion for pie charts +series.

    @@ -153,9 +151,8 @@ series. -

    -The data for this series. -

    +
    +

    The data for this series.

    @@ -180,9 +177,8 @@ The data for this series. -

    -The explosion for this series. -

    +
    +

    The explosion for this series.

    @@ -207,9 +203,8 @@ The explosion for this series. -

    -The labels for this series. -

    +
    +

    The labels for this series.

    @@ -254,9 +249,8 @@ The labels for this series. -

    -Creates a new series. -

    +
    +

    Creates a new series.

    @@ -278,9 +272,8 @@ Creates a new series. -

    -Serializes the series. -

    +
    +

    Serializes the series.

    @@ -311,9 +304,8 @@ Serializes the series.

    -

    -Creates a new series -

    + +

    Creates a new series

    @@ -345,9 +337,8 @@ Creates a new series — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -418,13 +409,12 @@ a customizable set of options
    # File 'lib/axlsx/drawing/pie_series.rb', line 26
     
    -def initialize(chart, options={})
    -  @explosion = nil
    -  super(chart, options)
    -  self.labels = CatAxisData.new(options[:labels]) unless options[:labels].nil?
    -  self.data = ValAxisData.new(options[:data]) unless options[:data].nil?
    -end
    -
    +def initialize(chart, options={}) + @explosion = nil + super(chart, options) + self.labels = CatAxisData.new(options[:labels]) unless options[:labels].nil? + self.data = ValAxisData.new(options[:data]) unless options[:data].nil? +end @@ -447,9 +437,8 @@ a customizable set of options

    -

    -The data for this series. -

    + +

    The data for this series.

    @@ -483,10 +472,9 @@ The data for this series.
    # File 'lib/axlsx/drawing/pie_series.rb', line 10
     
    -def data
    -  @data
    -end
    -
    +def data + @data +end @@ -504,9 +492,8 @@ The data for this series.

    -

    -The explosion for this series -

    + +

    The explosion for this series

    @@ -540,10 +527,9 @@ The explosion for this series
    # File 'lib/axlsx/drawing/pie_series.rb', line 18
     
    -def explosion
    -  @explosion
    -end
    -
    +def explosion + @explosion +end @@ -561,9 +547,8 @@ The explosion for this series

    -

    -The labels for this series. -

    + +

    The labels for this series.

    @@ -597,10 +582,9 @@ The labels for this series.
    # File 'lib/axlsx/drawing/pie_series.rb', line 14
     
    -def labels
    -  @labels
    -end
    -
    +def labels + @labels +end @@ -622,9 +606,8 @@ The labels for this series.

    -

    -Serializes the series -

    + +

    Serializes the series

    @@ -643,9 +626,8 @@ Serializes the series — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -683,14 +665,13 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/pie_series.rb', line 39
     
    -def to_xml(xml)
    -  super(xml) do  |xml_inner|
    -    xml_inner.send('c:explosion', :val=>@explosion) unless @explosion.nil?
    -    @labels.to_xml(xml_inner) unless @labels.nil?
    -    @data.to_xml(xml_inner) unless @data.nil?
    -  end      
    -end
    -
    +def to_xml(xml) + super(xml) do |xml_inner| + xml_inner.send('c:explosion', :val=>@explosion) unless @explosion.nil? + @labels.to_xml(xml_inner) unless @labels.nil? + @data.to_xml(xml_inner) unless @data.nil? + end +end @@ -701,9 +682,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/RegexValidator.html b/doc/Axlsx/RegexValidator.html index f1571271..20182d2a 100644 --- a/doc/Axlsx/RegexValidator.html +++ b/doc/Axlsx/RegexValidator.html @@ -94,9 +94,8 @@

    Overview

    -

    -Validates the value against the regular expression provided. -

    + +

    Validates the value against the regular expression provided.

    @@ -174,10 +173,9 @@ Validates the value against the regular expression provided. — -

    -The name of what is being validated. This is included in the output when -the value is invalid -

    +
    +

    The name of what is being validated. This is included in the output when +the value is invalid

    @@ -192,9 +190,8 @@ the value is invalid — -

    -The regular expression to evaluate -

    +
    +

    The regular expression to evaluate

    @@ -209,9 +206,8 @@ The regular expression to evaluate — -

    -The value to validate. -

    +
    +

    The value to validate.

    @@ -245,10 +241,9 @@ The value to validate.
    # File 'lib/axlsx/util/validators.rb', line 21
     
    -def self.validate(name, regex, v)
    -  raise ArgumentError, (ERR_REGEX % [v.inspect, regex.to_s]) unless (v.respond_to?(:=~) && v =~ regex)
    -end
    -
    +def self.validate(name, regex, v) + raise ArgumentError, (ERR_REGEX % [v.inspect, regex.to_s]) unless (v.respond_to?(:=~) && v =~ regex) +end @@ -259,9 +254,9 @@ The value to validate.
    diff --git a/doc/Axlsx/Relationship.html b/doc/Axlsx/Relationship.html index 6d0f4060..c99f45a4 100644 --- a/doc/Axlsx/Relationship.html +++ b/doc/Axlsx/Relationship.html @@ -97,15 +97,13 @@
    Note: -

    -Packages automatcially manage relationships. -

    +
    +

    Packages automatcially manage relationships.

    -

    -A relationship defines a reference between package parts. -

    + +

    A relationship defines a reference between package parts.

    @@ -137,9 +135,8 @@ A relationship defines a reference between package parts. -

    -The location of the relationship target. -

    +
    +

    The location of the relationship target.

    @@ -164,9 +161,8 @@ The location of the relationship target. -

    -The type of relationship. -

    +
    +

    The type of relationship.

    @@ -203,9 +199,8 @@ The type of relationship. -

    -A new instance of Relationship. -

    +
    +

    A new instance of Relationship.

    @@ -227,9 +222,8 @@ A new instance of Relationship. -

    -Serializes the relationship. -

    +
    +

    Serializes the relationship.

    @@ -250,9 +244,8 @@ Serializes the relationship.

    -

    -A new instance of Relationship -

    + +

    A new instance of Relationship

    @@ -274,11 +267,10 @@ A new instance of Relationship
    # File 'lib/axlsx/rels/relationship.rb', line 24
     
    -def initialize(type, target)
    -  self.Target=target
    -  self.Type=type
    -end
    -
    +def initialize(type, target) + self.Target=target + self.Type=type +end @@ -301,9 +293,8 @@ A new instance of Relationship

    -

    -The location of the relationship target -

    + +

    The location of the relationship target

    @@ -337,10 +328,9 @@ The location of the relationship target
    # File 'lib/axlsx/rels/relationship.rb', line 8
     
    -def Target
    -  @Target
    -end
    -
    +def Target + @Target +end @@ -361,15 +351,13 @@ The location of the relationship target
    Note: -

    -Supported types are defined as constants in Axlsx: -

    +
    +

    Supported types are defined as constants in Axlsx:

    -

    -The type of relationship -

    + +

    The type of relationship

    @@ -428,10 +416,9 @@ The type of relationship
    # File 'lib/axlsx/rels/relationship.rb', line 23
     
    -def Type
    -  @Type
    -end
    -
    +def Type + @Type +end @@ -453,9 +440,8 @@ The type of relationship

    -

    -Serializes the relationship -

    + +

    Serializes the relationship

    @@ -474,9 +460,8 @@ Serializes the relationship — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -491,9 +476,8 @@ The document builder instance this objects xml will be added to. — -

    -the reference id of the object. -

    +
    +

    the reference id of the object.

    @@ -529,12 +513,11 @@ the reference id of the object.
    # File 'lib/axlsx/rels/relationship.rb', line 38
     
    -def to_xml(xml, rId)
    -  h = self.instance_values
    -  h[:Id] = rId
    -  xml.Relationship(h)
    -end
    -
    +def to_xml(xml, rId) + h = self.instance_values + h[:Id] = rId + xml.Relationship(h) +end @@ -545,9 +528,9 @@ the reference id of the object.
    diff --git a/doc/Axlsx/Relationships.html b/doc/Axlsx/Relationships.html index 28523893..c0811bdb 100644 --- a/doc/Axlsx/Relationships.html +++ b/doc/Axlsx/Relationships.html @@ -99,16 +99,14 @@
    Note: -

    -The package automatically manages releationships. -

    +
    +

    The package automatically manages releationships.

    -

    -Relationships are a collection of Relations that define how package parts -are related. -

    + +

    Relationships are a collection of Relations that define how package parts +are related.

    @@ -159,9 +157,8 @@ are related. -

    -Creates a new Relationships collection based on SimpleTypedList. -

    +
    +

    Creates a new Relationships collection based on SimpleTypedList.

    @@ -183,9 +180,8 @@ Creates a new Relationships collection based on SimpleTypedList. -

    -Serializes the relationships document. -

    +
    +

    Serializes the relationships document.

    @@ -211,9 +207,8 @@ Serializes the relationships document.

    -

    -Creates a new Relationships collection based on SimpleTypedList -

    + +

    Creates a new Relationships collection based on SimpleTypedList

    @@ -234,10 +229,9 @@ Creates a new Relationships collection based on SimpleTypedList
    # File 'lib/axlsx/rels/relationships.rb', line 9
     
    -def initialize
    -  super Relationship
    -end
    -
    +def initialize + super Relationship +end @@ -269,9 +263,8 @@ Creates a new Relationships collection based on SimpleTypedList

    -

    -Serializes the relationships document. -

    + +

    Serializes the relationships document.

    @@ -310,15 +303,14 @@ Serializes the relationships document.
    # File 'lib/axlsx/rels/relationships.rb', line 15
     
    -def to_xml()
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.Relationships(:xmlns => Axlsx::RELS_R) {
    -      each_with_index { |rel, index| rel.to_xml(xml, "rId#{index+1}") }
    -    }
    -  end
    -  builder.to_xml
    -end
    -
    +def to_xml() + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.Relationships(:xmlns => Axlsx::RELS_R) { + each_with_index { |rel, index| rel.to_xml(xml, "rId#{index+1}") } + } + end + builder.to_xml +end @@ -329,9 +321,9 @@ Serializes the relationships document.
    diff --git a/doc/Axlsx/RestrictionValidator.html b/doc/Axlsx/RestrictionValidator.html index 14a579a1..9822a2a2 100644 --- a/doc/Axlsx/RestrictionValidator.html +++ b/doc/Axlsx/RestrictionValidator.html @@ -94,9 +94,8 @@

    Overview

    -

    -Validate a value against a specific list of allowed values. -

    + +

    Validate a value against a specific list of allowed values.

    @@ -133,9 +132,8 @@ Validate a value against a specific list of allowed values. -

    -Perform validation. -

    +
    +

    Perform validation.

    @@ -159,9 +157,8 @@ Perform validation.

    -

    -Perform validation -

    + +

    Perform validation

    @@ -180,9 +177,8 @@ Perform validation — -

    -The name of what is being validatied. This is included in the error message -

    +
    +

    The name of what is being validatied. This is included in the error message

    @@ -197,9 +193,8 @@ The name of what is being validatied. This is included in the error message — -

    -The list of choices to validate against -

    +
    +

    The list of choices to validate against

    @@ -214,9 +209,8 @@ The list of choices to validate against — -

    -The value to be validated -

    +
    +

    The value to be validated

    @@ -234,9 +228,8 @@ The value to be validated — -

    -true if validation succeeds. -

    +
    +

    true if validation succeeds.

    @@ -253,9 +246,8 @@ true if validation succeeds. — -

    -Raised if the value provided is not in the list of choices. -

    +
    +

    Raised if the value provided is not in the list of choices.

    @@ -276,11 +268,10 @@ Raised if the value provided is not in the list of choices.
    # File 'lib/axlsx/util/validators.rb', line 10
     
    -def self.validate(name, choices, v)
    -  raise ArgumentError, (ERR_RESTRICTION % [v.to_s, name, choices.inspect]) unless choices.include?(v)      
    -  true
    -end
    -
    +def self.validate(name, choices, v) + raise ArgumentError, (ERR_RESTRICTION % [v.to_s, name, choices.inspect]) unless choices.include?(v) + true +end @@ -291,9 +282,9 @@ Raised if the value provided is not in the list of choices.
    diff --git a/doc/Axlsx/Row.html b/doc/Axlsx/Row.html index e8623faa..605336b7 100644 --- a/doc/Axlsx/Row.html +++ b/doc/Axlsx/Row.html @@ -97,15 +97,13 @@
    Note: -

    -The recommended way to manage rows and cells is to use Worksheet#add_row -

    +
    +

    The recommended way to manage rows and cells is to use Worksheet#add_row

    -

    -A Row is a single row in a worksheet. -

    + +

    A Row is a single row in a worksheet.

    @@ -144,9 +142,8 @@ A Row is a single row in a worksheet. -

    -The cells this row holds. -

    +
    +

    The cells this row holds.

    @@ -171,9 +168,8 @@ The cells this row holds. -

    -The worksheet this row belongs to. -

    +
    +

    The worksheet this row belongs to.

    @@ -208,10 +204,9 @@ The worksheet this row belongs to. -

    -Adds a singel sell to the row based on the data provided and updates the -worksheet’s autofit data. -

    +
    +

    Adds a singel sell to the row based on the data provided and updates the +worksheet's autofit data.

    @@ -233,9 +228,8 @@ worksheet’s autofit data. -

    -The index of this row in the worksheet. -

    +
    +

    The index of this row in the worksheet.

    @@ -259,9 +253,8 @@ The index of this row in the worksheet. -

    -Creates a new row. -

    +
    +

    Creates a new row.

    @@ -283,9 +276,8 @@ Creates a new row. -

    -sets the style for every cell in this row. -

    +
    +

    sets the style for every cell in this row.

    @@ -307,10 +299,9 @@ sets the style for every cell in this row. -

    -returns the cells in this row as an array This lets us transpose the rows -into columns. -

    +
    +

    returns the cells in this row as an array This lets us transpose the rows +into columns.

    @@ -332,9 +323,8 @@ into columns. -

    -Serializes the row. -

    +
    +

    Serializes the row.

    @@ -355,19 +345,17 @@ Serializes the row.

    -

    -Creates a new row. New Cell objects are created based on the values, types + +

    Creates a new row. New Cell objects are created based on the values, types and style options. A new cell is created for each item in the values array. -style and types options are applied as follows: -

    -
    -  If the types option is defined and is a symbol it is applied to all the cells created.
    -  If the types option is an array, cell types are applied by index for each cell
    -  If the types option is not set, the cell will automatically determine its type.
    -  If the style option is defined and is an Integer, it is applied to all cells created.
    -  If the style option is an array, style is applied by index for each cell.
    -  If the style option is not defined, the default style (0) is applied to each cell.
    -
    +style and types options are applied as follows:

    + +
    If the types option is defined and is a symbol it is applied to all the cells created.
    +If the types option is an array, cell types are applied by index for each cell
    +If the types option is not set, the cell will automatically determine its type.
    +If the style option is defined and is an Integer, it is applied to all cells created.
    +If the style option is an array, style is applied by index for each cell.
    +If the style option is not defined, the default style (0) is applied to each cell.
    @@ -399,9 +387,8 @@ style and types options are applied as follows: — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -474,13 +461,12 @@ a customizable set of options
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 29
     
    -def initialize(worksheet, values=[], options={})
    -  self.worksheet = worksheet
    -  @cells = SimpleTypedList.new Cell
    -  @worksheet.rows << self
    -  array_to_cells(values, options)
    -end
    -
    +def initialize(worksheet, values=[], options={}) + self.worksheet = worksheet + @cells = SimpleTypedList.new Cell + @worksheet.rows << self + array_to_cells(values, options) +end @@ -503,9 +489,8 @@ a customizable set of options

    -

    -The cells this row holds -

    + +

    The cells this row holds

    @@ -539,10 +524,9 @@ The cells this row holds
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 13
     
    -def cells
    -  @cells
    -end
    -
    +def cells + @cells +end @@ -560,9 +544,8 @@ The cells this row holds

    -

    -The worksheet this row belongs to -

    + +

    The worksheet this row belongs to

    @@ -596,10 +579,9 @@ The worksheet this row belongs to
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 9
     
    -def worksheet
    -  @worksheet
    -end
    -
    +def worksheet + @worksheet +end @@ -621,10 +603,9 @@ The worksheet this row belongs to

    -

    -Adds a singel sell to the row based on the data provided and updates the -worksheet’s autofit data. -

    + +

    Adds a singel sell to the row based on the data provided and updates the +worksheet's autofit data.

    @@ -660,12 +641,11 @@ worksheet’s autofit data.
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 51
     
    -def add_cell(value="", options={})
    -  c = Cell.new(self, value, options)
    -  update_auto_fit_data
    -  c
    -end
    -
    +def add_cell(value="", options={}) + c = Cell.new(self, value, options) + update_auto_fit_data + c +end @@ -680,9 +660,8 @@ worksheet’s autofit data.

    -

    -The index of this row in the worksheet -

    + +

    The index of this row in the worksheet

    @@ -716,10 +695,9 @@ The index of this row in the worksheet
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 38
     
    -def index 
    -  worksheet.rows.index(self)
    -end
    -
    +def index + worksheet.rows.index(self) +end @@ -734,9 +712,8 @@ The index of this row in the worksheet

    -

    -sets the style for every cell in this row -

    + +

    sets the style for every cell in this row

    @@ -760,13 +737,12 @@ sets the style for every cell in this row
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 58
     
    -def style=(style)
    -  cells.each_with_index do | cell, index |
    -    s = style.is_a?(Array) ? style[index] : style
    -    cell.style = s
    -  end
    -end
    -
    +def style=(style) + cells.each_with_index do | cell, index | + s = style.is_a?(Array) ? style[index] : style + cell.style = s + end +end @@ -781,10 +757,9 @@ sets the style for every cell in this row

    -

    -returns the cells in this row as an array This lets us transpose the rows -into columns -

    + +

    returns the cells in this row as an array This lets us transpose the rows +into columns

    @@ -818,10 +793,9 @@ into columns
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 68
     
    -def to_ary
    -  @cells.to_ary
    -end
    -
    +def to_ary + @cells.to_ary +end @@ -836,9 +810,8 @@ into columns

    -

    -Serializes the row -

    + +

    Serializes the row

    @@ -857,9 +830,8 @@ Serializes the row — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -893,10 +865,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/workbook/worksheet/row.rb', line 45
     
    -def to_xml(xml)
    -  xml.row(:r => index+1) { @cells.each { |cell| cell.to_xml(xml) } }
    -end
    -
    +def to_xml(xml) + xml.row(:r => index+1) { @cells.each { |cell| cell.to_xml(xml) } } +end @@ -907,9 +878,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Scaling.html b/doc/Axlsx/Scaling.html index e4b9881e..66f20a5e 100644 --- a/doc/Axlsx/Scaling.html +++ b/doc/Axlsx/Scaling.html @@ -94,9 +94,8 @@

    Overview

    -

    -The Scaling class defines axis scaling -

    + +

    The Scaling class defines axis scaling

    @@ -128,9 +127,8 @@ The Scaling class defines axis scaling -

    -logarithmic base for a logarithmic axis. -

    +
    +

    logarithmic base for a logarithmic axis.

    @@ -155,9 +153,8 @@ logarithmic base for a logarithmic axis. -

    -the maximum scaling. -

    +
    +

    the maximum scaling.

    @@ -182,9 +179,8 @@ the maximum scaling. -

    -the minimu scaling. -

    +
    +

    the minimu scaling.

    @@ -209,9 +205,8 @@ the minimu scaling. -

    -the orientation of the axis must be one of [:minMax, :maxMin]. -

    +
    +

    the orientation of the axis must be one of [:minMax, :maxMin].

    @@ -248,9 +243,8 @@ the orientation of the axis must be one of [:minMax, :maxMin]. -

    -creates a new Scaling object. -

    +
    +

    creates a new Scaling object.

    @@ -272,9 +266,8 @@ creates a new Scaling object. -

    -Serializes the axId. -

    +
    +

    Serializes the axId.

    @@ -295,9 +288,8 @@ Serializes the axId.

    -

    -creates a new Scaling object -

    + +

    creates a new Scaling object

    @@ -318,9 +310,8 @@ creates a new Scaling object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -390,14 +381,13 @@ a customizable set of options
    # File 'lib/axlsx/drawing/scaling.rb', line 28
     
    -def initialize(options={})
    -  @orientation = :minMax
    -  @logBase, @min, @max = nil, nil, nil
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + @orientation = :minMax + @logBase, @min, @max = nil, nil, nil + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -420,9 +410,8 @@ a customizable set of options

    -

    -logarithmic base for a logarithmic axis. must be between 2 and 1000 -

    + +

    logarithmic base for a logarithmic axis. must be between 2 and 1000

    @@ -456,10 +445,9 @@ logarithmic base for a logarithmic axis. must be between 2 and 1000
    # File 'lib/axlsx/drawing/scaling.rb', line 8
     
    -def logBase
    -  @logBase
    -end
    -
    +def logBase + @logBase +end @@ -477,9 +465,8 @@ logarithmic base for a logarithmic axis. must be between 2 and 1000

    -

    -the maximum scaling -

    + +

    the maximum scaling

    @@ -513,10 +500,9 @@ the maximum scaling
    # File 'lib/axlsx/drawing/scaling.rb', line 17
     
    -def max
    -  @max
    -end
    -
    +def max + @max +end @@ -534,9 +520,8 @@ the maximum scaling

    -

    -the minimu scaling -

    + +

    the minimu scaling

    @@ -570,10 +555,9 @@ the minimu scaling
    # File 'lib/axlsx/drawing/scaling.rb', line 21
     
    -def min
    -  @min
    -end
    -
    +def min + @min +end @@ -591,9 +575,8 @@ the minimu scaling

    -

    -the orientation of the axis must be one of [:minMax, :maxMin] -

    + +

    the orientation of the axis must be one of [:minMax, :maxMin]

    @@ -627,10 +610,9 @@ the orientation of the axis must be one of [:minMax, :maxMin]
    # File 'lib/axlsx/drawing/scaling.rb', line 13
     
    -def orientation
    -  @orientation
    -end
    -
    +def orientation + @orientation +end @@ -652,9 +634,8 @@ the orientation of the axis must be one of [:minMax, :maxMin]

    -

    -Serializes the axId -

    + +

    Serializes the axId

    @@ -673,9 +654,8 @@ Serializes the axId — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -714,15 +694,14 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/scaling.rb', line 49
     
    -def to_xml(xml)
    -  xml.send('c:scaling') {
    -    xml.send('c:logBase', :val=> @logBase) unless @logBase.nil?
    -    xml.send('c:orientation', :val=> @orientation) unless @orientation.nil?
    -    xml.send('c:min', :val => @min) unless @min.nil?
    -    xml.send('c:max', :val => @max) unless @max.nil?
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:scaling') { + xml.send('c:logBase', :val=> @logBase) unless @logBase.nil? + xml.send('c:orientation', :val=> @orientation) unless @orientation.nil? + xml.send('c:min', :val => @min) unless @min.nil? + xml.send('c:max', :val => @max) unless @max.nil? + } +end @@ -733,9 +712,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/SerAxis.html b/doc/Axlsx/SerAxis.html index 6d122772..bd7e6573 100644 --- a/doc/Axlsx/SerAxis.html +++ b/doc/Axlsx/SerAxis.html @@ -96,9 +96,8 @@

    Overview

    -

    -A SerAxis object defines a series axis -

    + +

    A SerAxis object defines a series axis

    @@ -134,9 +133,8 @@ A SerAxis object defines a series axis -

    -The number of tick lables to skip between labels. -

    +
    +

    The number of tick lables to skip between labels.

    @@ -161,9 +159,8 @@ The number of tick lables to skip between labels. -

    -The number of tickmarks to be skipped before the next one is rendered. -

    +
    +

    The number of tickmarks to be skipped before the next one is rendered.

    @@ -208,9 +205,8 @@ The number of tickmarks to be skipped before the next one is rendered. -

    -Creates a new SerAxis object. -

    +
    +

    Creates a new SerAxis object.

    @@ -232,9 +228,8 @@ Creates a new SerAxis object. -

    -Serializes the series axis. -

    +
    +

    Serializes the series axis.

    @@ -260,9 +255,8 @@ Serializes the series axis.

    -

    -Creates a new SerAxis object -

    + +

    Creates a new SerAxis object

    @@ -281,9 +275,8 @@ Creates a new SerAxis object — -

    -the id of this axis. Inherited -

    +
    +

    the id of this axis. Inherited

    @@ -298,9 +291,8 @@ the id of this axis. Inherited — -

    -the id of the perpendicular axis. Inherited -

    +
    +

    the id of the perpendicular axis. Inherited

    @@ -317,9 +309,8 @@ the id of the perpendicular axis. Inherited — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -342,9 +333,8 @@ a customizable set of options - —

    -Inherited -

    + —
    +

    Inherited

    @@ -354,9 +344,8 @@ Inherited - —

    -Inherited -

    + —
    +

    Inherited

    @@ -366,9 +355,8 @@ Inherited - —

    -Inherited -

    + —
    +

    Inherited

    @@ -408,11 +396,10 @@ Inherited
    # File 'lib/axlsx/drawing/ser_axis.rb', line 21
     
    -def initialize(axId, crossAx, options={})
    -  @tickLblSkip, @tickMarkSkip = nil, nil
    -  super(axId, crossAx, options)
    -end
    -
    +def initialize(axId, crossAx, options={}) + @tickLblSkip, @tickMarkSkip = nil, nil + super(axId, crossAx, options) +end @@ -435,9 +422,8 @@ Inherited

    -

    -The number of tick lables to skip between labels -

    + +

    The number of tick lables to skip between labels

    @@ -471,10 +457,9 @@ The number of tick lables to skip between labels
    # File 'lib/axlsx/drawing/ser_axis.rb', line 7
     
    -def tickLblSkip
    -  @tickLblSkip
    -end
    -
    +def tickLblSkip + @tickLblSkip +end @@ -492,9 +477,8 @@ The number of tick lables to skip between labels

    -

    -The number of tickmarks to be skipped before the next one is rendered. -

    + +

    The number of tickmarks to be skipped before the next one is rendered.

    @@ -528,10 +512,9 @@ The number of tickmarks to be skipped before the next one is rendered.
    # File 'lib/axlsx/drawing/ser_axis.rb', line 11
     
    -def tickMarkSkip
    -  @tickMarkSkip
    -end
    -
    +def tickMarkSkip + @tickMarkSkip +end @@ -553,9 +536,8 @@ The number of tickmarks to be skipped before the next one is rendered.

    -

    -Serializes the series axis -

    + +

    Serializes the series axis

    @@ -574,9 +556,8 @@ Serializes the series axis — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -614,14 +595,13 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/ser_axis.rb', line 35
     
    -def to_xml(xml)
    -  xml.send('c:serAx') {
    -    super(xml)
    -    xml.send('c:tickLblSkip', :val=>@tickLblSkip) unless @tickLblSkip.nil?
    -    xml.send('c:tickMarkSkip', :val=>@tickMarkSkip) unless @tickMarkSkip.nil?
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:serAx') { + super(xml) + xml.send('c:tickLblSkip', :val=>@tickLblSkip) unless @tickLblSkip.nil? + xml.send('c:tickMarkSkip', :val=>@tickMarkSkip) unless @tickMarkSkip.nil? + } +end @@ -632,9 +612,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Series.html b/doc/Axlsx/Series.html index 6142ec01..496fbfa3 100644 --- a/doc/Axlsx/Series.html +++ b/doc/Axlsx/Series.html @@ -97,16 +97,14 @@
    Note: -

    -The recommended way to manage series is to use Chart#add_series -

    +
    +

    The recommended way to manage series is to use Chart#add_series

    -

    -A Series defines the common series attributes and is the super class for -all concrete series types. -

    + +

    A Series defines the common series attributes and is the super class for +all concrete series types.

    @@ -151,9 +149,8 @@ all concrete series types. -

    -The chart that owns this series. -

    +
    +

    The chart that owns this series.

    @@ -178,9 +175,8 @@ The chart that owns this series. -

    -The title of the series. -

    +
    +

    The title of the series.

    @@ -215,9 +211,8 @@ The title of the series. -

    -The index of this series in the chart’s series. -

    +
    +

    The index of this series in the chart's series.

    @@ -241,9 +236,8 @@ The index of this series in the chart’s series. -

    -Creates a new series. -

    +
    +

    Creates a new series.

    @@ -265,9 +259,8 @@ Creates a new series. -

    -The order of this series in the chart’s series. -

    +
    +

    The order of this series in the chart's series.

    @@ -291,30 +284,6 @@ The order of this series in the chart’s series.
    - - - -
  • - - - - (String) to_xml(xml) - - - - - - - - - - - - -

    -Serializes the series. -

    -
    -
  • @@ -333,9 +302,8 @@ Serializes the series.

    -

    -Creates a new series -

    + +

    Creates a new series

    @@ -367,9 +335,8 @@ Creates a new series — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -424,15 +391,14 @@ a customizable set of options
    # File 'lib/axlsx/drawing/series.rb', line 20
     
    -def initialize(chart, options={})
    -  @order = nil
    -  self.chart = chart
    -  @chart.series << self
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(chart, options={}) + @order = nil + self.chart = chart + @chart.series << self + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -455,9 +421,8 @@ a customizable set of options

    -

    -The chart that owns this series -

    + +

    The chart that owns this series

    @@ -491,10 +456,9 @@ The chart that owns this series
    # File 'lib/axlsx/drawing/series.rb', line 10
     
    -def chart
    -  @chart
    -end
    -
    +def chart + @chart +end @@ -512,9 +476,8 @@ The chart that owns this series

    -

    -The title of the series -

    + +

    The title of the series

    @@ -548,10 +511,9 @@ The title of the series
    # File 'lib/axlsx/drawing/series.rb', line 14
     
    -def title
    -  @title
    -end
    -
    +def title + @title +end @@ -573,9 +535,8 @@ The title of the series

    -

    -The index of this series in the chart’s series. -

    + +

    The index of this series in the chart's series.

    @@ -609,10 +570,9 @@ The index of this series in the chart’s series.
    # File 'lib/axlsx/drawing/series.rb', line 31
     
    -def index
    -  @chart.series.index(self)
    -end
    -
    +def index + @chart.series.index(self) +end @@ -627,10 +587,9 @@ The index of this series in the chart’s series.

    -

    -The order of this series in the chart’s series. By default the order -is the index of the series. -

    + +

    The order of this series in the chart's series. By default the order is the +index of the series.

    @@ -664,10 +623,9 @@ is the index of the series.
    # File 'lib/axlsx/drawing/series.rb', line 38
     
    -def order
    -  @order || index
    -end
    -
    +def order + @order || index +end @@ -707,93 +665,7 @@ is the index of the series.
    # File 'lib/axlsx/drawing/series.rb', line 43
     
    -def order=(v)  Axlsx::validate_unsigned_int(v); @order = v end
    -
    - - - -
    - -
    -

    - - - (String) to_xml(xml) - - - -

    -
    -

    -Serializes the series -

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - xml - - - (Nokogiri::XML::Builder) - - - - — -

      -The document builder instance this objects xml will be added to. -

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (String) - - - -
    • - -
    - -
    - - -
    -
    -
    -
    -60
    -61
    -62
    -63
    -64
    -65
    -66
    -67
    -
    -
    # File 'lib/axlsx/drawing/series.rb', line 60
    -
    -def to_xml(xml)
    -  xml.send('c:ser') {
    -    xml.send('c:idx', :val=>index)
    -    xml.send('c:order', :val=>order || index)        
    -    title.to_xml(xml) unless title.nil?
    -    yield xml if block_given?
    -  }
    -end
    -
    +def order=(v) Axlsx::validate_unsigned_int(v); @order = v; end
    @@ -804,9 +676,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/SeriesTitle.html b/doc/Axlsx/SeriesTitle.html index 43e526d1..6a687fb7 100644 --- a/doc/Axlsx/SeriesTitle.html +++ b/doc/Axlsx/SeriesTitle.html @@ -96,10 +96,9 @@

    Overview

    -

    -A series title is a Title with a slightly different serialization than -chart titles. -

    + +

    A series title is a Title with a slightly different serialization than +chart titles.

    @@ -148,9 +147,8 @@ chart titles. -

    -Serializes the series title. -

    +
    +

    Serializes the series title.

    @@ -190,9 +188,8 @@ Serializes the series title.

    -

    -Serializes the series title -

    + +

    Serializes the series title

    @@ -211,9 +208,8 @@ Serializes the series title — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -257,20 +253,19 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/series_title.rb', line 8
     
    -def to_xml(xml)
    -  xml.send('c:tx') {
    -    xml.send('c:strRef') {
    -      xml.send('c:f', Axlsx::cell_range([@cell]))
    -      xml.send('c:strCache') {
    -        xml.send('c:ptCount', :val=>1)
    -        xml.send('c:pt', :idx=>0) {
    -          xml.send('c:v', @text)
    -        }
    -      }
    -    }
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:tx') { + xml.send('c:strRef') { + xml.send('c:f', Axlsx::cell_range([@cell])) + xml.send('c:strCache') { + xml.send('c:ptCount', :val=>1) + xml.send('c:pt', :idx=>0) { + xml.send('c:v', @text) + } + } + } + } +end @@ -281,9 +276,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Styles.html b/doc/Axlsx/Styles.html index 1ce1ddc5..f60cee9b 100644 --- a/doc/Axlsx/Styles.html +++ b/doc/Axlsx/Styles.html @@ -97,20 +97,18 @@
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The Styles class manages worksheet styles In addition to creating the + +

    The Styles class manages worksheet styles In addition to creating the require style objects for a valid xlsx package, this class provides the key mechanism for adding styles to your workbook, and safely applying them to the cells of your worksheet. All portions of the stylesheet are implemented here exception colors, which specify legacy and modified pallete colors, -and exLst, whic is used as a future feature data storage area. -

    +and exLst, whic is used as a future feature data storage area.

    @@ -151,10 +149,9 @@ and exLst, whic is used as a future feature data storage area. -

    -The collection of borders used in this workbook Axlsx predefines -THIN_BORDER which can be used to put a border around all of your cells. -

    +
    +

    The collection of borders used in this workbook Axlsx predefines +THIN_BORDER which can be used to put a border around all of your cells.

    @@ -179,10 +176,9 @@ THIN_BORDER which can be used to put a border around all of your cells. -

    -The collection of named styles, referencing cellStyleXfs items in the -workbook. -

    +
    +

    The collection of named styles, referencing cellStyleXfs items in the +workbook.

    @@ -207,10 +203,9 @@ workbook. -

    -The collection of master formatting records for named cell styles, which -means records defined in cellStyles, in the workbook. -

    +
    +

    The collection of master formatting records for named cell styles, which +means records defined in cellStyles, in the workbook.

    @@ -235,9 +230,8 @@ means records defined in cellStyles, in the workbook. -

    -The collection of master formatting records. -

    +
    +

    The collection of master formatting records.

    @@ -262,9 +256,8 @@ The collection of master formatting records. -

    -The collection of non-cell formatting records used in the worksheet. -

    +
    +

    The collection of non-cell formatting records used in the worksheet.

    @@ -289,9 +282,8 @@ The collection of non-cell formatting records used in the worksheet. -

    -The collection of fills used in this workbook. -

    +
    +

    The collection of fills used in this workbook.

    @@ -316,9 +308,8 @@ The collection of fills used in this workbook. -

    -The collection of fonts used in this workbook. -

    +
    +

    The collection of fonts used in this workbook.

    @@ -343,9 +334,8 @@ The collection of fonts used in this workbook. -

    -numFmts for your styles. -

    +
    +

    numFmts for your styles.

    @@ -370,10 +360,9 @@ numFmts for your styles. -

    -The collection of table styles that will be available to the user in the -excel UI. -

    +
    +

    The collection of table styles that will be available to the user in the +excel UI.

    @@ -408,9 +397,8 @@ excel UI. -

    -Drastically simplifies style creation and management. -

    +
    +

    Drastically simplifies style creation and management.

    @@ -434,10 +422,9 @@ Drastically simplifies style creation and management. -

    -Creates a new Styles object and prepopulates it with the requires objects -to generate a valid package style part. -

    +
    +

    Creates a new Styles object and prepopulates it with the requires objects +to generate a valid package style part.

    @@ -459,9 +446,8 @@ to generate a valid package style part. -

    -Serializes the styles document. -

    +
    +

    Serializes the styles document.

    @@ -482,10 +468,9 @@ Serializes the styles document.

    -

    -Creates a new Styles object and prepopulates it with the requires objects -to generate a valid package style part. -

    + +

    Creates a new Styles object and prepopulates it with the requires objects +to generate a valid package style part.

    @@ -506,10 +491,9 @@ to generate a valid package style part.
    # File 'lib/axlsx/stylesheet/styles.rb', line 118
     
    -def initialize()
    -  load_default_styles
    -end
    -
    +def initialize() + load_default_styles +end @@ -535,16 +519,14 @@ to generate a valid package style part.
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of borders used in this workbook Axlsx predefines -THIN_BORDER which can be used to put a border around all of your cells. -

    + +

    The collection of borders used in this workbook Axlsx predefines +THIN_BORDER which can be used to put a border around all of your cells.

    @@ -585,10 +567,9 @@ THIN_BORDER which can be used to put a border around all of your cells.
    # File 'lib/axlsx/stylesheet/styles.rb', line 85
     
    -def borders
    -  @borders
    -end
    -
    +def borders + @borders +end @@ -609,16 +590,14 @@ THIN_BORDER which can be used to put a border around all of your cells.
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of named styles, referencing cellStyleXfs items in the -workbook. -

    + +

    The collection of named styles, referencing cellStyleXfs items in the +workbook.

    @@ -659,10 +638,9 @@ workbook.
    # File 'lib/axlsx/stylesheet/styles.rb', line 97
     
    -def cellStyles
    -  @cellStyles
    -end
    -
    +def cellStyles + @cellStyles +end @@ -683,16 +661,14 @@ workbook.
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of master formatting records for named cell styles, which -means records defined in cellStyles, in the workbook -

    + +

    The collection of master formatting records for named cell styles, which +means records defined in cellStyles, in the workbook

    @@ -733,10 +709,9 @@ means records defined in cellStyles, in the workbook
    # File 'lib/axlsx/stylesheet/styles.rb', line 91
     
    -def cellStyleXfs
    -  @cellStyleXfs
    -end
    -
    +def cellStyleXfs + @cellStyleXfs +end @@ -757,16 +732,14 @@ means records defined in cellStyles, in the workbook
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of master formatting records. This is the list that you will -actually use in styling a workbook. -

    + +

    The collection of master formatting records. This is the list that you will +actually use in styling a workbook.

    @@ -807,10 +780,9 @@ actually use in styling a workbook.
    # File 'lib/axlsx/stylesheet/styles.rb', line 103
     
    -def cellXfs
    -  @cellXfs
    -end
    -
    +def cellXfs + @cellXfs +end @@ -831,15 +803,13 @@ actually use in styling a workbook.
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of non-cell formatting records used in the worksheet. -

    + +

    The collection of non-cell formatting records used in the worksheet.

    @@ -880,10 +850,9 @@ The collection of non-cell formatting records used in the worksheet.
    # File 'lib/axlsx/stylesheet/styles.rb', line 109
     
    -def dxfs
    -  @dxfs
    -end
    -
    +def dxfs + @dxfs +end @@ -904,15 +873,13 @@ The collection of non-cell formatting records used in the worksheet.
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of fills used in this workbook -

    + +

    The collection of fills used in this workbook

    @@ -953,10 +920,9 @@ The collection of fills used in this workbook
    # File 'lib/axlsx/stylesheet/styles.rb', line 78
     
    -def fills
    -  @fills
    -end
    -
    +def fills + @fills +end @@ -977,15 +943,13 @@ The collection of fills used in this workbook
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of fonts used in this workbook -

    + +

    The collection of fonts used in this workbook

    @@ -1026,10 +990,9 @@ The collection of fonts used in this workbook
    # File 'lib/axlsx/stylesheet/styles.rb', line 72
     
    -def fonts
    -  @fonts
    -end
    -
    +def fonts + @fonts +end @@ -1050,51 +1013,48 @@ The collection of fonts used in this workbook
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -numFmts for your styles. -

    -
    - The default styles, which change based on the system local, are as follows.
    - id formatCode
    -  0 General
    -  1 0
    -  2 0.00
    -  3 #,##0
    -  4 #,##0.00
    -  9 0%
    -  10 0.00%
    -  11 0.00E+00
    -  12 #   ?/?
    -  13 #   ??/??
    -  14 mm-dd-yy
    -  15 d-mmm-yy
    -  16 d-mmm
    -  17 mmm-yy
    -  18 h:mm AM/PM
    -  19 h:mm:ss AM/PM
    -  20 h:mm
    -  21 h:mm:ss
    -  22 m/d/yy h:mm
    -  37 #,##0 ;(#,##0)
    -  38 #,##0 ;[Red](#,##0)
    -  39 #,##0.00;(#,##0.00)
    -  40 #,##0.00;[Red](#,##0.00)
    -  45 mm:ss
    -  46 [h]:mm:ss
    -  47 mmss.0
    -  48 ##0.0E+0
    -  49 @
    - Axlsx also defines the following constants which you can use in add_style.
    -    NUM_FMT_PERCENT formats to "0%"
    -    NUM_FMT_YYYYMMDD formats to "yyyy/mm/dd"
    -    NUM_FMT_YYYYMMDDHHMMSS  formats to "yyyy/mm/dd hh:mm:ss"
    -
    + +

    numFmts for your styles.

    + +
    The default styles, which change based on the system local, are as follows.
    +id formatCode
    + 0 General
    + 1 0
    + 2 0.00
    + 3 #,##0
    + 4 #,##0.00
    + 9 0%
    + 10 0.00%
    + 11 0.00E+00
    + 12 #   ?/?
    + 13 #   ??/??
    + 14 mm-dd-yy
    + 15 d-mmm-yy
    + 16 d-mmm
    + 17 mmm-yy
    + 18 h:mm AM/PM
    + 19 h:mm:ss AM/PM
    + 20 h:mm
    + 21 h:mm:ss
    + 22 m/d/yy h:mm
    + 37 #,##0 ;(#,##0)
    + 38 #,##0 ;[Red](#,##0)
    + 39 #,##0.00;(#,##0.00)
    + 40 #,##0.00;[Red](#,##0.00)
    + 45 mm:ss
    + 46 [h]:mm:ss
    + 47 mmss.0
    + 48 ##0.0E+0
    + 49 @
    +Axlsx also defines the following constants which you can use in add_style.
    +   NUM_FMT_PERCENT formats to "0%"
    +   NUM_FMT_YYYYMMDD formats to "yyyy/mm/dd"
    +   NUM_FMT_YYYYMMDDHHMMSS  formats to "yyyy/mm/dd hh:mm:ss"
    @@ -1137,10 +1097,9 @@ numFmts for your styles.
    # File 'lib/axlsx/stylesheet/styles.rb', line 66
     
    -def numFmts
    -  @numFmts
    -end
    -
    +def numFmts + @numFmts +end @@ -1161,16 +1120,14 @@ numFmts for your styles.
    Note: -

    -The recommended way to manage styles is with add_style -

    +
    +

    The recommended way to manage styles is with add_style

    -

    -The collection of table styles that will be available to the user in the -excel UI -

    + +

    The collection of table styles that will be available to the user in the +excel UI

    @@ -1211,10 +1168,9 @@ excel UI
    # File 'lib/axlsx/stylesheet/styles.rb', line 115
     
    -def tableStyles
    -  @tableStyles
    -end
    -
    +def tableStyles + @tableStyles +end @@ -1236,9 +1192,8 @@ excel UI

    -

    -Drastically simplifies style creation and management. -

    + +

    Drastically simplifies style creation and management.

    @@ -1248,63 +1203,59 @@ Drastically simplifies style creation and management.

    Examples:

    -

    -You Got Style -

    +

    +

    You Got Style

    -
    require "rubygems" # if that is your preferred way to manage gems!
    -require "axlsx"
    +      
    require "rubygems" # if that is your preferred way to manage gems!
    +require "axlsx"
     
    -p = Axlsx::Package.new
    -ws = p.workbook.add_worksheet
    +p = Axlsx::Package.new
    +ws = p.workbook.add_worksheet
     
    -# black text on a white background at 14pt with thin borders!
    -title = ws.style.add_style(:bg_color => "FFFF0000", :fg_color=>"#FF000000", :sz=>14,  :border=>Axlsx::STYLE_THIN_BORDER
    +# black text on a white background at 14pt with thin borders!
    +title = ws.style.add_style(:bg_color => "FFFF0000", :fg_color=>"#FF000000", :sz=>14,  :border=>Axlsx::STYLE_THIN_BORDER
     
    -ws.add_row :values => ["Least Popular Pets"]
    -ws.add_row :values => ["", "Dry Skinned Reptiles", "Bald Cats", "Violent Parrots"], :style=>title
    -ws.add_row :values => ["Votes", 6, 4, 1], :style=>Axlsx::STYLE_THIN_BORDER
    -f = File.open('example_you_got_style.xlsx', 'w')
    -p.serialize(f)
    -
    +ws.add_row :values => ["Least Popular Pets"] +ws.add_row :values => ["", "Dry Skinned Reptiles", "Bald Cats", "Violent Parrots"], :style=>title +ws.add_row :values => ["Votes", 6, 4, 1], :style=>Axlsx::STYLE_THIN_BORDER +f = File.open('example_you_got_style.xlsx', 'w') +p.serialize(f)
    -

    -Styling specifically -

    +

    +

    Styling specifically

    -
    # an example of applying specific styles to specific cells
    -require "rubygems" # if that is your preferred way to manage gems!
    -require "axlsx"
    -
    -p = Axlsx::Package.new
    -ws = p.workbook.add_worksheet
    -
    -# define your styles
    -title = ws.style.add_style(:bg_color => "FFFF0000", 
    -                           :fg_color=>"#FF000000",
    -                           :border=>Axlsx::STYLE_THIN_BORDER, 
    -                           :alignment=>{:horizontal => :center})
    -
    -date_time = ws.style.add_style(:num_fmt => Axlsx::NUM_FMT_YYYYMMDDHHMMSS,
    -                               :border=>Axlsx::STYLE_THIN_BORDER)
    -
    -percent = ws.style.add_style(:num_fmt => Axlsx::NUM_FMT_PERCENT, 
    -                             :border=>Axlsx::STYLE_THIN_BORDER)
    -
    -currency = ws.style.add_style(:format_code=>"¥#,##0;[Red]¥-#,##0",
    -                              :border=>Axlsx::STYLE_THIN_BORDER)
    -
    -# build your rows
    -ws.add_row :values => ["Genreated At:", Time.now], :styles=>[nil, date_time]
    -ws.add_row :values => ["Previous Year Quarterly Profits (JPY)"], :style=>title
    -ws.add_row :values => ["Quarter", "Profit", "% of Total"], :style=>title
    -ws.add_row :values => ["Q1", 4000, 40], :style=>[title, currency, percent]
    -ws.add_row :values => ["Q2", 3000, 30], :style=>[title, currency, percent]
    -ws.add_row :values => ["Q3", 1000, 10], :style=>[title, currency, percent]
    -ws.add_row :values => ["Q4", 2000, 20], :style=>[title, currency, percent]
    -f = File.open('example_you_got_style.xlsx', 'w')
    -p.serialize(f)
    -
    +
    # an example of applying specific styles to specific cells
    +require "rubygems" # if that is your preferred way to manage gems!
    +require "axlsx"
    +
    +p = Axlsx::Package.new
    +ws = p.workbook.add_worksheet
    +
    +# define your styles
    +title = ws.style.add_style(:bg_color => "FFFF0000", 
    +                           :fg_color=>"#FF000000",
    +                           :border=>Axlsx::STYLE_THIN_BORDER, 
    +                           :alignment=>{:horizontal => :center})
    +
    +date_time = ws.style.add_style(:num_fmt => Axlsx::NUM_FMT_YYYYMMDDHHMMSS,
    +                               :border=>Axlsx::STYLE_THIN_BORDER)
    +
    +percent = ws.style.add_style(:num_fmt => Axlsx::NUM_FMT_PERCENT, 
    +                             :border=>Axlsx::STYLE_THIN_BORDER)
    +
    +currency = ws.style.add_style(:format_code=>"¥#,##0;[Red]¥-#,##0",
    +                              :border=>Axlsx::STYLE_THIN_BORDER)
    +
    +# build your rows
    +ws.add_row :values => ["Genreated At:", Time.now], :styles=>[nil, date_time]
    +ws.add_row :values => ["Previous Year Quarterly Profits (JPY)"], :style=>title
    +ws.add_row :values => ["Quarter", "Profit", "% of Total"], :style=>title
    +ws.add_row :values => ["Q1", 4000, 40], :style=>[title, currency, percent]
    +ws.add_row :values => ["Q2", 3000, 30], :style=>[title, currency, percent]
    +ws.add_row :values => ["Q3", 1000, 10], :style=>[title, currency, percent]
    +ws.add_row :values => ["Q4", 2000, 20], :style=>[title, currency, percent]
    +f = File.open('example_you_got_style.xlsx', 'w')
    +p.serialize(f)

    Parameters:

    @@ -1322,9 +1273,8 @@ Styling specifically — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -1343,9 +1293,8 @@ a customizable set of options - —

    -The text color -

    + —
    +

    The text color

    @@ -1355,9 +1304,8 @@ The text color - —

    -The text size -

    + —
    +

    The text size

    @@ -1367,9 +1315,8 @@ The text size - —

    -Indicates if the text should be bold -

    + —
    +

    Indicates if the text should be bold

    @@ -1379,9 +1326,8 @@ Indicates if the text should be bold - —

    -Indicates if the text should be italicised -

    + —
    +

    Indicates if the text should be italicised

    @@ -1391,9 +1337,8 @@ Indicates if the text should be italicised - —

    -Indicates if the text should be rendered with a strikethrough -

    + —
    +

    Indicates if the text should be rendered with a strikethrough

    @@ -1403,9 +1348,8 @@ Indicates if the text should be rendered with a strikethrough - —

    -Indicates if the text should be rendered with a shadow -

    + —
    +

    Indicates if the text should be rendered with a shadow

    @@ -1415,9 +1359,8 @@ Indicates if the text should be rendered with a shadow - —

    -The character set to use. -

    + —
    +

    The character set to use.

    @@ -1427,9 +1370,8 @@ The character set to use. - —

    -The font family to use. -

    + —
    +

    The font family to use.

    @@ -1439,9 +1381,8 @@ The font family to use. - —

    -The name of the font to use -

    + —
    +

    The name of the font to use

    @@ -1451,9 +1392,8 @@ The name of the font to use - —

    -The number format to apply -

    + —
    +

    The number format to apply

    @@ -1463,9 +1403,8 @@ The number format to apply - —

    -The formatting to apply. If this is specified, num_fmt is ignored. -

    + —
    +

    The formatting to apply. If this is specified, num_fmt is ignored.

    @@ -1475,9 +1414,8 @@ The formatting to apply. If this is specified, num_fmt is ignored. - —

    -The border style to use. -

    + —
    +

    The border style to use.

    @@ -1487,9 +1425,8 @@ The border style to use. - —

    -The background color to apply to the cell -

    + —
    +

    The background color to apply to the cell

    @@ -1499,9 +1436,8 @@ The background color to apply to the cell - —

    -Indicates if the cell should be hidden -

    + —
    +

    Indicates if the cell should be hidden

    @@ -1511,9 +1447,8 @@ Indicates if the cell should be hidden - —

    -Indicates if the cell should be locked -

    + —
    +

    Indicates if the cell should be locked

    @@ -1523,9 +1458,8 @@ Indicates if the cell should be locked - —

    -A hash defining any of the attributes used in CellAlignment -

    + —
    +

    A hash defining any of the attributes used in CellAlignment

    @@ -1621,52 +1555,51 @@ A hash defining any of the attributes used in CellAlignment
    # File 'lib/axlsx/stylesheet/styles.rb', line 191
     
    -def add_style(options={})
    -  
    -  numFmtId = if options[:format_code]
    -               n = @numFmts.map{ |f| f.numFmtId }.max + 1
    -               numFmts << NumFmt.new(:numFmtId => n, :formatCode=> options[:format_code])
    -               n
    -             else
    -               options[:num_fmt] || 0
    -             end
    -  
    -  borderId = options[:border] || 0
    -  raise ArgumentError, "Invalid borderId" unless borderId < borders.size
    -  
    -  fill = if options[:bg_color]
    -           color = Color.new(:rgb=>options[:bg_color])
    -           pattern = PatternFill.new(:patternType =>:solid, :fgColor=>color)
    -           fills << Fill.new(pattern)   
    -         else
    -           0
    -         end
    -  
    -  fontId = if (options.values_at(:fg_color, :sz, :b, :i, :strike, :outline, :shadow, :charset, :family, :font_name).length)
    -             font = Font.new()
    -             [:b, :i, :strike, :outline, :shadow, :charset, :family, :sz].each { |k| font.send("#{k}=", options[k]) unless options[k].nil? }
    -             font.color = Color.new(:rgb => options[:fg_color]) unless options[:fg_color].nil?
    -             font.name = options[:font_name] unless options[:font_name].nil?
    -             fonts << font
    -           else
    -             0 
    -           end
    -  
    -  applyProtection = (options[:hidden] || options[:locked]) ? 1 : 0
    -  
    -  xf = Xf.new(:fillId => fill, :fontId=>fontId, :applyFill=>1, :applyFont=>1, :numFmtId=>numFmtId, :borderId=>borderId, :applyProtection=>applyProtection)
    -  
    -  if options[:alignment]
    -    xf.alignment = CellAlignment.new(options[:alignment])
    -  end
    -  
    -  if applyProtection
    -    xf.protection = CellProtection.new(options)
    -  end
    -  
    -  cellXfs << xf
    -end
    -
    +def add_style(options={}) + + numFmtId = if options[:format_code] + n = @numFmts.map{ |f| f.numFmtId }.max + 1 + numFmts << NumFmt.new(:numFmtId => n, :formatCode=> options[:format_code]) + n + else + options[:num_fmt] || 0 + end + + borderId = options[:border] || 0 + raise ArgumentError, "Invalid borderId" unless borderId < borders.size + + fill = if options[:bg_color] + color = Color.new(:rgb=>options[:bg_color]) + pattern = PatternFill.new(:patternType =>:solid, :fgColor=>color) + fills << Fill.new(pattern) + else + 0 + end + + fontId = if (options.values_at(:fg_color, :sz, :b, :i, :strike, :outline, :shadow, :charset, :family, :font_name).length) + font = Font.new() + [:b, :i, :strike, :outline, :shadow, :charset, :family, :sz].each { |k| font.send("#{k}=", options[k]) unless options[k].nil? } + font.color = Color.new(:rgb => options[:fg_color]) unless options[:fg_color].nil? + font.name = options[:font_name] unless options[:font_name].nil? + fonts << font + else + 0 + end + + applyProtection = (options[:hidden] || options[:locked]) ? 1 : 0 + + xf = Xf.new(:fillId => fill, :fontId=>fontId, :applyFill=>1, :applyFont=>1, :numFmtId=>numFmtId, :borderId=>borderId, :applyProtection=>applyProtection) + + if options[:alignment] + xf.alignment = CellAlignment.new(options[:alignment]) + end + + if applyProtection + xf.protection = CellProtection.new(options) + end + + cellXfs << xf +end @@ -1681,9 +1614,8 @@ A hash defining any of the attributes used in CellAlignment

    -

    -Serializes the styles document -

    + +

    Serializes the styles document

    @@ -1724,17 +1656,16 @@ Serializes the styles document
    # File 'lib/axlsx/stylesheet/styles.rb', line 239
     
    -def to_xml()
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.styleSheet(:xmlns => XML_NS) {
    -      [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key|
    -        self.instance_values[key.to_s].to_xml(xml)
    -      end
    -    }
    -  end
    -  builder.to_xml
    -end
    -
    +def to_xml() + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.styleSheet(:xmlns => XML_NS) { + [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key| + self.instance_values[key.to_s].to_xml(xml) + end + } + end + builder.to_xml +end @@ -1745,9 +1676,9 @@ Serializes the styles document
    diff --git a/doc/Axlsx/TableStyle.html b/doc/Axlsx/TableStyle.html index ad318d8a..be6dc553 100644 --- a/doc/Axlsx/TableStyle.html +++ b/doc/Axlsx/TableStyle.html @@ -99,16 +99,14 @@
    Note: -

    -Table are not supported in this version and only the defaults required for -a valid workbook are created. -

    +
    +

    Table are not supported in this version and only the defaults required for +a valid workbook are created.

    -

    -A single table style definition and is a collection for tableStyleElements -

    + +

    A single table style definition and is a collection for tableStyleElements

    @@ -144,9 +142,8 @@ A single table style definition and is a collection for tableStyleElements -

    -The name of this table style. -

    +
    +

    The name of this table style.

    @@ -171,9 +168,8 @@ The name of this table style. -

    -indicates if this style should be applied to pivot tables. -

    +
    +

    indicates if this style should be applied to pivot tables.

    @@ -198,9 +194,8 @@ indicates if this style should be applied to pivot tables. -

    -indicates if this style should be applied to tables. -

    +
    +

    indicates if this style should be applied to tables.

    @@ -245,9 +240,8 @@ indicates if this style should be applied to tables. -

    -creates a new TableStyle object. -

    +
    +

    creates a new TableStyle object.

    @@ -269,9 +263,8 @@ creates a new TableStyle object. -

    -Serializes the table style. -

    +
    +

    Serializes the table style.

    @@ -297,9 +290,8 @@ Serializes the table style.

    -

    -creates a new TableStyle object -

    + +

    creates a new TableStyle object

    @@ -331,9 +323,8 @@ creates a new TableStyle object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -380,9 +371,8 @@ a customizable set of options — -

    -if name option is not provided. -

    +
    +

    if name option is not provided.

    @@ -406,14 +396,13 @@ if name option is not provided.
    # File 'lib/axlsx/stylesheet/table_style.rb', line 23
     
    -def initialize(name, options={})
    -  self.name = name
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -  super TableStyleElement
    -end
    -
    +def initialize(name, options={}) + self.name = name + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end + super TableStyleElement +end @@ -446,9 +435,8 @@ if name option is not provided.

    -

    -The name of this table style -

    + +

    The name of this table style

    @@ -482,10 +470,9 @@ The name of this table style
    # File 'lib/axlsx/stylesheet/table_style.rb', line 8
     
    -def name
    -  @name
    -end
    -
    +def name + @name +end @@ -503,9 +490,8 @@ The name of this table style

    -

    -indicates if this style should be applied to pivot tables -

    + +

    indicates if this style should be applied to pivot tables

    @@ -539,10 +525,9 @@ indicates if this style should be applied to pivot tables
    # File 'lib/axlsx/stylesheet/table_style.rb', line 12
     
    -def pivot
    -  @pivot
    -end
    -
    +def pivot + @pivot +end @@ -560,9 +545,8 @@ indicates if this style should be applied to pivot tables

    -

    -indicates if this style should be applied to tables -

    + +

    indicates if this style should be applied to tables

    @@ -596,10 +580,9 @@ indicates if this style should be applied to tables
    # File 'lib/axlsx/stylesheet/table_style.rb', line 16
     
    -def table
    -  @table
    -end
    -
    +def table + @table +end @@ -621,9 +604,8 @@ indicates if this style should be applied to tables

    -

    -Serializes the table style -

    + +

    Serializes the table style

    @@ -642,9 +624,8 @@ Serializes the table style — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -680,12 +661,11 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/table_style.rb', line 41
     
    -def to_xml(xml)
    -  attr = self.instance_values.select { |k, v| [:name, :pivot, :table].include? k }
    -  attr[:count] = self.size
    -  xml.tableStyle(attr) { self.each { |table_style_el| table_style_el.to_xml(xml) } }
    -end
    -
    +def to_xml(xml) + attr = self.instance_values.select { |k, v| [:name, :pivot, :table].include? k } + attr[:count] = self.size + xml.tableStyle(attr) { self.each { |table_style_el| table_style_el.to_xml(xml) } } +end @@ -696,9 +676,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/TableStyleElement.html b/doc/Axlsx/TableStyleElement.html index 7a8b5912..84e7ca4e 100644 --- a/doc/Axlsx/TableStyleElement.html +++ b/doc/Axlsx/TableStyleElement.html @@ -97,16 +97,14 @@
    Note: -

    -tables and table styles are not supported in this version. This class -exists in preparation for that support. -

    +
    +

    tables and table styles are not supported in this version. This class +exists in preparation for that support.

    -

    -an element of style that belongs to a table style. -

    + +

    an element of style that belongs to a table style.

    @@ -138,9 +136,8 @@ an element of style that belongs to a table style. -

    -The dxfId this style element points to. -

    +
    +

    The dxfId this style element points to.

    @@ -165,10 +162,9 @@ The dxfId this style element points to. -

    -Number of rows or columns used in striping when the type is firstRowStripe, -secondRowStripe, firstColumnStripe, or secondColumnStripe. -

    +
    +

    Number of rows or columns used in striping when the type is firstRowStripe, +secondRowStripe, firstColumnStripe, or secondColumnStripe.

    @@ -193,9 +189,8 @@ secondRowStripe, firstColumnStripe, or secondColumnStripe. -

    -The type of style element. -

    +
    +

    The type of style element.

    @@ -232,9 +227,8 @@ The type of style element. -

    -creates a new TableStyleElement object. -

    +
    +

    creates a new TableStyleElement object.

    @@ -256,9 +250,8 @@ creates a new TableStyleElement object. -

    -Serializes the table style element. -

    +
    +

    Serializes the table style element.

    @@ -279,9 +272,8 @@ Serializes the table style element.

    -

    -creates a new TableStyleElement object -

    + +

    creates a new TableStyleElement object

    @@ -302,9 +294,8 @@ creates a new TableStyleElement object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -363,12 +354,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/table_style_element.rb', line 49
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? o[0]
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? o[0] + end +end @@ -391,9 +381,8 @@ a customizable set of options

    -

    -The dxfId this style element points to -

    + +

    The dxfId this style element points to

    @@ -427,10 +416,9 @@ The dxfId this style element points to
    # File 'lib/axlsx/stylesheet/table_style_element.rb', line 43
     
    -def dxfId
    -  @dxfId
    -end
    -
    +def dxfId + @dxfId +end @@ -448,10 +436,9 @@ The dxfId this style element points to

    -

    -Number of rows or columns used in striping when the type is firstRowStripe, -secondRowStripe, firstColumnStripe, or secondColumnStripe. -

    + +

    Number of rows or columns used in striping when the type is firstRowStripe, +secondRowStripe, firstColumnStripe, or secondColumnStripe.

    @@ -485,10 +472,9 @@ secondRowStripe, firstColumnStripe, or secondColumnStripe.
    # File 'lib/axlsx/stylesheet/table_style_element.rb', line 39
     
    -def size
    -  @size
    -end
    -
    +def size + @size +end @@ -506,39 +492,37 @@ secondRowStripe, firstColumnStripe, or secondColumnStripe.

    -

    -The type of style element. The following type are allowed -

    -
    -  :wholeTable
    -  :headerRow
    -  :totalRow
    -  :firstColumn
    -  :lastColumn
    -  :firstRowStripe
    -  :secondRowStripe
    -  :firstColumnStripe
    -  :secondColumnStripe
    -  :firstHeaderCell
    -  :lastHeaderCell
    -  :firstTotalCell
    -  :lastTotalCell
    -  :firstSubtotalColumn
    -  :secondSubtotalColumn
    -  :thirdSubtotalColumn
    -  :firstSubtotalRow
    -  :secondSubtotalRow
    -  :thirdSubtotalRow
    -  :blankRow
    -  :firstColumnSubheading
    -  :secondColumnSubheading
    -  :thirdColumnSubheading
    -  :firstRowSubheading
    -  :secondRowSubheading
    -  :thirdRowSubheading
    -  :pageFieldLabels
    -  :pageFieldValues
    -
    + +

    The type of style element. The following type are allowed

    + +
    :wholeTable
    +:headerRow
    +:totalRow
    +:firstColumn
    +:lastColumn
    +:firstRowStripe
    +:secondRowStripe
    +:firstColumnStripe
    +:secondColumnStripe
    +:firstHeaderCell
    +:lastHeaderCell
    +:firstTotalCell
    +:lastTotalCell
    +:firstSubtotalColumn
    +:secondSubtotalColumn
    +:thirdSubtotalColumn
    +:firstSubtotalRow
    +:secondSubtotalRow
    +:thirdSubtotalRow
    +:blankRow
    +:firstColumnSubheading
    +:secondColumnSubheading
    +:thirdColumnSubheading
    +:firstRowSubheading
    +:secondRowSubheading
    +:thirdRowSubheading
    +:pageFieldLabels
    +:pageFieldValues
    @@ -572,10 +556,9 @@ The type of style element. The following type are allowed
    # File 'lib/axlsx/stylesheet/table_style_element.rb', line 35
     
    -def type
    -  @type
    -end
    -
    +def type + @type +end @@ -597,9 +580,8 @@ The type of style element. The following type are allowed

    -

    -Serializes the table style element -

    + +

    Serializes the table style element

    @@ -618,9 +600,8 @@ Serializes the table style element — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -654,10 +635,9 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/table_style_element.rb', line 67
     
    -def to_xml(xml)
    -  xml.tableStyleElement self.instance_values
    -end
    -
    +def to_xml(xml) + xml.tableStyleElement self.instance_values +end @@ -668,9 +648,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/TableStyles.html b/doc/Axlsx/TableStyles.html index dbbe360b..fd467102 100644 --- a/doc/Axlsx/TableStyles.html +++ b/doc/Axlsx/TableStyles.html @@ -99,18 +99,16 @@
    Note: -

    -Support for custom table styles does not exist in this version. Many of the +

    +

    Support for custom table styles does not exist in this version. Many of the classes required are defined in preparation for future release. Please do -not attempt to add custom table styles. -

    +not attempt to add custom table styles.

    -

    -TableStyles represents a collection of style definitions for table styles -and pivot table styles. -

    + +

    TableStyles represents a collection of style definitions for table styles +and pivot table styles.

    @@ -146,9 +144,8 @@ and pivot table styles. -

    -The default pivot table style. -

    +
    +

    The default pivot table style.

    @@ -173,9 +170,8 @@ The default pivot table style. -

    -The default table style. -

    +
    +

    The default table style.

    @@ -220,10 +216,9 @@ The default table style. -

    -Creates a new TableStyles object that is a container for TableStyle -objects. -

    +
    +

    Creates a new TableStyles object that is a container for TableStyle +objects.

    @@ -245,9 +240,8 @@ objects. -

    -Serializes the table styles element. -

    +
    +

    Serializes the table styles element.

    @@ -273,9 +267,8 @@ Serializes the table styles element.

    -

    -Creates a new TableStyles object that is a container for TableStyle objects -

    + +

    Creates a new TableStyles object that is a container for TableStyle objects

    @@ -296,9 +289,8 @@ Creates a new TableStyles object that is a container for TableStyle objects — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -348,12 +340,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/table_styles.rb', line 17
     
    -def initialize(options={})
    -  @defaultTableStyle = options[:defaultTableStyle] || "TableStyleMedium9"
    -  @defaultPivotStyle = options[:defaultPivotStyle] || "PivotStyleLight16"      
    -  super TableStyle
    -end
    -
    +def initialize(options={}) + @defaultTableStyle = options[:defaultTableStyle] || "TableStyleMedium9" + @defaultPivotStyle = options[:defaultPivotStyle] || "PivotStyleLight16" + super TableStyle +end @@ -386,10 +377,8 @@ a customizable set of options

    -

    -The default pivot table style. The default value is -‘PivotStyleLight6’ -

    + +

    The default pivot table style. The default value is 'PivotStyleLight6'

    @@ -423,10 +412,9 @@ The default pivot table style. The default value is
    # File 'lib/axlsx/stylesheet/table_styles.rb', line 12
     
    -def defaultPivotStyle
    -  @defaultPivotStyle
    -end
    -
    +def defaultPivotStyle + @defaultPivotStyle +end @@ -444,10 +432,8 @@ The default pivot table style. The default value is

    -

    -The default table style. The default value is -‘TableStyleMedium9’ -

    + +

    The default table style. The default value is 'TableStyleMedium9'

    @@ -481,10 +467,9 @@ The default table style. The default value is
    # File 'lib/axlsx/stylesheet/table_styles.rb', line 8
     
    -def defaultTableStyle
    -  @defaultTableStyle
    -end
    -
    +def defaultTableStyle + @defaultTableStyle +end @@ -506,9 +491,8 @@ The default table style. The default value is

    -

    -Serializes the table styles element -

    + +

    Serializes the table styles element

    @@ -527,9 +511,8 @@ Serializes the table styles element — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -567,14 +550,13 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/table_styles.rb', line 30
     
    -def to_xml(xml)
    -  attr = self.instance_values.reject {|k, v| ![:defaultTableStyle, :defaultPivotStyle].include?(k.to_sym) }
    -  attr[:count] = self.size
    -  xml.tableStyles(attr) {
    -    self.each { |table_style| table_style.to_xml(xml) }
    -  }
    -end
    -
    +def to_xml(xml) + attr = self.instance_values.reject {|k, v| ![:defaultTableStyle, :defaultPivotStyle].include?(k.to_sym) } + attr[:count] = self.size + xml.tableStyles(attr) { + self.each { |table_style| table_style.to_xml(xml) } + } +end @@ -585,9 +567,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Title.html b/doc/Axlsx/Title.html index acc832e6..e2cbfc5f 100644 --- a/doc/Axlsx/Title.html +++ b/doc/Axlsx/Title.html @@ -94,9 +94,8 @@

    Overview

    -

    -A Title stores information about the title of a chart -

    + +

    A Title stores information about the title of a chart

    @@ -132,9 +131,8 @@ A Title stores information about the title of a chart -

    -The cell that holds the text for the title. -

    +
    +

    The cell that holds the text for the title.

    @@ -159,9 +157,8 @@ The cell that holds the text for the title. -

    -The text to be shown. -

    +
    +

    The text to be shown.

    @@ -198,9 +195,8 @@ The text to be shown. -

    -Creates a new Title object. -

    +
    +

    Creates a new Title object.

    @@ -222,9 +218,8 @@ Creates a new Title object. -

    -Serializes the chart title. -

    +
    +

    Serializes the chart title.

    @@ -245,9 +240,8 @@ Serializes the chart title.

    -

    -Creates a new Title object -

    + +

    Creates a new Title object

    @@ -268,9 +262,8 @@ Creates a new Title object — -

    -The cell or string to be used for the chart’s title -

    +
    +

    The cell or string to be used for the chart's title

    @@ -292,11 +285,10 @@ The cell or string to be used for the chart’s title
    # File 'lib/axlsx/drawing/title.rb', line 15
     
    -def initialize(title="")
    -  self.cell = title if title.is_a?(Cell)
    -  self.text = title.to_s unless title.is_a?(Cell)
    -end
    -
    +def initialize(title="") + self.cell = title if title.is_a?(Cell) + self.text = title.to_s unless title.is_a?(Cell) +end @@ -319,10 +311,9 @@ The cell or string to be used for the chart’s title

    -

    -The cell that holds the text for the title. Setting this property will -automatically update the text attribute. -

    + +

    The cell that holds the text for the title. Setting this property will +automatically update the text attribute.

    @@ -356,10 +347,9 @@ automatically update the text attribute.
    # File 'lib/axlsx/drawing/title.rb', line 11
     
    -def cell
    -  @cell
    -end
    -
    +def cell + @cell +end @@ -377,10 +367,9 @@ automatically update the text attribute.

    -

    -The text to be shown. Setting this property directly with a string will -remove the cell reference. -

    + +

    The text to be shown. Setting this property directly with a string will +remove the cell reference.

    @@ -414,10 +403,9 @@ remove the cell reference.
    # File 'lib/axlsx/drawing/title.rb', line 7
     
    -def text
    -  @text
    -end
    -
    +def text + @text +end @@ -439,9 +427,8 @@ remove the cell reference.

    -

    -Serializes the chart title -

    + +

    Serializes the chart title

    @@ -460,9 +447,8 @@ Serializes the chart title — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -508,22 +494,21 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/title.rb', line 44
     
    -def to_xml(xml)
    -  xml.send('c:title') {
    -    xml.send('c:tx') {
    -      xml.send('c:strRef') {
    -        xml.send('c:f', Axlsx::cell_range([@cell]))
    -        xml.send('c:strCache') {
    -          xml.send('c:ptCount', :val=>1)
    -          xml.send('c:pt', :idx=>0) {
    -            xml.send('c:v', @text)
    -          }
    -        }
    -      }
    -    }
    -  }      
    -end
    -
    +def to_xml(xml) + xml.send('c:title') { + xml.send('c:tx') { + xml.send('c:strRef') { + xml.send('c:f', Axlsx::cell_range([@cell])) + xml.send('c:strCache') { + xml.send('c:ptCount', :val=>1) + xml.send('c:pt', :idx=>0) { + xml.send('c:v', @text) + } + } + } + } + } +end @@ -534,9 +519,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/TwoCellAnchor.html b/doc/Axlsx/TwoCellAnchor.html index 731764f1..68e7ba13 100644 --- a/doc/Axlsx/TwoCellAnchor.html +++ b/doc/Axlsx/TwoCellAnchor.html @@ -97,16 +97,14 @@
    Note: -

    -The recommended way to manage drawings and charts is Worksheet#add_chart. -Anchors are specified by the :start_at and :end_at options to that method. -

    +
    +

    The recommended way to manage drawings and charts is Worksheet#add_chart. +Anchors are specified by the :start_at and :end_at options to that method.

    -

    -This class details the anchor points for drawings. -

    + +

    This class details the anchor points for drawings.

    @@ -145,9 +143,8 @@ This class details the anchor points for drawings. -

    -The drawing that holds this anchor. -

    +
    +

    The drawing that holds this anchor.

    @@ -172,9 +169,8 @@ The drawing that holds this anchor. -

    -A marker that defines the from cell anchor. -

    +
    +

    A marker that defines the from cell anchor.

    @@ -199,9 +195,8 @@ A marker that defines the from cell anchor. -

    -The object this anchor hosts. -

    +
    +

    The object this anchor hosts.

    @@ -226,9 +221,8 @@ The object this anchor hosts. -

    -A marker that returns the to cell anchor. -

    +
    +

    A marker that returns the to cell anchor.

    @@ -263,9 +257,8 @@ A marker that returns the to cell anchor. -

    -Creates a graphic frame and chart object associated with this anchor. -

    +
    +

    Creates a graphic frame and chart object associated with this anchor.

    @@ -287,9 +280,8 @@ Creates a graphic frame and chart object associated with this anchor. -

    -The index of this anchor in the drawing. -

    +
    +

    The index of this anchor in the drawing.

    @@ -313,10 +305,9 @@ The index of this anchor in the drawing. -

    -Creates a new TwoCellAnchor object and sets up a reference to the from and -to markers in the graphic_frame’s chart. -

    +
    +

    Creates a new TwoCellAnchor object and sets up a reference to the from and +to markers in the graphic_frame's chart.

    @@ -338,9 +329,8 @@ to markers in the graphic_frame’s chart. -

    -Serializes the two cell anchor. -

    +
    +

    Serializes the two cell anchor.

    @@ -364,17 +354,15 @@ Serializes the two cell anchor.
    Note: -

    -the chart_type parameter will be replaced with object in v. 2.0.0 -

    +
    +

    the chart_type parameter will be replaced with object in v. 2.0.0

    -

    -Creates a new TwoCellAnchor object and sets up a reference to the from and -to markers in the graphic_frame’s chart. That means that you can do -stuff like c = worksheet.add_chart Axlsx::Chart c.start_at 5, 9 -

    + +

    Creates a new TwoCellAnchor object and sets up a reference to the from and +to markers in the graphic_frame's chart. That means that you can do stuff +like c = worksheet.add_chart Axlsx::Chart c.start_at 5, 9

    @@ -404,10 +392,9 @@ stuff like c = worksheet.add_chart Axlsx::Chart c.start_at 5, 9 — -

    -This is passed to the graphic frame for instantiation. must be Chart or a -subclass of Chart -

    +
    +

    This is passed to the graphic frame for instantiation. must be Chart or a +subclass of Chart

    @@ -422,9 +409,8 @@ subclass of Chart — -

    -The object this anchor holds. -

    +
    +

    The object this anchor holds.

    @@ -441,9 +427,8 @@ The object this anchor holds. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -464,9 +449,8 @@ a customizable set of options - —

    -the col, row to start at -

    + —
    +

    the col, row to start at

    @@ -476,9 +460,8 @@ the col, row to start at - —

    -the col, row to end at -

    + —
    +

    the col, row to end at

    @@ -501,12 +484,11 @@ the col, row to end at
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 38
     
    -def initialize(drawing, options={})
    -  @drawing = drawing
    -  drawing.anchors << self      
    -  @from, @to =  Marker.new, Marker.new(:col => 5, :row=>10)
    -end
    -
    +def initialize(drawing, options={}) + @drawing = drawing + drawing.anchors << self + @from, @to = Marker.new, Marker.new(:col => 5, :row=>10) +end @@ -529,9 +511,8 @@ the col, row to end at

    -

    -The drawing that holds this anchor -

    + +

    The drawing that holds this anchor

    @@ -565,10 +546,9 @@ The drawing that holds this anchor
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 25
     
    -def drawing
    -  @drawing
    -end
    -
    +def drawing + @drawing +end @@ -586,10 +566,9 @@ The drawing that holds this anchor

    -

    -A marker that defines the from cell anchor. The default from column and row -are 0 and 0 respectively -

    + +

    A marker that defines the from cell anchor. The default from column and row +are 0 and 0 respectively

    @@ -623,10 +602,9 @@ are 0 and 0 respectively
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 9
     
    -def from
    -  @from
    -end
    -
    +def from + @from +end @@ -644,9 +622,8 @@ are 0 and 0 respectively

    -

    -The object this anchor hosts -

    + +

    The object this anchor hosts

    @@ -680,10 +657,9 @@ The object this anchor hosts
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 21
     
    -def object
    -  @object
    -end
    -
    +def object + @object +end @@ -701,10 +677,9 @@ The object this anchor hosts

    -

    -A marker that returns the to cell anchor. The default to column and row are -5 and 10 respectively -

    + +

    A marker that returns the to cell anchor. The default to column and row are +5 and 10 respectively

    @@ -738,10 +713,9 @@ A marker that returns the to cell anchor. The default to column and row are
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 12
     
    -def to
    -  @to
    -end
    -
    +def to + @to +end @@ -763,9 +737,8 @@ A marker that returns the to cell anchor. The default to column and row are

    -

    -Creates a graphic frame and chart object associated with this anchor -

    + +

    Creates a graphic frame and chart object associated with this anchor

    @@ -800,11 +773,10 @@ Creates a graphic frame and chart object associated with this anchor
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 46
     
    -def add_chart(chart_type, options)      
    -  @object = GraphicFrame.new(self, chart_type, options)
    -  @object.chart
    -end
    -
    +def add_chart(chart_type, options) + @object = GraphicFrame.new(self, chart_type, options) + @object.chart +end @@ -819,9 +791,8 @@ Creates a graphic frame and chart object associated with this anchor

    -

    -The index of this anchor in the drawing -

    + +

    The index of this anchor in the drawing

    @@ -855,10 +826,9 @@ The index of this anchor in the drawing
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 53
     
    -def index
    -  @drawing.anchors.index(self)
    -end
    -
    +def index + @drawing.anchors.index(self) +end @@ -873,9 +843,8 @@ The index of this anchor in the drawing

    -

    -Serializes the two cell anchor -

    + +

    Serializes the two cell anchor

    @@ -894,9 +863,8 @@ Serializes the two cell anchor — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -940,20 +908,19 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/two_cell_anchor.rb', line 59
     
    -def to_xml(xml)
    -  #build it for now, break it down later!
    -  xml.send('xdr:twoCellAnchor') {
    -    xml.send('xdr:from') {
    -      from.to_xml(xml)
    -    }
    -    xml.send('xdr:to') {
    -      to.to_xml(xml)
    -    }
    -    @object.to_xml(xml)
    -    xml.send('xdr:clientData')
    -  }
    -end
    -
    +def to_xml(xml) + #build it for now, break it down later! + xml.send('xdr:twoCellAnchor') { + xml.send('xdr:from') { + from.to_xml(xml) + } + xml.send('xdr:to') { + to.to_xml(xml) + } + @object.to_xml(xml) + xml.send('xdr:clientData') + } +end @@ -964,9 +931,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/ValAxis.html b/doc/Axlsx/ValAxis.html index 66d9e01b..2b892a4f 100644 --- a/doc/Axlsx/ValAxis.html +++ b/doc/Axlsx/ValAxis.html @@ -96,9 +96,8 @@

    Overview

    -

    -the ValAxis class defines a chart value axis. -

    + +

    the ValAxis class defines a chart value axis.

    @@ -134,9 +133,8 @@ the ValAxis class defines a chart value axis. -

    -This element specifies how the value axis crosses the category axis. -

    +
    +

    This element specifies how the value axis crosses the category axis.

    @@ -181,9 +179,8 @@ This element specifies how the value axis crosses the category axis. -

    -Creates a new ValAxis object. -

    +
    +

    Creates a new ValAxis object.

    @@ -205,9 +202,8 @@ Creates a new ValAxis object. -

    -Serializes the value axis. -

    +
    +

    Serializes the value axis.

    @@ -233,9 +229,8 @@ Serializes the value axis.

    -

    -Creates a new ValAxis object -

    + +

    Creates a new ValAxis object

    @@ -254,9 +249,8 @@ Creates a new ValAxis object — -

    -the id of this axis -

    +
    +

    the id of this axis

    @@ -271,9 +265,8 @@ the id of this axis — -

    -the id of the perpendicular axis -

    +
    +

    the id of the perpendicular axis

    @@ -290,9 +283,8 @@ the id of the perpendicular axis — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -363,11 +355,10 @@ a customizable set of options
    # File 'lib/axlsx/drawing/val_axis.rb', line 17
     
    -def initialize(axId, crossAx, options={})
    -  self.crossBetween = :between
    -  super(axId, crossAx, options)
    -end
    -
    +def initialize(axId, crossAx, options={}) + self.crossBetween = :between + super(axId, crossAx, options) +end @@ -390,10 +381,9 @@ a customizable set of options

    -

    -This element specifies how the value axis crosses the category axis. must -be one of [:between, :midCat] -

    + +

    This element specifies how the value axis crosses the category axis. must +be one of [:between, :midCat]

    @@ -427,10 +417,9 @@ be one of [:between, :midCat]
    # File 'lib/axlsx/drawing/val_axis.rb', line 8
     
    -def crossBetween
    -  @crossBetween
    -end
    -
    +def crossBetween + @crossBetween +end @@ -452,9 +441,8 @@ be one of [:between, :midCat]

    -

    -Serializes the value axis -

    + +

    Serializes the value axis

    @@ -473,9 +461,8 @@ Serializes the value axis — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -512,13 +499,12 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/val_axis.rb', line 27
     
    -def to_xml(xml)
    -  xml.send('c:valAx') {
    -    super(xml)
    -    xml.send('c:crossBetween', :val=>@crossBetween)
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:valAx') { + super(xml) + xml.send('c:crossBetween', :val=>@crossBetween) + } +end @@ -529,9 +515,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/ValAxisData.html b/doc/Axlsx/ValAxisData.html index 96fbca5c..93a6c803 100644 --- a/doc/Axlsx/ValAxisData.html +++ b/doc/Axlsx/ValAxisData.html @@ -98,9 +98,8 @@

    Overview

    -

    -The ValAxisData class manages the values for a chart value series. -

    + +

    The ValAxisData class manages the values for a chart value series.

    @@ -156,9 +155,8 @@ The ValAxisData class manages the values for a chart value series. -

    -Serializes the value axis data. -

    +
    +

    Serializes the value axis data.

    @@ -213,9 +211,8 @@ Serializes the value axis data.

    -

    -Serializes the value axis data -

    + +

    Serializes the value axis data

    @@ -234,9 +231,8 @@ Serializes the value axis data — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -284,24 +280,23 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/val_axis_data.rb', line 8
     
    -def to_xml(xml)
    -  xml.send('c:val') {
    -    xml.send('c:numRef') {
    -      xml.send('c:f', Axlsx::cell_range(@list))
    -      xml.send('c:numCache') {
    -        xml.send('c:formatCode', 'General')
    -        xml.send('c:ptCount', :val=>size)
    -        each_with_index do |item, index|
    -          v = item.is_a?(Cell) ? item.value : item
    -          xml.send('c:pt', :idx=>index) {
    -            xml.send('c:v', v) 
    -          }
    -        end
    -      }                        
    -    }
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:val') { + xml.send('c:numRef') { + xml.send('c:f', Axlsx::cell_range(@list)) + xml.send('c:numCache') { + xml.send('c:formatCode', 'General') + xml.send('c:ptCount', :val=>size) + each_with_index do |item, index| + v = item.is_a?(Cell) ? item.value : item + xml.send('c:pt', :idx=>index) { + xml.send('c:v', v) + } + end + } + } + } +end @@ -312,9 +307,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/View3D.html b/doc/Axlsx/View3D.html index 3eecea4e..6d14ad06 100644 --- a/doc/Axlsx/View3D.html +++ b/doc/Axlsx/View3D.html @@ -94,9 +94,8 @@

    Overview

    -

    -3D attributes for a chart. -

    + +

    3D attributes for a chart.

    @@ -112,9 +111,8 @@
    H_PERCENT_REGEX =
    -

    -Validation for hPercent -

    + +

    Validation for hPercent

    @@ -124,15 +122,13 @@ Validation for hPercent
    -
    /0*(([5-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
    -
    +
    /0*(([5-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
    DEPTH_PERCENT_REGEX =
    -

    -validation for depthPercent -

    + +

    validation for depthPercent

    @@ -142,8 +138,7 @@ validation for depthPercent
    -
    /0*(([2-9][0-9])|([1-9][0-9][0-9])|(1[0-9][0-9][0-9])|2000)%/
    -
    +
    /0*(([2-9][0-9])|([1-9][0-9][0-9])|(1[0-9][0-9][0-9])|2000)%/
    @@ -171,9 +166,8 @@ validation for depthPercent -

    -depth or chart as % of chart width must be between 20% and 2000%. -

    +
    +

    depth or chart as % of chart width must be between 20% and 2000%.

    @@ -198,9 +192,8 @@ depth or chart as % of chart width must be between 20% and 2000%. -

    -height of chart as % of chart must be between 5% and 500%. -

    +
    +

    height of chart as % of chart must be between 5% and 500%.

    @@ -225,9 +218,8 @@ height of chart as % of chart must be between 5% and 500%. -

    -field of view angle. -

    +
    +

    field of view angle.

    @@ -252,9 +244,8 @@ field of view angle. -

    -Chart axis are at right angles. -

    +
    +

    Chart axis are at right angles.

    @@ -279,9 +270,8 @@ Chart axis are at right angles. -

    -x rotation for the chart must be between -90 and 90. -

    +
    +

    x rotation for the chart must be between -90 and 90.

    @@ -306,9 +296,8 @@ x rotation for the chart must be between -90 and 90. -

    -y rotation for the chart must be between 0 and 360. -

    +
    +

    y rotation for the chart must be between 0 and 360.

    @@ -345,9 +334,8 @@ y rotation for the chart must be between 0 and 360. -

    -Creates a new View3D for charts. -

    +
    +

    Creates a new View3D for charts.

    @@ -369,9 +357,8 @@ Creates a new View3D for charts. -

    -Serializes the view3D properties. -

    +
    +

    Serializes the view3D properties.

    @@ -392,9 +379,8 @@ Serializes the view3D properties.

    -

    -Creates a new View3D for charts -

    + +

    Creates a new View3D for charts

    @@ -415,9 +401,8 @@ Creates a new View3D for charts — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -504,13 +489,12 @@ a customizable set of options
    # File 'lib/axlsx/drawing/view_3D.rb', line 46
     
    -def initialize(options={})
    -  @rotX, @hPercent, @rotY, @depthPercent, @rAngAx, @perspective  = nil, nil, nil, nil, nil, nil 
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end    
    -end
    -
    +def initialize(options={}) + @rotX, @hPercent, @rotY, @depthPercent, @rAngAx, @perspective = nil, nil, nil, nil, nil, nil + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -533,9 +517,8 @@ a customizable set of options

    -

    -depth or chart as % of chart width must be between 20% and 2000% -

    + +

    depth or chart as % of chart width must be between 20% and 2000%

    @@ -569,10 +552,9 @@ depth or chart as % of chart width must be between 20% and 2000%
    # File 'lib/axlsx/drawing/view_3D.rb', line 29
     
    -def depthPercent
    -  @depthPercent
    -end
    -
    +def depthPercent + @depthPercent +end @@ -590,9 +572,8 @@ depth or chart as % of chart width must be between 20% and 2000%

    -

    -height of chart as % of chart must be between 5% and 500% -

    + +

    height of chart as % of chart must be between 5% and 500%

    @@ -626,10 +607,9 @@ height of chart as % of chart must be between 5% and 500%
    # File 'lib/axlsx/drawing/view_3D.rb', line 19
     
    -def hPercent
    -  @hPercent
    -end
    -
    +def hPercent + @hPercent +end @@ -647,9 +627,8 @@ height of chart as % of chart must be between 5% and 500%

    -

    -field of view angle -

    + +

    field of view angle

    @@ -683,10 +662,9 @@ field of view angle
    # File 'lib/axlsx/drawing/view_3D.rb', line 37
     
    -def perspective
    -  @perspective
    -end
    -
    +def perspective + @perspective +end @@ -704,9 +682,8 @@ field of view angle

    -

    -Chart axis are at right angles -

    + +

    Chart axis are at right angles

    @@ -740,10 +717,9 @@ Chart axis are at right angles
    # File 'lib/axlsx/drawing/view_3D.rb', line 33
     
    -def rAngAx
    -  @rAngAx
    -end
    -
    +def rAngAx + @rAngAx +end @@ -761,9 +737,8 @@ Chart axis are at right angles

    -

    -x rotation for the chart must be between -90 and 90 -

    + +

    x rotation for the chart must be between -90 and 90

    @@ -797,10 +772,9 @@ x rotation for the chart must be between -90 and 90
    # File 'lib/axlsx/drawing/view_3D.rb', line 14
     
    -def rotX
    -  @rotX
    -end
    -
    +def rotX + @rotX +end @@ -818,9 +792,8 @@ x rotation for the chart must be between -90 and 90

    -

    -y rotation for the chart must be between 0 and 360 -

    + +

    y rotation for the chart must be between 0 and 360

    @@ -854,10 +827,9 @@ y rotation for the chart must be between 0 and 360
    # File 'lib/axlsx/drawing/view_3D.rb', line 24
     
    -def rotY
    -  @rotY
    -end
    -
    +def rotY + @rotY +end @@ -879,9 +851,8 @@ y rotation for the chart must be between 0 and 360

    -

    -Serializes the view3D properties -

    + +

    Serializes the view3D properties

    @@ -900,9 +871,8 @@ Serializes the view3D properties — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -943,17 +913,16 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/drawing/view_3D.rb', line 74
     
    -def to_xml(xml)
    -  xml.send('c:view3D') {
    -    xml.send('c:rotX', :val=>@rotX) unless @rotX.nil?
    -    xml.send('c:hPercent', :val=>@hPercent) unless @hPercent.nil?
    -    xml.send('c:rotY', :val=>@rotY) unless @rotY.nil?
    -    xml.send('c:depthPercent', :val=>@depthPercent) unless @depthPercent.nil?
    -    xml.send('c:rAngAx', :val=>@rAngAx) unless @rAngAx.nil?
    -    xml.send('c:perspective', :val=>@perspective) unless @perspective.nil?
    -  }
    -end
    -
    +def to_xml(xml) + xml.send('c:view3D') { + xml.send('c:rotX', :val=>@rotX) unless @rotX.nil? + xml.send('c:hPercent', :val=>@hPercent) unless @hPercent.nil? + xml.send('c:rotY', :val=>@rotY) unless @rotY.nil? + xml.send('c:depthPercent', :val=>@depthPercent) unless @depthPercent.nil? + xml.send('c:rAngAx', :val=>@rAngAx) unless @rAngAx.nil? + xml.send('c:perspective', :val=>@perspective) unless @perspective.nil? + } +end @@ -964,9 +933,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/Axlsx/Workbook.html b/doc/Axlsx/Workbook.html index 764ec304..f614f82b 100644 --- a/doc/Axlsx/Workbook.html +++ b/doc/Axlsx/Workbook.html @@ -94,33 +94,31 @@

    Overview

    -

    -The Workbook class is an xlsx workbook that manages worksheets, charts, + +

    The Workbook class is an xlsx workbook that manages worksheets, charts, drawings and styles. The following parts of the Office Open XML spreadsheet -specification are not implimented in this version. -

    -
    -  bookViews
    -  calcPr
    -  customWorkbookViews
    -  definedNames
    -  externalReferences
    -  extLst
    -  fileRecoveryPr
    -  fileSharing
    -  fileVersion
    -  functionGroups
    -  oleSize
    -  pivotCaches
    -  smartTagPr
    -  smartTagTypes
    -  webPublishing
    -  webPublishObjects
    -  workbookProtection
    -  workbookPr*
    -
    -  *workbookPr is only supported to the extend of date1904
    -
    +specification are not implimented in this version.

    + +
    bookViews
    +calcPr
    +customWorkbookViews
    +definedNames
    +externalReferences
    +extLst
    +fileRecoveryPr
    +fileSharing
    +fileVersion
    +functionGroups
    +oleSize
    +pivotCaches
    +smartTagPr
    +smartTagTypes
    +webPublishing
    +webPublishObjects
    +workbookProtection
    +workbookPr*
    +
    +*workbookPr is only supported to the extend of date1904
    @@ -136,10 +134,9 @@ specification are not implimented in this version.
    @@date1904 =
    -

    -Indicates if the epoc date for serialization should be 1904. If false, 1900 -is used. -

    + +

    Indicates if the epoc date for serialization should be 1904. If false, 1900 +is used.

    @@ -149,8 +146,7 @@ is used.
    -
    false
    -
    +
    false
    @@ -178,9 +174,8 @@ is used. -

    -A colllection of charts associated with this workbook. -

    +
    +

    A colllection of charts associated with this workbook.

    @@ -205,9 +200,8 @@ A colllection of charts associated with this workbook. -

    -A colllection of drawings associated with this workbook. -

    +
    +

    A colllection of drawings associated with this workbook.

    @@ -232,9 +226,8 @@ A colllection of drawings associated with this workbook. -

    -A colllection of images associated with this workbook. -

    +
    +

    A colllection of images associated with this workbook.

    @@ -259,9 +252,8 @@ A colllection of images associated with this workbook. -

    -A collection of worksheets associated with this workbook. -

    +
    +

    A collection of worksheets associated with this workbook.

    @@ -296,9 +288,8 @@ A collection of worksheets associated with this workbook. -

    -retrieves the date1904 attribute. -

    +
    +

    retrieves the date1904 attribute.

    @@ -320,9 +311,8 @@ retrieves the date1904 attribute. -

    -Sets the date1904 attribute to the provided boolean. -

    +
    +

    Sets the date1904 attribute to the provided boolean.

    @@ -353,9 +343,8 @@ Sets the date1904 attribute to the provided boolean. -

    -Adds a worksheet to this workbook. -

    +
    +

    Adds a worksheet to this workbook.

    @@ -377,9 +366,8 @@ Adds a worksheet to this workbook. -

    -Instance level access to the class variable 1904. -

    +
    +

    Instance level access to the class variable 1904.

    @@ -401,9 +389,8 @@ Instance level access to the class variable 1904. -

    -see @date1904. -

    +
    +

    see @date1904.

    @@ -427,9 +414,8 @@ see @date1904. -

    -Creates a new Workbook. -

    +
    +

    Creates a new Workbook.

    @@ -451,9 +437,8 @@ Creates a new Workbook. -

    -The workbook relationships. -

    +
    +

    The workbook relationships.

    @@ -475,9 +460,8 @@ The workbook relationships. -

    -The styles associated with this workbook. -

    +
    +

    The styles associated with this workbook.

    @@ -499,9 +483,8 @@ The styles associated with this workbook. -

    -Serializes the workbook document. -

    +
    +

    Serializes the workbook document.

    @@ -522,9 +505,8 @@ Serializes the workbook document.

    -

    -Creates a new Workbook -

    + +

    Creates a new Workbook

    @@ -545,9 +527,8 @@ Creates a new Workbook — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -598,9 +579,8 @@ a customizable set of options — -

    -the object that the method was called on -

    +
    +

    the object that the method was called on

    @@ -626,16 +606,15 @@ the object that the method was called on
    # File 'lib/axlsx/workbook/workbook.rb', line 77
     
    -def initialize(options={})
    -  @styles = Styles.new
    -  @worksheets = SimpleTypedList.new Worksheet
    -  @drawings = SimpleTypedList.new Drawing
    -  @charts = SimpleTypedList.new Chart
    -  @images = SimpleTypedList.new Pic
    -  self.date1904= options[:date1904] unless options[:date1904].nil?
    -  yield self if block_given?      
    -end
    -
    +def initialize(options={}) + @styles = Styles.new + @worksheets = SimpleTypedList.new Worksheet + @drawings = SimpleTypedList.new Drawing + @charts = SimpleTypedList.new Chart + @images = SimpleTypedList.new Pic + self.date1904= options[:date1904] unless options[:date1904].nil? + yield self if block_given? +end @@ -661,15 +640,13 @@ the object that the method was called on
    Note: -

    -The recommended way to manage charts is Worksheet#add_chart -

    +
    +

    The recommended way to manage charts is Worksheet#add_chart

    -

    -A colllection of charts associated with this workbook -

    + +

    A colllection of charts associated with this workbook

    @@ -712,10 +689,9 @@ A colllection of charts associated with this workbook
    # File 'lib/axlsx/workbook/workbook.rb', line 45
     
    -def charts
    -  @charts
    -end
    -
    +def charts + @charts +end @@ -736,15 +712,13 @@ A colllection of charts associated with this workbook
    Note: -

    -The recommended way to manage drawings is Worksheet#add_chart -

    +
    +

    The recommended way to manage drawings is Worksheet#add_chart

    -

    -A colllection of drawings associated with this workbook -

    + +

    A colllection of drawings associated with this workbook

    @@ -787,10 +761,9 @@ A colllection of drawings associated with this workbook
    # File 'lib/axlsx/workbook/workbook.rb', line 59
     
    -def drawings
    -  @drawings
    -end
    -
    +def drawings + @drawings +end @@ -811,15 +784,13 @@ A colllection of drawings associated with this workbook
    Note: -

    -The recommended way to manage images is Worksheet#add_image -

    +
    +

    The recommended way to manage images is Worksheet#add_image

    -

    -A colllection of images associated with this workbook -

    + +

    A colllection of images associated with this workbook

    @@ -862,10 +833,9 @@ A colllection of images associated with this workbook
    # File 'lib/axlsx/workbook/workbook.rb', line 52
     
    -def images
    -  @images
    -end
    -
    +def images + @images +end @@ -886,15 +856,13 @@ A colllection of images associated with this workbook
    Note: -

    -The recommended way to manage worksheets is add_worksheet -

    +
    +

    The recommended way to manage worksheets is add_worksheet

    -

    -A collection of worksheets associated with this workbook. -

    + +

    A collection of worksheets associated with this workbook.

    @@ -937,10 +905,9 @@ A collection of worksheets associated with this workbook.
    # File 'lib/axlsx/workbook/workbook.rb', line 38
     
    -def worksheets
    -  @worksheets
    -end
    -
    +def worksheets + @worksheets +end @@ -962,9 +929,8 @@ A collection of worksheets associated with this workbook.

    -

    -retrieves the date1904 attribute -

    + +

    retrieves the date1904 attribute

    @@ -996,8 +962,7 @@ retrieves the date1904 attribute
    # File 'lib/axlsx/workbook/workbook.rb', line 100
     
    -def self.date1904() @@date1904; end
    -
    +def self.date1904() @@date1904; end @@ -1012,9 +977,8 @@ retrieves the date1904 attribute

    -

    -Sets the date1904 attribute to the provided boolean -

    + +

    Sets the date1904 attribute to the provided boolean

    @@ -1046,8 +1010,7 @@ Sets the date1904 attribute to the provided boolean
    # File 'lib/axlsx/workbook/workbook.rb', line 96
     
    -def self.date1904=(v) Axlsx::validate_boolean v; @@date1904 = v end
    -
    +def self.date1904=(v) Axlsx::validate_boolean v; @@date1904 = v; end @@ -1068,9 +1031,8 @@ Sets the date1904 attribute to the provided boolean

    -

    -Adds a worksheet to this workbook -

    + +

    Adds a worksheet to this workbook

    @@ -1091,9 +1053,8 @@ Adds a worksheet to this workbook — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -1112,9 +1073,8 @@ a customizable set of options - —

    -The name of the worksheet. -

    + —
    +

    The name of the worksheet.

    @@ -1170,12 +1130,11 @@ The name of the worksheet.
    # File 'lib/axlsx/workbook/workbook.rb', line 106
     
    -def add_worksheet(options={})
    -  worksheet = Worksheet.new(self, options)
    -  yield worksheet if block_given?
    -  worksheet
    -end
    -
    +def add_worksheet(options={}) + worksheet = Worksheet.new(self, options) + yield worksheet if block_given? + worksheet +end @@ -1190,9 +1149,8 @@ The name of the worksheet.

    -

    -Instance level access to the class variable 1904 -

    + +

    Instance level access to the class variable 1904

    @@ -1224,8 +1182,7 @@ Instance level access to the class variable 1904
    # File 'lib/axlsx/workbook/workbook.rb', line 89
     
    -def date1904() @@date1904; end
    -
    +def date1904() @@date1904; end @@ -1240,9 +1197,8 @@ Instance level access to the class variable 1904

    -

    -see @date1904 -

    + +

    see @date1904

    @@ -1261,8 +1217,7 @@ see @date1904
    # File 'lib/axlsx/workbook/workbook.rb', line 92
     
    -def date1904=(v) Axlsx::validate_boolean v; @@date1904 = v end
    -
    +def date1904=(v) Axlsx::validate_boolean v; @@date1904 = v; end @@ -1277,9 +1232,8 @@ see @date1904

    -

    -The workbook relationships. This is managed automatically by the workbook -

    + +

    The workbook relationships. This is managed automatically by the workbook

    @@ -1318,15 +1272,14 @@ The workbook relationships. This is managed automatically by the workbook
    # File 'lib/axlsx/workbook/workbook.rb', line 114
     
    -def relationships
    -  r = Relationships.new
    -  @worksheets.each do |sheet|
    -    r << Relationship.new(WORKSHEET_R, WORKSHEET_PN % (r.size+1))
    -  end 
    -  r << Relationship.new(STYLES_R,  STYLES_PN)
    -  r
    -end
    -
    +def relationships + r = Relationships.new + @worksheets.each do |sheet| + r << Relationship.new(WORKSHEET_R, WORKSHEET_PN % (r.size+1)) + end + r << Relationship.new(STYLES_R, STYLES_PN) + r +end @@ -1344,15 +1297,13 @@ The workbook relationships. This is managed automatically by the workbook
    Note: -

    -The recommended way to manage styles is Styles#add_style -

    +
    +

    The recommended way to manage styles is Styles#add_style

    -

    -The styles associated with this workbook -

    + +

    The styles associated with this workbook

    @@ -1409,11 +1360,10 @@ The styles associated with this workbook
    # File 'lib/axlsx/workbook/workbook.rb', line 66
     
    -def styles
    -  yield @styles if block_given?
    -  @styles
    -end
    -
    +def styles + yield @styles if block_given? + @styles +end @@ -1428,9 +1378,8 @@ The styles associated with this workbook

    -

    -Serializes the workbook document -

    + +

    Serializes the workbook document

    @@ -1475,21 +1424,20 @@ Serializes the workbook document
    # File 'lib/axlsx/workbook/workbook.rb', line 125
     
    -def to_xml()
    -  add_worksheet unless worksheets.size > 0
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.workbook(:xmlns => XML_NS, :'xmlns:r' => XML_NS_R) {
    -      xml.workbookPr(:date1904=>@@date1904)
    -      xml.sheets {
    -        @worksheets.each_with_index do |sheet, index|              
    -          xml.sheet(:name=>sheet.name, :sheetId=>index+1, :"r:id"=>sheet.rId)
    -        end
    -      }
    -    }
    -  end      
    -  builder.to_xml(:indent=>0)
    -end
    -
    +def to_xml() + add_worksheet unless worksheets.size > 0 + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.workbook(:xmlns => XML_NS, :xmlns:r' => XML_NS_R) { + xml.workbookPr(:date1904=>@@date1904) + xml.sheets { + @worksheets.each_with_index do |sheet, index| + xml.sheet(:name=>sheet.name, :sheetId=>index+1, :r:id"=>sheet.rId) + end + } + } + end + builder.to_xml(:indent=>0) +end @@ -1500,9 +1448,9 @@ Serializes the workbook document
    diff --git a/doc/Axlsx/Worksheet.html b/doc/Axlsx/Worksheet.html index eb6045a5..ce910115 100644 --- a/doc/Axlsx/Worksheet.html +++ b/doc/Axlsx/Worksheet.html @@ -94,9 +94,8 @@

    Overview

    -

    -The Worksheet class represents a worksheet in the workbook. -

    + +

    The Worksheet class represents a worksheet in the workbook.

    @@ -128,9 +127,8 @@ The Worksheet class represents a worksheet in the workbook. -

    -An array of content based calculated column widths. -

    +
    +

    An array of content based calculated column widths.

    @@ -155,9 +153,8 @@ An array of content based calculated column widths. -

    -The name of the worksheet. -

    +
    +

    The name of the worksheet.

    @@ -182,9 +179,8 @@ The name of the worksheet. -

    -The rows in this worksheet. -

    +
    +

    The rows in this worksheet.

    @@ -209,9 +205,8 @@ The rows in this worksheet. -

    -The workbook that owns this worksheet. -

    +
    +

    The workbook that owns this worksheet.

    @@ -246,9 +241,8 @@ The workbook that owns this worksheet. -

    -Adds a chart to this worksheets drawing. -

    +
    +

    Adds a chart to this worksheets drawing.

    @@ -270,9 +264,8 @@ Adds a chart to this worksheets drawing. -

    -Adds a media item to the worksheets drawing. -

    +
    +

    Adds a media item to the worksheets drawing.

    @@ -294,33 +287,8 @@ Adds a media item to the worksheets drawing. -

    -Adds a row to the worksheet and updates auto fit data. -

    -
    - - - - -
  • - - - - (Float) auto_width(col) - - - - - - - - - - - - -

    -Determines the proper width for a column based on content. -

    +
    +

    Adds a row to the worksheet and updates auto fit data.

  • @@ -342,9 +310,8 @@ Determines the proper width for a column based on content. -

    -Set the style for cells in a specific column. -

    +
    +

    Set the style for cells in a specific column.

    @@ -366,9 +333,8 @@ Set the style for cells in a specific column. -

    -returns the sheet data as columnw. -

    +
    +

    returns the sheet data as columnw.

    @@ -390,9 +356,8 @@ returns the sheet data as columnw. -

    -The drawing associated with this worksheet. -

    +
    +

    The drawing associated with this worksheet.

    @@ -414,9 +379,8 @@ The drawing associated with this worksheet. -

    -The index of this worksheet in the owning Workbook’s worksheets list. -

    +
    +

    The index of this worksheet in the owning Workbook's worksheets list.

    @@ -440,9 +404,8 @@ The index of this worksheet in the owning Workbook’s worksheets list. -

    -Creates a new worksheet. -

    +
    +

    Creates a new worksheet.

    @@ -464,9 +427,8 @@ Creates a new worksheet. -

    -The part name of this worksheet. -

    +
    +

    The part name of this worksheet.

    @@ -488,9 +450,8 @@ The part name of this worksheet. -

    -The worksheet relationships. -

    +
    +

    The worksheet relationships.

    @@ -512,9 +473,8 @@ The worksheet relationships. -

    -The relationship part name of this worksheet. -

    +
    +

    The relationship part name of this worksheet.

    @@ -536,9 +496,8 @@ The relationship part name of this worksheet. -

    -The relationship Id of thiw worksheet. -

    +
    +

    The relationship Id of thiw worksheet.

    @@ -560,9 +519,8 @@ The relationship Id of thiw worksheet. -

    -Set the style for cells in a specific row. -

    +
    +

    Set the style for cells in a specific row.

    @@ -584,33 +542,8 @@ Set the style for cells in a specific row. -

    -Serializes the worksheet document. -

    -
    - - - - -
  • - - - - (Array) update_auto_fit_data(cells) - - - - - - - - - - - - -

    -Updates auto fit data. -

    +
    +

    Serializes the worksheet document.

  • @@ -634,15 +567,13 @@ Updates auto fit data.
    Note: -

    -the recommended way to manage worksheets is Workbook#add_worksheet -

    +
    +

    the recommended way to manage worksheets is Workbook#add_worksheet

    -

    -Creates a new worksheet. -

    + +

    Creates a new worksheet.

    @@ -663,9 +594,8 @@ Creates a new worksheet. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -686,9 +616,8 @@ a customizable set of options - —

    -The name of this sheet. -

    + —
    +

    The name of this sheet.

    @@ -723,17 +652,16 @@ The name of this sheet.
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 34
     
    -def initialize(wb, options={})
    -  @drawing = nil
    -  @rows = SimpleTypedList.new Row
    -  self.workbook = wb
    -  @workbook.worksheets << self
    -  @auto_fit_data = []
    -  self.name = options[:name] || "Sheet" + (index+1).to_s
    -  @magick_draw = Magick::Draw.new
    -  @cols = SimpleTypedList.new Cell
    -end
    -
    +def initialize(wb, options={}) + @drawing = nil + @rows = SimpleTypedList.new Row + self.workbook = wb + @workbook.worksheets << self + @auto_fit_data = [] + self.name = options[:name] || "Sheet" + (index+1).to_s + @magick_draw = Magick::Draw.new + @cols = SimpleTypedList.new Cell +end @@ -759,16 +687,14 @@ The name of this sheet.
    Note: -

    -a single auto fit data item is a hash with :longest => [String] and -:sz=> [Integer] members. -

    +
    +

    a single auto fit data item is a hash with :longest => [String] and +:sz=> [Integer] members.

    -

    -An array of content based calculated column widths. -

    + +

    An array of content based calculated column widths.

    @@ -786,9 +712,8 @@ An array of content based calculated column widths. — -

    -of Hash -

    +
    +

    of Hash

    @@ -808,10 +733,9 @@ of Hash
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 25
     
    -def auto_fit_data
    -  @auto_fit_data
    -end
    -
    +def auto_fit_data + @auto_fit_data +end @@ -829,9 +753,8 @@ of Hash

    -

    -The name of the worksheet -

    + +

    The name of the worksheet

    @@ -865,10 +788,9 @@ The name of the worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 9
     
    -def name
    -  @name
    -end
    -
    +def name + @name +end @@ -889,15 +811,13 @@ The name of the worksheet
    Note: -

    -The recommended way to manage rows is Worksheet#add_row -

    +
    +

    The recommended way to manage rows is Worksheet#add_row

    -

    -The rows in this worksheet -

    + +

    The rows in this worksheet

    @@ -938,10 +858,9 @@ The rows in this worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 20
     
    -def rows
    -  @rows
    -end
    -
    +def rows + @rows +end @@ -959,9 +878,8 @@ The rows in this worksheet

    -

    -The workbook that owns this worksheet -

    + +

    The workbook that owns this worksheet

    @@ -995,10 +913,9 @@ The workbook that owns this worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 13
     
    -def workbook
    -  @workbook
    -end
    -
    +def workbook + @workbook +end @@ -1023,18 +940,16 @@ The workbook that owns this worksheet
    Note: -

    -each chart type also specifies additional options -

    +
    +

    each chart type also specifies additional options

    -

    -Adds a chart to this worksheets drawing. This is the recommended way to + +

    Adds a chart to this worksheets drawing. This is the recommended way to create charts for your worksheet. This method wraps the complexity of dealing with ooxml drawing, anchors, markers graphic frames chart objects -and all the other dirty details. -

    +and all the other dirty details.

    @@ -1066,9 +981,8 @@ and all the other dirty details. — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -1175,12 +1089,11 @@ a customizable set of options
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 148
     
    -def add_chart(chart_type, options={})
    -  chart = drawing.add_chart(chart_type, options)
    -  yield chart if block_given?
    -  chart
    -end
    -
    +def add_chart(chart_type, options={}) + chart = drawing.add_chart(chart_type, options) + yield chart if block_given? + chart +end @@ -1195,9 +1108,8 @@ a customizable set of options

    -

    -Adds a media item to the worksheets drawing -

    + +

    Adds a media item to the worksheets drawing

    @@ -1229,9 +1141,8 @@ Adds a media item to the worksheets drawing — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -1250,9 +1161,8 @@ a customizable set of options - —

    -unknown -

    + —
    +

    unknown

    @@ -1288,12 +1198,11 @@ unknown
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 157
     
    -def add_image(options={})
    -  image = drawing.add_image(options)
    -  yield image if block_given?
    -  image
    -end
    -
    +def add_image(options={}) + image = drawing.add_image(options) + yield image if block_given? + image +end @@ -1308,9 +1217,8 @@ unknown

    -

    -Adds a row to the worksheet and updates auto fit data -

    + +

    Adds a row to the worksheet and updates auto fit data

    @@ -1331,9 +1239,8 @@ Adds a row to the worksheet and updates auto fit data — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -1421,118 +1328,12 @@ a customizable set of options
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 86
     
    -def add_row(values=[], options={})
    -  Row.new(self, values, options)
    -  update_auto_fit_data @rows.last.cells
    -  yield @rows.last if block_given?
    -  @rows.last
    -end
    -
    - - - -
    - -
    -

    - - - (Float) auto_width(col) - - - -

    -
    - -
    - Note: -

    -From ECMA docs -

    -
    - Column width measured as the number of characters of the maximum digit width of the numbers 0 .. 9 as
    - rendered in the normal style's font. There are 4 pixels of margin padding (two on each side), plus 1 pixel padding for the gridlines.
    - width = Truncate([!{Number of Characters} * !{Maximum Digit Width} + !{5 pixel padding}]/{Maximum Digit Width}*256)/256
    -
    -
    -
    - -

    -Determines the proper width for a column based on content. -

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - A - - - (Hash) - - - - — -

      -hash of auto_fit_data -

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Float) - - - -
    • - -
    - -
    - - -
    -
    -
    -
    -232
    -233
    -234
    -235
    -236
    -237
    -238
    -239
    -240
    -241
    -242
    -
    -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 232
    -
    -def auto_width(col)
    -  mdw = 6.0 # maximum digit with is always 6.0 with RMagick's default font
    -  mdw_count = 0 
    -  best_guess = 1.5  #direct testing shows the results of the documented formula to be a bit too small. This is a best guess scaling
    -  font_scale = col[:sz].to_f / (self.workbook.styles.fonts[0].sz.to_f || 11.0)
    -  
    -  col[:longest].scan(/./mu).each do |i|
    -    mdw_count +=1 if @magick_draw.get_type_metrics(i).width >= mdw 
    -  end
    -  ((mdw_count * mdw + 5) / mdw * 256) / 256.0 * best_guess * font_scale      
    -end
    -
    +def add_row(values=[], options={}) + Row.new(self, values, options) + update_auto_fit_data @rows.last.cells + yield @rows.last if block_given? + @rows.last +end
    @@ -1550,16 +1351,14 @@ hash of auto_fit_data
    Note: -

    -You can also specify the style for specific columns in the call to add_row -by using an array for the :styles option -

    +
    +

    You can also specify the style for specific columns in the call to add_row +by using an array for the :styles option

    -

    -Set the style for cells in a specific column -

    + +

    Set the style for cells in a specific column

    @@ -1578,9 +1377,8 @@ Set the style for cells in a specific column — -

    -the index of the column -

    +
    +

    the index of the column

    @@ -1595,9 +1393,8 @@ the index of the column — -

    -cellXfs index -

    +
    +

    cellXfs index

    @@ -1614,9 +1411,8 @@ cellXfs index — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -1639,9 +1435,8 @@ a customizable set of options - —

    -only cells after this column will be updated. -

    + —
    +

    only cells after this column will be updated.

    @@ -1679,18 +1474,17 @@ only cells after this column will be updated.
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 123
     
    -def col_style(index, style, options={})
    -  offset = options.delete(:row_offset) || 0
    -  @rows[(offset..-1)].each do |r| 
    -    cells = r.cells[index]
    -    if cells.is_a?(Array)
    -      cells.each { |c| c.style = style }
    -    else
    -      cells.style = style
    -    end
    -  end
    -end
    -
    +def col_style(index, style, options={}) + offset = options.delete(:row_offset) || 0 + @rows[(offset..-1)].each do |r| + cells = r.cells[index] + if cells.is_a?(Array) + cells.each { |c| c.style = style } + else + cells.style = style + end + end +end @@ -1705,9 +1499,8 @@ only cells after this column will be updated.

    -

    -returns the sheet data as columnw -

    + +

    returns the sheet data as columnw

    @@ -1728,10 +1521,9 @@ returns the sheet data as columnw
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 111
     
    -def cols
    -  @rows.transpose
    -end
    -
    +def cols + @rows.transpose +end @@ -1749,15 +1541,13 @@ returns the sheet data as columnw
    Note: -

    -the recommended way to work with drawings and charts is Worksheet#add_chart -

    +
    +

    the recommended way to work with drawings and charts is Worksheet#add_chart

    -

    -The drawing associated with this worksheet. -

    + +

    The drawing associated with this worksheet.

    @@ -1798,10 +1588,9 @@ The drawing associated with this worksheet.
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 77
     
    -def drawing
    -  @drawing || @drawing = Axlsx::Drawing.new(self)
    -end
    -
    +def drawing + @drawing || @drawing = Axlsx::Drawing.new(self) +end @@ -1816,9 +1605,8 @@ The drawing associated with this worksheet.

    -

    -The index of this worksheet in the owning Workbook’s worksheets list. -

    + +

    The index of this worksheet in the owning Workbook's worksheets list.

    @@ -1852,10 +1640,9 @@ The index of this worksheet in the owning Workbook’s worksheets list.
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 69
     
    -def index
    -  @workbook.worksheets.index(self)
    -end
    -
    +def index + @workbook.worksheets.index(self) +end @@ -1870,9 +1657,8 @@ The index of this worksheet in the owning Workbook’s worksheets list.

    -

    -The part name of this worksheet -

    + +

    The part name of this worksheet

    @@ -1906,10 +1692,9 @@ The part name of this worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 51
     
    -def pn
    -  "#{WORKSHEET_PN % (index+1)}"
    -end
    -
    +def pn + "#{WORKSHEET_PN % (index+1)}" +end @@ -1924,9 +1709,8 @@ The part name of this worksheet

    -

    -The worksheet relationships. This is managed automatically by the worksheet -

    + +

    The worksheet relationships. This is managed automatically by the worksheet

    @@ -1962,12 +1746,11 @@ The worksheet relationships. This is managed automatically by the worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 189
     
    -def relationships
    -    r = Relationships.new
    -    r << Relationship.new(DRAWING_R, "../#{@drawing.pn}") if @drawing
    -    r
    -end
    -
    +def relationships + r = Relationships.new + r << Relationship.new(DRAWING_R, "../#{@drawing.pn}") if @drawing + r +end @@ -1982,9 +1765,8 @@ The worksheet relationships. This is managed automatically by the worksheet

    -

    -The relationship part name of this worksheet -

    + +

    The relationship part name of this worksheet

    @@ -2018,10 +1800,9 @@ The relationship part name of this worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 57
     
    -def rels_pn
    -  "#{WORKSHEET_RELS_PN % (index+1)}"
    -end
    -
    +def rels_pn + "#{WORKSHEET_RELS_PN % (index+1)}" +end @@ -2036,9 +1817,8 @@ The relationship part name of this worksheet

    -

    -The relationship Id of thiw worksheet -

    + +

    The relationship Id of thiw worksheet

    @@ -2072,10 +1852,9 @@ The relationship Id of thiw worksheet
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 63
     
    -def rId
    -  "rId#{index+1}"
    -end
    -
    +def rId + "rId#{index+1}" +end @@ -2093,15 +1872,13 @@ The relationship Id of thiw worksheet
    Note: -

    -You can also specify the style in the add_row call -

    +
    +

    You can also specify the style in the add_row call

    -

    -Set the style for cells in a specific row -

    + +

    Set the style for cells in a specific row

    @@ -2120,9 +1897,8 @@ Set the style for cells in a specific row — -

    -or range of indexes in the table -

    +
    +

    or range of indexes in the table

    @@ -2137,9 +1913,8 @@ or range of indexes in the table — -

    -cellXfs index -

    +
    +

    cellXfs index

    @@ -2156,9 +1931,8 @@ cellXfs index — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -2181,9 +1955,8 @@ a customizable set of options - —

    -only cells after this column will be updated. -

    + —
    +

    only cells after this column will be updated.

    @@ -2219,16 +1992,15 @@ only cells after this column will be updated.
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 100
     
    -def row_style(index, style, options={})
    -  offset = options.delete(:col_offset) || 0
    -  rs = @rows[index]
    -  if rs.is_a?(Array)
    -    rs.each { |r| r.cells[(offset..-1)].each { |c| c.style = style } }
    -  else
    -    rs.cells[(offset..-1)].each { |c| c.style = style }
    -  end
    -end
    -
    +def row_style(index, style, options={}) + offset = options.delete(:col_offset) || 0 + rs = @rows[index] + if rs.is_a?(Array) + rs.each { |r| r.cells[(offset..-1)].each { |c| c.style = style } } + else + rs.cells[(offset..-1)].each { |c| c.style = style } + end +end @@ -2243,9 +2015,8 @@ only cells after this column will be updated.

    -

    -Serializes the worksheet document -

    + +

    Serializes the worksheet document

    @@ -2297,143 +2068,27 @@ Serializes the worksheet document
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 165
     
    -def to_xml
    -  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
    -    xml.worksheet(:xmlns => XML_NS, :'xmlns:r' => XML_NS_R) {
    -      if @auto_fit_data.size > 0
    -        xml.cols {
    -          @auto_fit_data.each_with_index do |col, index|
    -            min_max = index+1
    -            xml.col(:min=>min_max, :max=>min_max, :width => auto_width(col), :customWidth=>"true")
    -          end
    -        }
    -      end
    -      xml.sheetData {
    -        @rows.each do |row|
    -          row.to_xml(xml)
    -        end
    -      }
    -      xml.drawing :"r:id"=>"rId1" if @drawing          
    -    }
    -  end
    -  builder.to_xml
    -end
    -
    - - - -
    - -
    -

    - - - (Array) update_auto_fit_data(cells) - - - -

    -
    -

    -Updates auto fit data. Autofit data attempts to determine the cell in a -column that has the greatest width by comparing the length of the text -multiplied by the size of the font. -

    - - -
    -
    -
    -

    Parameters:

    -
      - -
    • - - cells - - - (Array) - - - - — -

      -an array of cells -

      -
      - -
    • - -
    - -

    Returns:

    -
      - -
    • - - - (Array) - - - - — -

      -of Cell objects -

      -
      - -
    • - -
    - -
    - - -
    -
    -
    -
    -204
    -205
    -206
    -207
    -208
    -209
    -210
    -211
    -212
    -213
    -214
    -215
    -216
    -217
    -218
    -219
    -220
    -221
    -222
    -
    -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 204
    -
    -def update_auto_fit_data(cells)
    -  styles = self.workbook.styles
    -  cellXfs, fonts = styles.cellXfs, styles.fonts
    -  sz = fonts[0].sz
    -
    -  cells.each_with_index do |item, index|
    -    col = @auto_fit_data[index] || {:longest=>"", :sz=>sz} 
    -    cell_xf = cellXfs[item.style]
    -    font = fonts[cell_xf.fontId || 0]
    -    sz = font.sz || sz
    -
    -    if (col[:longest].scan(/./mu).size * col[:sz]) < (item.value.to_s.scan(/./mu).size * sz)
    -      col[:sz] =  sz
    -      col[:longest] = item.value.to_s
    -    end
    -    @auto_fit_data[index] = col
    -  end
    -  cells
    -end
    -
    +def to_xml + builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml| + xml.worksheet(:xmlns => XML_NS, :xmlns:r' => XML_NS_R) { + if @auto_fit_data.size > 0 + xml.cols { + @auto_fit_data.each_with_index do |col, index| + min_max = index+1 + xml.col(:min=>min_max, :max=>min_max, :width => auto_width(col), :customWidth=>"true") + end + } + end + xml.sheetData { + @rows.each do |row| + row.to_xml(xml) + end + } + xml.drawing :r:id"=>"rId1" if @drawing + } + end + builder.to_xml +end
    @@ -2444,9 +2099,9 @@ of Cell objects
    diff --git a/doc/Axlsx/Xf.html b/doc/Axlsx/Xf.html index b7da1702..911b8ba0 100644 --- a/doc/Axlsx/Xf.html +++ b/doc/Axlsx/Xf.html @@ -94,10 +94,9 @@

    Overview

    -

    -The Xf class defines a formatting record for use in Styles. The recommended -way to manage styles for your workbook is with Styles#add_style -

    + +

    The Xf class defines a formatting record for use in Styles. The recommended +way to manage styles for your workbook is with Styles#add_style

    @@ -136,9 +135,8 @@ way to manage styles for your workbook is with Styles#add_style -

    -The cell alignment for this style. -

    +
    +

    The cell alignment for this style.

    @@ -163,9 +161,8 @@ The cell alignment for this style. -

    -Indicates if the alignment options should be applied. -

    +
    +

    Indicates if the alignment options should be applied.

    @@ -190,9 +187,8 @@ Indicates if the alignment options should be applied. -

    -indicates if the borderId should be applied. -

    +
    +

    indicates if the borderId should be applied.

    @@ -217,9 +213,8 @@ indicates if the borderId should be applied. -

    -indicates if the fillId should be applied. -

    +
    +

    indicates if the fillId should be applied.

    @@ -244,9 +239,8 @@ indicates if the fillId should be applied. -

    -indicates if the fontId should be applied. -

    +
    +

    indicates if the fontId should be applied.

    @@ -271,9 +265,8 @@ indicates if the fontId should be applied. -

    -indicates if the numFmtId should be applied. -

    +
    +

    indicates if the numFmtId should be applied.

    @@ -298,9 +291,8 @@ indicates if the numFmtId should be applied. -

    -Indicates if the protection options should be applied. -

    +
    +

    Indicates if the protection options should be applied.

    @@ -325,9 +317,8 @@ Indicates if the protection options should be applied. -

    -index (0 based) of the border to be used in this style. -

    +
    +

    index (0 based) of the border to be used in this style.

    @@ -352,9 +343,8 @@ index (0 based) of the border to be used in this style. -

    -index (0 based) of the fill to be used in this style. -

    +
    +

    index (0 based) of the fill to be used in this style.

    @@ -379,9 +369,8 @@ index (0 based) of the fill to be used in this style. -

    -index (0 based) of the font to be used in this style. -

    +
    +

    index (0 based) of the font to be used in this style.

    @@ -406,9 +395,8 @@ index (0 based) of the font to be used in this style. -

    -id of the numFmt to apply to this style. -

    +
    +

    id of the numFmt to apply to this style.

    @@ -433,9 +421,8 @@ id of the numFmt to apply to this style. -

    -indicates if the cell has a pivot table drop down button. -

    +
    +

    indicates if the cell has a pivot table drop down button.

    @@ -460,9 +447,8 @@ indicates if the cell has a pivot table drop down button. -

    -The cell protection for this style. -

    +
    +

    The cell protection for this style.

    @@ -487,9 +473,8 @@ The cell protection for this style. -

    -indecates if text should be prefixed by a single quote in the cell. -

    +
    +

    indecates if text should be prefixed by a single quote in the cell.

    @@ -514,9 +499,8 @@ indecates if text should be prefixed by a single quote in the cell. -

    -index (0 based) of cellStylesXfs item to be used in this style. -

    +
    +

    index (0 based) of cellStylesXfs item to be used in this style.

    @@ -553,9 +537,8 @@ index (0 based) of cellStylesXfs item to be used in this style. -

    -Creates a new Xf object. -

    +
    +

    Creates a new Xf object.

    @@ -577,9 +560,8 @@ Creates a new Xf object. -

    -Serializes the xf elemen. -

    +
    +

    Serializes the xf elemen.

    @@ -600,9 +582,8 @@ Serializes the xf elemen.

    -

    -Creates a new Xf object -

    + +

    Creates a new Xf object

    @@ -623,9 +604,8 @@ Creates a new Xf object — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -792,12 +772,11 @@ a customizable set of options
    # File 'lib/axlsx/stylesheet/xf.rb', line 85
     
    -def initialize(options={})
    -  options.each do |o|
    -    self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}="
    -  end
    -end
    -
    +def initialize(options={}) + options.each do |o| + self.send("#{o[0]}=", o[1]) if self.respond_to? "#{o[0]}=" + end +end @@ -820,9 +799,8 @@ a customizable set of options

    -

    -The cell alignment for this style -

    + +

    The cell alignment for this style

    @@ -863,10 +841,9 @@ The cell alignment for this style
    # File 'lib/axlsx/stylesheet/xf.rb', line 10
     
    -def alignment
    -  @alignment
    -end
    -
    +def alignment + @alignment +end @@ -884,9 +861,8 @@ The cell alignment for this style

    -

    -Indicates if the alignment options should be applied -

    + +

    Indicates if the alignment options should be applied

    @@ -920,10 +896,9 @@ Indicates if the alignment options should be applied
    # File 'lib/axlsx/stylesheet/xf.rb', line 63
     
    -def applyAlignment
    -  @applyAlignment
    -end
    -
    +def applyAlignment + @applyAlignment +end @@ -941,9 +916,8 @@ Indicates if the alignment options should be applied

    -

    -indicates if the borderId should be applied -

    + +

    indicates if the borderId should be applied

    @@ -977,10 +951,9 @@ indicates if the borderId should be applied
    # File 'lib/axlsx/stylesheet/xf.rb', line 59
     
    -def applyBorder
    -  @applyBorder
    -end
    -
    +def applyBorder + @applyBorder +end @@ -998,9 +971,8 @@ indicates if the borderId should be applied

    -

    -indicates if the fillId should be applied -

    + +

    indicates if the fillId should be applied

    @@ -1034,10 +1006,9 @@ indicates if the fillId should be applied
    # File 'lib/axlsx/stylesheet/xf.rb', line 55
     
    -def applyFill
    -  @applyFill
    -end
    -
    +def applyFill + @applyFill +end @@ -1055,9 +1026,8 @@ indicates if the fillId should be applied

    -

    -indicates if the fontId should be applied -

    + +

    indicates if the fontId should be applied

    @@ -1091,10 +1061,9 @@ indicates if the fontId should be applied
    # File 'lib/axlsx/stylesheet/xf.rb', line 51
     
    -def applyFont
    -  @applyFont
    -end
    -
    +def applyFont + @applyFont +end @@ -1112,9 +1081,8 @@ indicates if the fontId should be applied

    -

    -indicates if the numFmtId should be applied -

    + +

    indicates if the numFmtId should be applied

    @@ -1148,10 +1116,9 @@ indicates if the numFmtId should be applied
    # File 'lib/axlsx/stylesheet/xf.rb', line 47
     
    -def applyNumberFormat
    -  @applyNumberFormat
    -end
    -
    +def applyNumberFormat + @applyNumberFormat +end @@ -1169,9 +1136,8 @@ indicates if the numFmtId should be applied

    -

    -Indicates if the protection options should be applied -

    + +

    Indicates if the protection options should be applied

    @@ -1205,10 +1171,9 @@ Indicates if the protection options should be applied
    # File 'lib/axlsx/stylesheet/xf.rb', line 67
     
    -def applyProtection
    -  @applyProtection
    -end
    -
    +def applyProtection + @applyProtection +end @@ -1226,9 +1191,8 @@ Indicates if the protection options should be applied

    -

    -index (0 based) of the border to be used in this style -

    + +

    index (0 based) of the border to be used in this style

    @@ -1262,10 +1226,9 @@ index (0 based) of the border to be used in this style
    # File 'lib/axlsx/stylesheet/xf.rb', line 31
     
    -def borderId
    -  @borderId
    -end
    -
    +def borderId + @borderId +end @@ -1283,9 +1246,8 @@ index (0 based) of the border to be used in this style

    -

    -index (0 based) of the fill to be used in this style -

    + +

    index (0 based) of the fill to be used in this style

    @@ -1319,10 +1281,9 @@ index (0 based) of the fill to be used in this style
    # File 'lib/axlsx/stylesheet/xf.rb', line 27
     
    -def fillId
    -  @fillId
    -end
    -
    +def fillId + @fillId +end @@ -1340,9 +1301,8 @@ index (0 based) of the fill to be used in this style

    -

    -index (0 based) of the font to be used in this style -

    + +

    index (0 based) of the font to be used in this style

    @@ -1376,10 +1336,9 @@ index (0 based) of the font to be used in this style
    # File 'lib/axlsx/stylesheet/xf.rb', line 23
     
    -def fontId
    -  @fontId
    -end
    -
    +def fontId + @fontId +end @@ -1397,9 +1356,8 @@ index (0 based) of the font to be used in this style

    -

    -id of the numFmt to apply to this style -

    + +

    id of the numFmt to apply to this style

    @@ -1433,10 +1391,9 @@ id of the numFmt to apply to this style
    # File 'lib/axlsx/stylesheet/xf.rb', line 19
     
    -def numFmtId
    -  @numFmtId
    -end
    -
    +def numFmtId + @numFmtId +end @@ -1454,9 +1411,8 @@ id of the numFmt to apply to this style

    -

    -indicates if the cell has a pivot table drop down button -

    + +

    indicates if the cell has a pivot table drop down button

    @@ -1490,10 +1446,9 @@ indicates if the cell has a pivot table drop down button
    # File 'lib/axlsx/stylesheet/xf.rb', line 43
     
    -def pivotButton
    -  @pivotButton
    -end
    -
    +def pivotButton + @pivotButton +end @@ -1511,9 +1466,8 @@ indicates if the cell has a pivot table drop down button

    -

    -The cell protection for this style -

    + +

    The cell protection for this style

    @@ -1554,10 +1508,9 @@ The cell protection for this style
    # File 'lib/axlsx/stylesheet/xf.rb', line 15
     
    -def protection
    -  @protection
    -end
    -
    +def protection + @protection +end @@ -1575,9 +1528,8 @@ The cell protection for this style

    -

    -indecates if text should be prefixed by a single quote in the cell -

    + +

    indecates if text should be prefixed by a single quote in the cell

    @@ -1611,10 +1563,9 @@ indecates if text should be prefixed by a single quote in the cell
    # File 'lib/axlsx/stylesheet/xf.rb', line 39
     
    -def quotePrefix
    -  @quotePrefix
    -end
    -
    +def quotePrefix + @quotePrefix +end @@ -1632,10 +1583,9 @@ indecates if text should be prefixed by a single quote in the cell

    -

    -index (0 based) of cellStylesXfs item to be used in this style. Only -applies to cellXfs items -

    + +

    index (0 based) of cellStylesXfs item to be used in this style. Only +applies to cellXfs items

    @@ -1669,10 +1619,9 @@ applies to cellXfs items
    # File 'lib/axlsx/stylesheet/xf.rb', line 35
     
    -def xfId
    -  @xfId
    -end
    -
    +def xfId + @xfId +end @@ -1694,9 +1643,8 @@ applies to cellXfs items

    -

    -Serializes the xf elemen -

    + +

    Serializes the xf elemen

    @@ -1715,9 +1663,8 @@ Serializes the xf elemen — -

    -The document builder instance this objects xml will be added to. -

    +
    +

    The document builder instance this objects xml will be added to.

    @@ -1754,13 +1701,12 @@ The document builder instance this objects xml will be added to.
    # File 'lib/axlsx/stylesheet/xf.rb', line 131
     
    -def to_xml(xml)
    -  xml.xf(self.instance_values.reject { |k, v| [:alignment, :protection, :extList, :name].include? k.to_sym}) {
    -    alignment.to_xml(xml) if self.alignment
    -    protection.to_xml(xml) if self.protection
    -  }
    -end
    -
    +def to_xml(xml) + xml.xf(self.instance_values.reject { |k, v| [:alignment, :protection, :extList, :name].include? k.to_sym}) { + alignment.to_xml(xml) if self.alignment + protection.to_xml(xml) if self.protection + } +end @@ -1771,9 +1717,9 @@ The document builder instance this objects xml will be added to.
    diff --git a/doc/_index.html b/doc/_index.html index acc55086..1a25f952 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -662,9 +662,9 @@
    diff --git a/doc/file.LICENSE.html b/doc/file.LICENSE.html index de6d8629..0112b808 100644 --- a/doc/file.LICENSE.html +++ b/doc/file.LICENSE.html @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - + File: LICENSE @@ -54,37 +54,32 @@ <iframe id="search_frame"></iframe> - <div id="content"><div id='filecontents'><p> -Copyright © 2011 Randy Morgan -</p> -<p> -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to the -following conditions: -</p> -<p> -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. -</p> -<p> -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. -</p> + <div id="content"><div id='filecontents'> +<p>Copyright © 2011 Randy Morgan</p> + +<p>Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the “Software”), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions:</p> + +<p>The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software.</p> + +<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE.</p> </div></div> <div id="footer"> - Generated on Sun Nov 27 21:52:30 2011 by + Generated on Sun Nov 27 22:08:36 2011 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.7.3 (ruby-1.8.7). + 0.7.3 (ruby-1.9.3). </div> </body> diff --git a/doc/file.README.html b/doc/file.README.html index 806bbc90..cf258999 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> File: README @@ -63,7 +63,7 @@ <strong>License</strong>: MIT License <br/> <strong>Latest Version</strong>: 1.0.10.a <br/> <strong>Ruby Version</strong>: 1.8.7 - 1.9.3 <br/> -<strong>Release Date</strong>: November 26th 2011</p> +<strong>Release Date</strong>: November 27th 2011</p> <h2>Synopsis</h2> @@ -96,219 +96,219 @@ With Axlsx you can create worksheets with charts, images, automated column width <p>To install Axlsx, use the following command:</p> -<pre class="code">$ <span class='gem identifier id'>gem</span> <span class='install identifier id'>install</span> <span class='axlsx identifier id'>axlsx</span> +<pre class="code">$ gem install axlsx </pre> <h2>Usage</h2> <h3>Examples</h3> -<pre class="code"> <span class='require identifier id'>require</span> <span class='string val'>'rubygems'</span> - <span class='require identifier id'>require</span> <span class='string val'>'axlsx'</span> +<pre class="code"> <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rubygems</span><span class='tstring_end'>'</span></span> + <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>axlsx</span><span class='tstring_end'>'</span></span> </pre> <p>A Simple Workbook</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='end end kw'>end</span> - <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'>"example1.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example1.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Generating A Bar Chart</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='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'>></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'>></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'>></span><span class='string val'>"example 2: Chart"</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> - <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'>></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'>></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='end end kw'>end</span> - <span class='end end kw'>end</span> - <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'>"example2.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Bar3DChart</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:end_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>5</span><span class='comma'>,</span> <span class='int'>15</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example 2: Chart</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example2.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Generating A Pie Chart</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='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'>></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'>></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'>></span><span class='string val'>"example 3: Pie Chart"</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> - <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'>></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'>></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='end end kw'>end</span> - <span class='end end kw'>end</span> - <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'>"example3.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Pie3DChart</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:end_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>5</span><span class='comma'>,</span> <span class='int'>15</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example 3: Pie Chart</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example3.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Using Custom Styles</p> -<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> - <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> - <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'>></span> <span class='string val'>"FF000000"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FFFFFFFF"</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>></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'>></span> <span class='lbrace token'>{</span> <span class='symbol val'>:horizontal=</span><span class='gt op'>></span> <span class='symbol val'>:center</span> <span class='rbrace token'>}</span> - <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'>></span> <span class='string val'>"FF0000FF"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FFFFFFFF"</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>></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'>></span> <span class='lbrace token'>{</span> <span class='symbol val'>:horizontal=</span><span class='gt op'>></span> <span class='symbol val'>:center</span> <span class='rbrace token'>}</span> - <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> - <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'>"Text Autowidth"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</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'>></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> - <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'>></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='end end kw'>end</span> - <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'>"example4.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id wb'>wb</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span> + <span class='id black_cell'>black_cell</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=></span><span class='int'>14</span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=></span> <span class='lbrace'>{</span> <span class='symbol'>:horizontal</span><span class='op'>=></span> <span class='symbol'>:center</span> <span class='rbrace'>}</span> + <span class='id blue_cell'>blue_cell</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF0000FF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=></span><span class='int'>14</span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=></span> <span class='lbrace'>{</span> <span class='symbol'>:horizontal</span><span class='op'>=></span> <span class='symbol'>:center</span> <span class='rbrace'>}</span> + <span class='id wb'>wb</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Text Autowidth</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='id black_cell'>black_cell</span><span class='comma'>,</span> <span class='id blue_cell'>blue_cell</span><span class='comma'>,</span> <span class='id black_cell'>black_cell</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example4.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Using Custom Formatting and date1904</p> -<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> - <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> - <span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>></span><span class='string val'>"yyyy-mm-dd"</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>></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='padded identifier id'>padded</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>></span><span class='string val'>"00#"</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>></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='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>></span><span class='string val'>"0%"</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>></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='wb identifier id'>wb</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='assign token'>=</span> <span class='true true kw'>true</span> <span class='comment val'># required for generation on mac</span> - <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> - <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'>"Custom Formatted Date"</span><span class='comma token'>,</span> <span class='string val'>"Percent Formatted Float"</span><span class='comma token'>,</span> <span class='string val'>"Padded Numbers"</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'>></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='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'>></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> - <span class='end end kw'>end</span> - <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'>"example5.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id wb'>wb</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span> + <span class='id date'>date</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>yyyy-mm-dd</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id padded'>padded</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>00#</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0%</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id wb'>wb</span><span class='period'>.</span><span class='id date1904'>date1904</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># required for generation on mac +</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Custom Formatted Date</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Percent Formatted Float</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Padded Numbers</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='const'>Time</span><span class='period'>.</span><span class='id now'>now</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>32</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='id date'>date</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='id padded'>padded</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example5.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Validation</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='end end kw'>end</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='kw'>end</span> - <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> - <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> - <span class='end end kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id validate'>validate</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id error'>error</span><span class='op'>|</span> + <span class='id puts'>puts</span> <span class='id error'>error</span><span class='period'>.</span><span class='id inspect'>inspect</span> + <span class='kw'>end</span> </pre> <p>Generating A Line Chart</p> -<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> - <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> - <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'>"First"</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> - <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'>"Second"</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> - <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'>></span><span class='string val'>"example 6: Line Chart"</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> - <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> - <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> - <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'>></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'>></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> - <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'>></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'>></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> - <span class='end end kw'>end</span> - - <span class='end end kw'>end</span> - <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'>"example6.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='int'>5</span><span class='comma'>,</span> <span class='int'>7</span><span class='comma'>,</span> <span class='int'>9</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='int'>5</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>14</span><span class='comma'>,</span> <span class='int'>9</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Line3DChart</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example 6: Line Chart</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>0</span><span class='comma'>,</span> <span class='int'>2</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id end_at'>end_at</span> <span class='int'>10</span><span class='comma'>,</span> <span class='int'>15</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span><span class='period'>.</span><span class='id first'>first</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='period'>.</span><span class='id first'>first</span> + <span class='kw'>end</span> + + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example6.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Adding an Image</p> -<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> - <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> - <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'>></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'>"/image1.png"</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> - <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> - <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> - <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> - <span class='end end kw'>end</span> - <span class='end end kw'>end</span> - <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'>"example7.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_image'>add_image</span><span class='lparen'>(</span><span class='symbol'>:image_src</span> <span class='op'>=></span> <span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/image1.png</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id image'>image</span><span class='op'>|</span> + <span class='id image'>image</span><span class='period'>.</span><span class='id width'>width</span><span class='op'>=</span><span class='int'>720</span> + <span class='id image'>image</span><span class='period'>.</span><span class='id height'>height</span><span class='op'>=</span><span class='int'>666</span> + <span class='id image'>image</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>2</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example7.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Asian Language Support</p> -<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> - <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> - <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'>"日本語"</span><span class='rbrack token'>]</span> - <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'>"华语/華語"</span><span class='rbrack token'>]</span> - <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'>"한국어/조선말"</span><span class='rbrack token'>]</span> - <span class='end end kw'>end</span> - <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'>"example8.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>日本語</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>华语/華語</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>한국어/조선말</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example8.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Styling Columns</p> -<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> - <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'>></span> <span class='integer val'>9</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='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> - <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='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.3</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span> - <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> - <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> - <span class='end end kw'>end</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><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'>></span><span class='integer val'>1</span> - <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'>"example10.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:num_fmt</span> <span class='op'>=></span> <span class='int'>9</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 2</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 3</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 4</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.3</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.1</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id col_style'>col_style</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example10.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Styling Rows</p> -<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> - <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> - <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='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.3</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span> - <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> - <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> - <span class='end end kw'>end</span> - <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'>></span> <span class='string val'>"FF000000"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color=</span><span class='gt op'>></span><span class='string val'>"FFFFFFFF"</span> - <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'>></span> <span class='integer val'>9</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><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'>></span><span class='integer val'>1</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><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> - <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'>"example11.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 2</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 3</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 4</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.3</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.1</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id head'>head</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:num_fmt</span> <span class='op'>=></span> <span class='int'>9</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id col_style'>col_style</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id row_style'>row_style</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id head'>head</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example11.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Rails 3</p> -<pre class="code"> <span class='comment val'>#ImageMagick port needs to be confirgured --disable-openmp when using with rails3</span> - <span class='comment val'>#http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault</span> - - <span class='comment val'>#Add the gem to your Gemfile and bundle install</span> - <span class='gem identifier id'>gem</span> <span class='string val'>'axlsx'</span> - - <span class='comment val'># A Model that has id, name, title, content, vote, popularity, created_at and updated_at attributes </span> - <span class='class class kw'>class</span> <span class='Post constant id'>Post</span> <span class='lt op'><</span> <span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span> - - <span class='comment val'># support for :include, :exclude, :only like ruport has not been implemented yet</span> - <span class='acts_as_axlsx identifier id'>acts_as_axlsx</span> - - <span class='def def kw'>def</span> <span class='report identifier id'>report</span> - <span class='comment val'># First generate your package from the model</span> - <span class='comment val'># scopes, conditions etc are allowed but must be before the to_xlsx call.</span> - <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Post constant id'>Post</span><span class='dot token'>.</span><span class='to_xlsx identifier id'>to_xlsx</span> - - <span class='comment val'># Add in some basic styles and formats</span> - <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='header identifier id'>header</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='s identifier id'>s</span><span class='bitor op'>|</span> - <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:num_fmt=</span><span class='gt op'>></span><span class='integer val'>9</span> - <span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'yyyy/mm/dd'</span> - <span class='header identifier id'>header</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:bg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FF000000"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FFFFFFFF"</span><span class='comma token'>,</span> <span class='symbol val'>:alignment</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:horizontal=</span><span class='gt op'>></span><span class='symbol val'>:center</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>></span><span class='integer val'>14</span> - <span class='end end kw'>end</span> - - <span class='ws identifier id'>ws</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span> - - <span class='comment val'># Update the row and columns style so they propery format data.</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='row_style identifier id'>row_style</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='header identifier id'>header</span><span class='rparen token'>)</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span><span class='lparen token'>(</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>></span><span class='integer val'>1</span><span class='rparen token'>)</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span><span class='lparen token'>(</span><span class='lparen token'>(</span><span class='float val'>6</span><span class='dot2 op'>..</span><span class='integer val'>7</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>></span><span class='integer val'>1</span><span class='rparen token'>)</span> - - <span class='comment val'># Add a chart for good measure</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Bar3DChart constant id'>Bar3DChart</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='chart identifier id'>chart</span><span class='bitor op'>|</span> - <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='title identifier id'>title</span><span class='assign token'>=</span><span class='string val'>'Post Votes'</span> - <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='start_at identifier id'>start_at</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='size identifier id'>size</span> - <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='end_at identifier id'>end_at</span> <span class='integer val'>4</span><span class='comma token'>,</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='size identifier id'>size</span><span class='plus op'>+</span><span class='integer val'>20</span> - <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'>></span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span><span class='lbrack token'>[</span><span class='integer val'>4</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels=</span><span class='gt op'>></span><span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span> - <span class='end end kw'>end</span> - - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>'posts.xlsx'</span><span class='rparen token'>)</span> - <span class='send_file identifier id'>send_file</span> <span class='string val'>'posts.xlsx'</span><span class='comma token'>,</span> <span class='symbol val'>:type=</span><span class='gt op'>></span><span class='string val'>"application/xlsx"</span><span class='comma token'>,</span> <span class='symbol val'>:x_sendfile=</span><span class='gt op'>></span><span class='true true kw'>true</span> - <span class='end end kw'>end</span> - <span class='end end kw'>end</span> +<pre class="code"> <span class='comment'>#ImageMagick port needs to be confirgured --disable-openmp when using with rails3 +</span> <span class='comment'>#http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault +</span> + <span class='comment'>#Add the gem to your Gemfile and bundle install +</span> <span class='id gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>axlsx</span><span class='tstring_end'>'</span></span> + + <span class='comment'># A Model that has id, name, title, content, vote, popularity, created_at and updated_at attributes +</span> <span class='kw'>class</span> <span class='const'>Post</span> <span class='op'><</span> <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span> + + <span class='comment'># support for :include, :exclude, :only like ruport has not been implemented yet +</span> <span class='id acts_as_axlsx'>acts_as_axlsx</span> + + <span class='kw'>def</span> <span class='id report'>report</span> + <span class='comment'># First generate your package from the model +</span> <span class='comment'># scopes, conditions etc are allowed but must be before the to_xlsx call. +</span> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Post</span><span class='period'>.</span><span class='id to_xlsx'>to_xlsx</span><span class='lparen'>(</span><span class='symbol'>:all</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='lbrace'>{</span><span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span><span class='rbrace'>}</span><span class='rparen'>)</span> + + <span class='comment'># Add in some basic styles and formats +</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='id date'>date</span><span class='comma'>,</span> <span class='id header'>header</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id s'>s</span><span class='op'>|</span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id s'>s</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:num_fmt</span><span class='op'>=></span><span class='int'>9</span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>STYLE_THIN_BORDER</span> + <span class='id date'>date</span> <span class='op'>=</span> <span class='id s'>s</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>yyyy/mm/dd</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>STYLE_THIN_BORDER</span> + <span class='id header'>header</span> <span class='op'>=</span> <span class='id s'>s</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=></span> <span class='lbrace'>{</span><span class='symbol'>:horizontal</span><span class='op'>=></span><span class='symbol'>:center</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=></span><span class='int'>14</span> + <span class='kw'>end</span> + + <span class='id ws'>ws</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span> + + <span class='comment'># Update the row and columns style so they propery format data. +</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id row_style'>row_style</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='id header'>header</span><span class='rparen'>)</span> + <span class='id ws'>ws</span><span class='period'>.</span><span class='id col_style'>col_style</span><span class='lparen'>(</span><span class='int'>5</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span><span class='rparen'>)</span> + <span class='id ws'>ws</span><span class='period'>.</span><span class='id col_style'>col_style</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='int'>6</span><span class='op'>..</span><span class='int'>7</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id date'>date</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span><span class='rparen'>)</span> + + <span class='comment'># Add a chart for good measure +</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Bar3DChart</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id title'>title</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Post Votes</span><span class='tstring_end'>'</span></span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id size'>size</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id end_at'>end_at</span> <span class='int'>4</span><span class='comma'>,</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id size'>size</span><span class='op'>+</span><span class='int'>20</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span> <span class='op'>=></span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id cols'>cols</span><span class='lbracket'>[</span><span class='int'>4</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=></span><span class='id ws'>ws</span><span class='period'>.</span><span class='id cols'>cols</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>posts.xlsx</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> + <span class='id send_file'>send_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>posts.xlsx</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:type</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>application/xlsx</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:x_sendfile</span><span class='op'>=></span><span class='kw'>true</span> + <span class='kw'>end</span> + <span class='kw'>end</span> </pre> <h3>Documentation</h3> <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> -<pre class="code"> <span class='gem identifier id'>gem</span> <span class='install identifier id'>install</span> <span class='yard identifier id'>yard</span> - <span class='yard identifier id'>yard</span> <span class='server identifier id'>server</span> <span class='minus op'>-</span><span class='g identifier id'>g</span> +<pre class="code"> <span class='id gem'>gem</span> <span class='id install'>install</span> <span class='id yard'>yard</span> + <span class='id yard'>yard</span> <span class='id server'>server</span> <span class='op'>-</span><span class='id g'>g</span> </pre> <h3>Specs</h3> @@ -325,6 +325,7 @@ With Axlsx you can create worksheets with charts, images, automated column width <li>Added acts_as_xlsx mixin for rails3 See Examples</li> <li>Added row.style assignation for updating the cell style for an entire row</li> <li>Added col_style method to worksheet upate a the style for a column of cells</li> +<li>Added cols for an easy reference to columns in a worksheet.</li> </ul> </li> <li><p><strong>October.26.11</strong>: 1.0.9 release</p> @@ -346,9 +347,9 @@ licensed under the MIT license. Please see the <a href="file.LICENSE.html" title </div></div> <div id="footer"> - Generated on Sun Nov 27 21:52:30 2011 by + Generated on Sun Nov 27 22:08:36 2011 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.7.3 (ruby-1.8.7). + 0.7.3 (ruby-1.9.3). </div> </body> diff --git a/doc/index.html b/doc/index.html index 806bbc90..cf258999 100644 --- a/doc/index.html +++ b/doc/index.html @@ -2,7 +2,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title> File: README @@ -63,7 +63,7 @@ <strong>License</strong>: MIT License <br/> <strong>Latest Version</strong>: 1.0.10.a <br/> <strong>Ruby Version</strong>: 1.8.7 - 1.9.3 <br/> -<strong>Release Date</strong>: November 26th 2011</p> +<strong>Release Date</strong>: November 27th 2011</p> <h2>Synopsis</h2> @@ -96,219 +96,219 @@ With Axlsx you can create worksheets with charts, images, automated column width <p>To install Axlsx, use the following command:</p> -<pre class="code">$ <span class='gem identifier id'>gem</span> <span class='install identifier id'>install</span> <span class='axlsx identifier id'>axlsx</span> +<pre class="code">$ gem install axlsx </pre> <h2>Usage</h2> <h3>Examples</h3> -<pre class="code"> <span class='require identifier id'>require</span> <span class='string val'>'rubygems'</span> - <span class='require identifier id'>require</span> <span class='string val'>'axlsx'</span> +<pre class="code"> <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>rubygems</span><span class='tstring_end'>'</span></span> + <span class='id require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>axlsx</span><span class='tstring_end'>'</span></span> </pre> <p>A Simple Workbook</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='end end kw'>end</span> - <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'>"example1.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example1.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Generating A Bar Chart</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='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'>></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'>></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'>></span><span class='string val'>"example 2: Chart"</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> - <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'>></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'>></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='end end kw'>end</span> - <span class='end end kw'>end</span> - <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'>"example2.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Bar3DChart</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:end_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>5</span><span class='comma'>,</span> <span class='int'>15</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example 2: Chart</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example2.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Generating A Pie Chart</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='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'>></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'>></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'>></span><span class='string val'>"example 3: Pie Chart"</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> - <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'>></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'>></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='end end kw'>end</span> - <span class='end end kw'>end</span> - <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'>"example3.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Pie3DChart</span><span class='comma'>,</span> <span class='symbol'>:start_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span><span class='int'>2</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:end_at</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='int'>5</span><span class='comma'>,</span> <span class='int'>15</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example 3: Pie Chart</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example3.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Using Custom Styles</p> -<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> - <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> - <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'>></span> <span class='string val'>"FF000000"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FFFFFFFF"</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>></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'>></span> <span class='lbrace token'>{</span> <span class='symbol val'>:horizontal=</span><span class='gt op'>></span> <span class='symbol val'>:center</span> <span class='rbrace token'>}</span> - <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'>></span> <span class='string val'>"FF0000FF"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FFFFFFFF"</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>></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'>></span> <span class='lbrace token'>{</span> <span class='symbol val'>:horizontal=</span><span class='gt op'>></span> <span class='symbol val'>:center</span> <span class='rbrace token'>}</span> - <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> - <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'>"Text Autowidth"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</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'>></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> - <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'>></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='end end kw'>end</span> - <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'>"example4.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id wb'>wb</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span> + <span class='id black_cell'>black_cell</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=></span><span class='int'>14</span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=></span> <span class='lbrace'>{</span> <span class='symbol'>:horizontal</span><span class='op'>=></span> <span class='symbol'>:center</span> <span class='rbrace'>}</span> + <span class='id blue_cell'>blue_cell</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF0000FF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=></span><span class='int'>14</span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=></span> <span class='lbrace'>{</span> <span class='symbol'>:horizontal</span><span class='op'>=></span> <span class='symbol'>:center</span> <span class='rbrace'>}</span> + <span class='id wb'>wb</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Text Autowidth</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='id black_cell'>black_cell</span><span class='comma'>,</span> <span class='id blue_cell'>blue_cell</span><span class='comma'>,</span> <span class='id black_cell'>black_cell</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example4.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Using Custom Formatting and date1904</p> -<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> - <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> - <span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>></span><span class='string val'>"yyyy-mm-dd"</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>></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='padded identifier id'>padded</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>></span><span class='string val'>"00#"</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>></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='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='wb identifier id'>wb</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code=</span><span class='gt op'>></span><span class='string val'>"0%"</span><span class='comma token'>,</span> <span class='symbol val'>:border</span> <span class='assign token'>=</span><span class='gt op'>></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='wb identifier id'>wb</span><span class='dot token'>.</span><span class='date1904 identifier id'>date1904</span> <span class='assign token'>=</span> <span class='true true kw'>true</span> <span class='comment val'># required for generation on mac</span> - <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> - <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'>"Custom Formatted Date"</span><span class='comma token'>,</span> <span class='string val'>"Percent Formatted Float"</span><span class='comma token'>,</span> <span class='string val'>"Padded Numbers"</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'>></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='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'>></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> - <span class='end end kw'>end</span> - <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'>"example5.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id wb'>wb</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span> + <span class='id date'>date</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>yyyy-mm-dd</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id padded'>padded</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>00#</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>0%</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id wb'>wb</span><span class='period'>.</span><span class='id date1904'>date1904</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># required for generation on mac +</span> <span class='id wb'>wb</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Custom Formatted Date</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Percent Formatted Float</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Padded Numbers</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='const'>Time</span><span class='period'>.</span><span class='id now'>now</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>32</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='lbracket'>[</span><span class='id date'>date</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='id padded'>padded</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example5.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Validation</p> -<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> - <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> - <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'>"First"</span><span class='comma token'>,</span> <span class='string val'>"Second"</span><span class='comma token'>,</span> <span class='string val'>"Third"</span><span class='rbrack token'>]</span> - <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='end end kw'>end</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Third</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span> + <span class='kw'>end</span> - <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> - <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> - <span class='end end kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id validate'>validate</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id error'>error</span><span class='op'>|</span> + <span class='id puts'>puts</span> <span class='id error'>error</span><span class='period'>.</span><span class='id inspect'>inspect</span> + <span class='kw'>end</span> </pre> <p>Generating A Line Chart</p> -<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> - <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> - <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'>"First"</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> - <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'>"Second"</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> - <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'>></span><span class='string val'>"example 6: Line Chart"</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> - <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> - <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> - <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'>></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'>></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> - <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'>></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'>></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> - <span class='end end kw'>end</span> - - <span class='end end kw'>end</span> - <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'>"example6.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>First</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='int'>5</span><span class='comma'>,</span> <span class='int'>7</span><span class='comma'>,</span> <span class='int'>9</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Second</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='int'>5</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>14</span><span class='comma'>,</span> <span class='int'>9</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Line3DChart</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example 6: Line Chart</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>0</span><span class='comma'>,</span> <span class='int'>2</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id end_at'>end_at</span> <span class='int'>10</span><span class='comma'>,</span> <span class='int'>15</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id cells'>cells</span><span class='period'>.</span><span class='id first'>first</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span><span class='op'>=></span><span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='op'>=></span> <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id last'>last</span><span class='period'>.</span><span class='id cells'>cells</span><span class='period'>.</span><span class='id first'>first</span> + <span class='kw'>end</span> + + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example6.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Adding an Image</p> -<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> - <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> - <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'>></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'>"/image1.png"</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> - <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> - <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> - <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> - <span class='end end kw'>end</span> - <span class='end end kw'>end</span> - <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'>"example7.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_image'>add_image</span><span class='lparen'>(</span><span class='symbol'>:image_src</span> <span class='op'>=></span> <span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/image1.png</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id image'>image</span><span class='op'>|</span> + <span class='id image'>image</span><span class='period'>.</span><span class='id width'>width</span><span class='op'>=</span><span class='int'>720</span> + <span class='id image'>image</span><span class='period'>.</span><span class='id height'>height</span><span class='op'>=</span><span class='int'>666</span> + <span class='id image'>image</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>2</span><span class='comma'>,</span> <span class='int'>2</span> + <span class='kw'>end</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example7.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Asian Language Support</p> -<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> - <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> - <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'>"日本語"</span><span class='rbrack token'>]</span> - <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'>"华语/華語"</span><span class='rbrack token'>]</span> - <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'>"한국어/조선말"</span><span class='rbrack token'>]</span> - <span class='end end kw'>end</span> - <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'>"example8.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>日本語</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>华语/華語</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>한국어/조선말</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example8.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Styling Columns</p> -<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> - <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'>></span> <span class='integer val'>9</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='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> - <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='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.3</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span> - <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> - <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> - <span class='end end kw'>end</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><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'>></span><span class='integer val'>1</span> - <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'>"example10.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:num_fmt</span> <span class='op'>=></span> <span class='int'>9</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 2</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 3</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 4</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.3</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.1</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id col_style'>col_style</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example10.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Styling Rows</p> -<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> - <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> - <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='sheet identifier id'>sheet</span><span class='dot token'>.</span><span class='add_row identifier id'>add_row</span> <span class='lbrack token'>[</span><span class='integer val'>1</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='comma token'>,</span> <span class='integer val'>0</span><span class='integer val'>.3</span><span class='comma token'>,</span> <span class='integer val'>4</span><span class='rbrack token'>]</span> - <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> - <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> - <span class='end end kw'>end</span> - <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'>></span> <span class='string val'>"FF000000"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color=</span><span class='gt op'>></span><span class='string val'>"FFFFFFFF"</span> - <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'>></span> <span class='integer val'>9</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><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'>></span><span class='integer val'>1</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span><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> - <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'>"example11.xlsx"</span><span class='rparen token'>)</span> +<pre class="code"> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Package</span><span class='period'>.</span><span class='id new'>new</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id add_worksheet'>add_worksheet</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id sheet'>sheet</span><span class='op'>|</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 1</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 2</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 3</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>col 4</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.3</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.2</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='id sheet'>sheet</span><span class='period'>.</span><span class='id add_row'>add_row</span> <span class='lbracket'>[</span><span class='int'>1</span><span class='comma'>,</span> <span class='int'>2</span><span class='comma'>,</span> <span class='float'>0.1</span><span class='comma'>,</span> <span class='int'>4</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + <span class='id head'>head</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:num_fmt</span> <span class='op'>=></span> <span class='int'>9</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id col_style'>col_style</span> <span class='int'>2</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span><span class='period'>.</span><span class='id row_style'>row_style</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id head'>head</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>example11.xlsx</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> </pre> <p>Rails 3</p> -<pre class="code"> <span class='comment val'>#ImageMagick port needs to be confirgured --disable-openmp when using with rails3</span> - <span class='comment val'>#http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault</span> - - <span class='comment val'>#Add the gem to your Gemfile and bundle install</span> - <span class='gem identifier id'>gem</span> <span class='string val'>'axlsx'</span> - - <span class='comment val'># A Model that has id, name, title, content, vote, popularity, created_at and updated_at attributes </span> - <span class='class class kw'>class</span> <span class='Post constant id'>Post</span> <span class='lt op'><</span> <span class='ActiveRecord constant id'>ActiveRecord</span><span class='colon2 op'>::</span><span class='Base constant id'>Base</span> - - <span class='comment val'># support for :include, :exclude, :only like ruport has not been implemented yet</span> - <span class='acts_as_axlsx identifier id'>acts_as_axlsx</span> - - <span class='def def kw'>def</span> <span class='report identifier id'>report</span> - <span class='comment val'># First generate your package from the model</span> - <span class='comment val'># scopes, conditions etc are allowed but must be before the to_xlsx call.</span> - <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='Post constant id'>Post</span><span class='dot token'>.</span><span class='to_xlsx identifier id'>to_xlsx</span> - - <span class='comment val'># Add in some basic styles and formats</span> - <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='header identifier id'>header</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span><span class='comma token'>,</span> <span class='nil nil kw'>nil</span> - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='styles identifier id'>styles</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='s identifier id'>s</span><span class='bitor op'>|</span> - <span class='percent identifier id'>percent</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:num_fmt=</span><span class='gt op'>></span><span class='integer val'>9</span> - <span class='date identifier id'>date</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:format_code</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>'yyyy/mm/dd'</span> - <span class='header identifier id'>header</span> <span class='assign token'>=</span> <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='add_style identifier id'>add_style</span> <span class='symbol val'>:bg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FF000000"</span><span class='comma token'>,</span> <span class='symbol val'>:fg_color</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='string val'>"FFFFFFFF"</span><span class='comma token'>,</span> <span class='symbol val'>:alignment</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='lbrace token'>{</span><span class='symbol val'>:horizontal=</span><span class='gt op'>></span><span class='symbol val'>:center</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='symbol val'>:sz=</span><span class='gt op'>></span><span class='integer val'>14</span> - <span class='end end kw'>end</span> - - <span class='ws identifier id'>ws</span> <span class='assign token'>=</span> <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='workbook identifier id'>workbook</span><span class='dot token'>.</span><span class='worksheets identifier id'>worksheets</span><span class='dot token'>.</span><span class='first identifier id'>first</span> - - <span class='comment val'># Update the row and columns style so they propery format data.</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='row_style identifier id'>row_style</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='header identifier id'>header</span><span class='rparen token'>)</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span><span class='lparen token'>(</span><span class='integer val'>5</span><span class='comma token'>,</span> <span class='percent identifier id'>percent</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>></span><span class='integer val'>1</span><span class='rparen token'>)</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='col_style identifier id'>col_style</span><span class='lparen token'>(</span><span class='lparen token'>(</span><span class='float val'>6</span><span class='dot2 op'>..</span><span class='integer val'>7</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='date identifier id'>date</span><span class='comma token'>,</span> <span class='symbol val'>:row_offset=</span><span class='gt op'>></span><span class='integer val'>1</span><span class='rparen token'>)</span> - - <span class='comment val'># Add a chart for good measure</span> - <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='add_chart identifier id'>add_chart</span><span class='lparen token'>(</span><span class='Axlsx constant id'>Axlsx</span><span class='colon2 op'>::</span><span class='Bar3DChart constant id'>Bar3DChart</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='chart identifier id'>chart</span><span class='bitor op'>|</span> - <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='title identifier id'>title</span><span class='assign token'>=</span><span class='string val'>'Post Votes'</span> - <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='start_at identifier id'>start_at</span> <span class='integer val'>0</span><span class='comma token'>,</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='size identifier id'>size</span> - <span class='chart identifier id'>chart</span><span class='dot token'>.</span><span class='end_at identifier id'>end_at</span> <span class='integer val'>4</span><span class='comma token'>,</span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='size identifier id'>size</span><span class='plus op'>+</span><span class='integer val'>20</span> - <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'>></span> <span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span><span class='lbrack token'>[</span><span class='integer val'>4</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='symbol val'>:labels=</span><span class='gt op'>></span><span class='ws identifier id'>ws</span><span class='dot token'>.</span><span class='cols identifier id'>cols</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='lbrack token'>[</span><span class='lparen token'>(</span><span class='float val'>1</span><span class='dot2 op'>..</span><span class='integer val'>-1</span><span class='rparen token'>)</span><span class='rbrack token'>]</span> - <span class='end end kw'>end</span> - - <span class='p identifier id'>p</span><span class='dot token'>.</span><span class='serialize identifier id'>serialize</span><span class='lparen token'>(</span><span class='string val'>'posts.xlsx'</span><span class='rparen token'>)</span> - <span class='send_file identifier id'>send_file</span> <span class='string val'>'posts.xlsx'</span><span class='comma token'>,</span> <span class='symbol val'>:type=</span><span class='gt op'>></span><span class='string val'>"application/xlsx"</span><span class='comma token'>,</span> <span class='symbol val'>:x_sendfile=</span><span class='gt op'>></span><span class='true true kw'>true</span> - <span class='end end kw'>end</span> - <span class='end end kw'>end</span> +<pre class="code"> <span class='comment'>#ImageMagick port needs to be confirgured --disable-openmp when using with rails3 +</span> <span class='comment'>#http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault +</span> + <span class='comment'>#Add the gem to your Gemfile and bundle install +</span> <span class='id gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>axlsx</span><span class='tstring_end'>'</span></span> + + <span class='comment'># A Model that has id, name, title, content, vote, popularity, created_at and updated_at attributes +</span> <span class='kw'>class</span> <span class='const'>Post</span> <span class='op'><</span> <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span> + + <span class='comment'># support for :include, :exclude, :only like ruport has not been implemented yet +</span> <span class='id acts_as_axlsx'>acts_as_axlsx</span> + + <span class='kw'>def</span> <span class='id report'>report</span> + <span class='comment'># First generate your package from the model +</span> <span class='comment'># scopes, conditions etc are allowed but must be before the to_xlsx call. +</span> <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>Post</span><span class='period'>.</span><span class='id to_xlsx'>to_xlsx</span><span class='lparen'>(</span><span class='symbol'>:all</span><span class='comma'>,</span> <span class='symbol'>:style</span> <span class='op'>=></span> <span class='lbrace'>{</span><span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>STYLE_THIN_BORDER</span><span class='rbrace'>}</span><span class='rparen'>)</span> + + <span class='comment'># Add in some basic styles and formats +</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='id date'>date</span><span class='comma'>,</span> <span class='id header'>header</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span> + <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id styles'>styles</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id s'>s</span><span class='op'>|</span> + <span class='id percent'>percent</span> <span class='op'>=</span> <span class='id s'>s</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:num_fmt</span><span class='op'>=></span><span class='int'>9</span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>STYLE_THIN_BORDER</span> + <span class='id date'>date</span> <span class='op'>=</span> <span class='id s'>s</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:format_code</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>yyyy/mm/dd</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:border</span> <span class='op'>=></span> <span class='const'>STYLE_THIN_BORDER</span> + <span class='id header'>header</span> <span class='op'>=</span> <span class='id s'>s</span><span class='period'>.</span><span class='id add_style'>add_style</span> <span class='symbol'>:bg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FF000000</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:fg_color</span> <span class='op'>=></span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>FFFFFFFF</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:alignment</span> <span class='op'>=></span> <span class='lbrace'>{</span><span class='symbol'>:horizontal</span><span class='op'>=></span><span class='symbol'>:center</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='symbol'>:sz</span><span class='op'>=></span><span class='int'>14</span> + <span class='kw'>end</span> + + <span class='id ws'>ws</span> <span class='op'>=</span> <span class='id p'>p</span><span class='period'>.</span><span class='id workbook'>workbook</span><span class='period'>.</span><span class='id worksheets'>worksheets</span><span class='period'>.</span><span class='id first'>first</span> + + <span class='comment'># Update the row and columns style so they propery format data. +</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id row_style'>row_style</span><span class='lparen'>(</span><span class='int'>0</span><span class='comma'>,</span> <span class='id header'>header</span><span class='rparen'>)</span> + <span class='id ws'>ws</span><span class='period'>.</span><span class='id col_style'>col_style</span><span class='lparen'>(</span><span class='int'>5</span><span class='comma'>,</span> <span class='id percent'>percent</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span><span class='rparen'>)</span> + <span class='id ws'>ws</span><span class='period'>.</span><span class='id col_style'>col_style</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='int'>6</span><span class='op'>..</span><span class='int'>7</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id date'>date</span><span class='comma'>,</span> <span class='symbol'>:row_offset</span><span class='op'>=></span><span class='int'>1</span><span class='rparen'>)</span> + + <span class='comment'># Add a chart for good measure +</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id add_chart'>add_chart</span><span class='lparen'>(</span><span class='const'>Axlsx</span><span class='op'>::</span><span class='const'>Bar3DChart</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id chart'>chart</span><span class='op'>|</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id title'>title</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Post Votes</span><span class='tstring_end'>'</span></span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id start_at'>start_at</span> <span class='int'>0</span><span class='comma'>,</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id size'>size</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id end_at'>end_at</span> <span class='int'>4</span><span class='comma'>,</span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id size'>size</span><span class='op'>+</span><span class='int'>20</span> + <span class='id chart'>chart</span><span class='period'>.</span><span class='id add_series'>add_series</span> <span class='symbol'>:data</span> <span class='op'>=></span> <span class='id ws'>ws</span><span class='period'>.</span><span class='id cols'>cols</span><span class='lbracket'>[</span><span class='int'>4</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='symbol'>:labels</span><span class='op'>=></span><span class='id ws'>ws</span><span class='period'>.</span><span class='id cols'>cols</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rparen'>)</span><span class='rbracket'>]</span> + <span class='kw'>end</span> + + <span class='id p'>p</span><span class='period'>.</span><span class='id serialize'>serialize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>posts.xlsx</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> + <span class='id send_file'>send_file</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>posts.xlsx</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='symbol'>:type</span><span class='op'>=></span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>application/xlsx</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='symbol'>:x_sendfile</span><span class='op'>=></span><span class='kw'>true</span> + <span class='kw'>end</span> + <span class='kw'>end</span> </pre> <h3>Documentation</h3> <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> -<pre class="code"> <span class='gem identifier id'>gem</span> <span class='install identifier id'>install</span> <span class='yard identifier id'>yard</span> - <span class='yard identifier id'>yard</span> <span class='server identifier id'>server</span> <span class='minus op'>-</span><span class='g identifier id'>g</span> +<pre class="code"> <span class='id gem'>gem</span> <span class='id install'>install</span> <span class='id yard'>yard</span> + <span class='id yard'>yard</span> <span class='id server'>server</span> <span class='op'>-</span><span class='id g'>g</span> </pre> <h3>Specs</h3> @@ -325,6 +325,7 @@ With Axlsx you can create worksheets with charts, images, automated column width <li>Added acts_as_xlsx mixin for rails3 See Examples</li> <li>Added row.style assignation for updating the cell style for an entire row</li> <li>Added col_style method to worksheet upate a the style for a column of cells</li> +<li>Added cols for an easy reference to columns in a worksheet.</li> </ul> </li> <li><p><strong>October.26.11</strong>: 1.0.9 release</p> @@ -346,9 +347,9 @@ licensed under the MIT license. Please see the <a href="file.LICENSE.html" title </div></div> <div id="footer"> - Generated on Sun Nov 27 21:52:30 2011 by + Generated on Sun Nov 27 22:08:36 2011 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.7.3 (ruby-1.8.7). + 0.7.3 (ruby-1.9.3). </div> </body> diff --git a/doc/method_list.html b/doc/method_list.html index e14c2373..0f2f9b8e 100644 --- a/doc/method_list.html +++ b/doc/method_list.html @@ -313,17 +313,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#add_image-instance_method" title="Axlsx::Worksheet#add_image (method)">#add_image</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#add_image-instance_method" title="Axlsx::Drawing#add_image (method)">#add_image</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Drawing</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Drawing.html#add_image-instance_method" title="Axlsx::Drawing#add_image (method)">#add_image</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#add_image-instance_method" title="Axlsx::Worksheet#add_image (method)">#add_image</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Worksheet</small> </li> @@ -441,17 +441,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Color.html#auto-instance_method" title="Axlsx::Color#auto (method)">#auto</a></span> + <span class='object_link'><a href="Axlsx/CatAxis.html#auto-instance_method" title="Axlsx::CatAxis#auto (method)">#auto</a></span> - <small>Axlsx::Color</small> + <small>Axlsx::CatAxis</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CatAxis.html#auto-instance_method" title="Axlsx::CatAxis#auto (method)">#auto</a></span> + <span class='object_link'><a href="Axlsx/Color.html#auto-instance_method" title="Axlsx::Color#auto (method)">#auto</a></span> - <small>Axlsx::CatAxis</small> + <small>Axlsx::Color</small> </li> @@ -465,14 +465,6 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#auto_width-instance_method" title="Axlsx::Worksheet#auto_width (method)">#auto_width</a></span> - - <small>Axlsx::Worksheet</small> - - </li> - - - <li class="r1 "> <span class='object_link'><a href="Axlsx/Axis.html#axId-instance_method" title="Axlsx::Axis#axId (method)">#axId</a></span> <small>Axlsx::Axis</small> @@ -480,7 +472,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Axis.html#axPos-instance_method" title="Axlsx::Axis#axPos (method)">#axPos</a></span> <small>Axlsx::Axis</small> @@ -488,7 +480,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#b-instance_method" title="Axlsx::Font#b (method)">#b</a></span> <small>Axlsx::Font</small> @@ -496,7 +488,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Bar3DChart.html#barDir-instance_method" title="Axlsx::Bar3DChart#barDir (method)">#barDir</a></span> <small>Axlsx::Bar3DChart</small> @@ -504,7 +496,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/PatternFill.html#bgColor-instance_method" title="Axlsx::PatternFill#bgColor (method)">#bgColor</a></span> <small>Axlsx::PatternFill</small> @@ -512,7 +504,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Xf.html#borderId-instance_method" title="Axlsx::Xf#borderId (method)">#borderId</a></span> <small>Axlsx::Xf</small> @@ -520,7 +512,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Styles.html#borders-instance_method" title="Axlsx::Styles#borders (method)">#borders</a></span> <small>Axlsx::Styles</small> @@ -528,7 +520,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/GradientFill.html#bottom-instance_method" title="Axlsx::GradientFill#bottom (method)">#bottom</a></span> <small>Axlsx::GradientFill</small> @@ -536,7 +528,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/CellStyle.html#builtinId-instance_method" title="Axlsx::CellStyle#builtinId (method)">#builtinId</a></span> <small>Axlsx::CellStyle</small> @@ -544,26 +536,18 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Cell.html#cast_value-instance_method" title="Axlsx::Cell#cast_value (method)">#cast_value</a></span> - - <small>Axlsx::Cell</small> - - </li> - - <li class="r1 "> - <span class='object_link'><a href="Axlsx/Bar3DChart.html#catAxis-instance_method" title="Axlsx::Bar3DChart#catAxis (method)">#catAxis</a></span> + <span class='object_link'><a href="Axlsx/Line3DChart.html#catAxis-instance_method" title="Axlsx::Line3DChart#catAxis (method)">#catAxis</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::Line3DChart</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Line3DChart.html#catAxis-instance_method" title="Axlsx::Line3DChart#catAxis (method)">#catAxis</a></span> + <span class='object_link'><a href="Axlsx/Bar3DChart.html#catAxis-instance_method" title="Axlsx::Bar3DChart#catAxis (method)">#catAxis</a></span> - <small>Axlsx::Line3DChart</small> + <small>Axlsx::Bar3DChart</small> </li> @@ -609,25 +593,25 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Cell.html#cell_type_from_value-instance_method" title="Axlsx::Cell#cell_type_from_value (method)">#cell_type_from_value</a></span> + <span class='object_link'><a href="Axlsx/Row.html#cells-instance_method" title="Axlsx::Row#cells (method)">#cells</a></span> - <small>Axlsx::Cell</small> + <small>Axlsx::Row</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Row.html#cells-instance_method" title="Axlsx::Row#cells (method)">#cells</a></span> + <span class='object_link'><a href="Axlsx/Font.html#charset-instance_method" title="Axlsx::Font#charset (method)">#charset</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::Font</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Font.html#charset-instance_method" title="Axlsx::Font#charset (method)">#charset</a></span> + <span class='object_link'><a href="Axlsx/GraphicFrame.html#chart-instance_method" title="Axlsx::GraphicFrame#chart (method)">#chart</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::GraphicFrame</small> </li> @@ -641,14 +625,6 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/GraphicFrame.html#chart-instance_method" title="Axlsx::GraphicFrame#chart (method)">#chart</a></span> - - <small>Axlsx::GraphicFrame</small> - - </li> - - - <li class="r1 "> <span class='object_link'><a href="Axlsx/Drawing.html#charts-instance_method" title="Axlsx::Drawing#charts (method)">#charts</a></span> <small>Axlsx::Drawing</small> @@ -656,7 +632,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Workbook.html#charts-instance_method" title="Axlsx::Workbook#charts (method)">#charts</a></span> <small>Axlsx::Workbook</small> @@ -664,7 +640,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Marker.html#col-instance_method" title="Axlsx::Marker#col (method)">#col</a></span> <small>Axlsx::Marker</small> @@ -672,7 +648,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Marker.html#colOff-instance_method" title="Axlsx::Marker#colOff (method)">#colOff</a></span> <small>Axlsx::Marker</small> @@ -680,14 +656,6 @@ </li> - <li class="r1 "> - <span class='object_link'><a href="Axlsx/Cell.html#col_ref-instance_method" title="Axlsx::Cell#col_ref (method)">#col_ref</a></span> - - <small>Axlsx::Cell</small> - - </li> - - <li class="r2 "> <span class='object_link'><a href="Axlsx/Worksheet.html#col_style-instance_method" title="Axlsx::Worksheet#col_style (method)">#col_style</a></span> @@ -705,17 +673,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/GradientStop.html#color-instance_method" title="Axlsx::GradientStop#color (method)">#color</a></span> + <span class='object_link'><a href="Axlsx/Font.html#color-instance_method" title="Axlsx::Font#color (method)">#color</a></span> - <small>Axlsx::GradientStop</small> + <small>Axlsx::Font</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Font.html#color-instance_method" title="Axlsx::Font#color (method)">#color</a></span> + <span class='object_link'><a href="Axlsx/GradientStop.html#color-instance_method" title="Axlsx::GradientStop#color (method)">#color</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::GradientStop</small> </li> @@ -785,17 +753,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/PieSeries.html#data-instance_method" title="Axlsx::PieSeries#data (method)">#data</a></span> + <span class='object_link'><a href="Axlsx/BarSeries.html#data-instance_method" title="Axlsx::BarSeries#data (method)">#data</a></span> - <small>Axlsx::PieSeries</small> + <small>Axlsx::BarSeries</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/BarSeries.html#data-instance_method" title="Axlsx::BarSeries#data (method)">#data</a></span> + <span class='object_link'><a href="Axlsx/PieSeries.html#data-instance_method" title="Axlsx::PieSeries#data (method)">#data</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::PieSeries</small> </li> @@ -825,7 +793,7 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Workbook.html#date1904%3D-class_method" title="Axlsx::Workbook.date1904= (method)">date1904=</a></span> + <span class='object_link'><a href="Axlsx/Workbook.html#date1904%3D-instance_method" title="Axlsx::Workbook#date1904= (method)">#date1904=</a></span> <small>Axlsx::Workbook</small> @@ -833,7 +801,7 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Workbook.html#date1904%3D-instance_method" title="Axlsx::Workbook#date1904= (method)">#date1904=</a></span> + <span class='object_link'><a href="Axlsx/Workbook.html#date1904%3D-class_method" title="Axlsx::Workbook.date1904= (method)">date1904=</a></span> <small>Axlsx::Workbook</small> @@ -897,25 +865,25 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#drawing-instance_method" title="Axlsx::Worksheet#drawing (method)">#drawing</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#drawing-instance_method" title="Axlsx::TwoCellAnchor#drawing (method)">#drawing</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#drawing-instance_method" title="Axlsx::OneCellAnchor#drawing (method)">#drawing</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#drawing-instance_method" title="Axlsx::Worksheet#drawing (method)">#drawing</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Worksheet</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#drawing-instance_method" title="Axlsx::TwoCellAnchor#drawing (method)">#drawing</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#drawing-instance_method" title="Axlsx::OneCellAnchor#drawing (method)">#drawing</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::OneCellAnchor</small> </li> @@ -1057,17 +1025,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#from-instance_method" title="Axlsx::OneCellAnchor#from (method)">#from</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#from-instance_method" title="Axlsx::Chart#from (method)">#from</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Chart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Chart.html#from-instance_method" title="Axlsx::Chart#from (method)">#from</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#from-instance_method" title="Axlsx::OneCellAnchor#from (method)">#from</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::OneCellAnchor</small> </li> @@ -1113,17 +1081,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Bar3DChart.html#grouping-instance_method" title="Axlsx::Bar3DChart#grouping (method)">#grouping</a></span> + <span class='object_link'><a href="Axlsx/Line3DChart.html#grouping-instance_method" title="Axlsx::Line3DChart#grouping (method)">#grouping</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::Line3DChart</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Line3DChart.html#grouping-instance_method" title="Axlsx::Line3DChart#grouping (method)">#grouping</a></span> + <span class='object_link'><a href="Axlsx/Bar3DChart.html#grouping-instance_method" title="Axlsx::Bar3DChart#grouping (method)">#grouping</a></span> - <small>Axlsx::Line3DChart</small> + <small>Axlsx::Bar3DChart</small> </li> @@ -1161,17 +1129,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/CellStyle.html#hidden-instance_method" title="Axlsx::CellStyle#hidden (method)">#hidden</a></span> + <span class='object_link'><a href="Axlsx/CellProtection.html#hidden-instance_method" title="Axlsx::CellProtection#hidden (method)">#hidden</a></span> - <small>Axlsx::CellStyle</small> + <small>Axlsx::CellProtection</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellProtection.html#hidden-instance_method" title="Axlsx::CellProtection#hidden (method)">#hidden</a></span> + <span class='object_link'><a href="Axlsx/CellStyle.html#hidden-instance_method" title="Axlsx::CellStyle#hidden (method)">#hidden</a></span> - <small>Axlsx::CellProtection</small> + <small>Axlsx::CellStyle</small> </li> @@ -1209,17 +1177,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Drawing.html#images-instance_method" title="Axlsx::Drawing#images (method)">#images</a></span> + <span class='object_link'><a href="Axlsx/Workbook.html#images-instance_method" title="Axlsx::Workbook#images (method)">#images</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Workbook</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Workbook.html#images-instance_method" title="Axlsx::Workbook#images (method)">#images</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#images-instance_method" title="Axlsx::Drawing#images (method)">#images</a></span> - <small>Axlsx::Workbook</small> + <small>Axlsx::Drawing</small> </li> @@ -1241,9 +1209,9 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Drawing.html#index-instance_method" title="Axlsx::Drawing#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/Pic.html#index-instance_method" title="Axlsx::Pic#index (method)">#index</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Pic</small> </li> @@ -1257,41 +1225,41 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Chart.html#index-instance_method" title="Axlsx::Chart#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#index-instance_method" title="Axlsx::TwoCellAnchor#index (method)">#index</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#index-instance_method" title="Axlsx::TwoCellAnchor#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#index-instance_method" title="Axlsx::OneCellAnchor#index (method)">#index</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::OneCellAnchor</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Series.html#index-instance_method" title="Axlsx::Series#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/Row.html#index-instance_method" title="Axlsx::Row#index (method)">#index</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::Row</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Row.html#index-instance_method" title="Axlsx::Row#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/Series.html#index-instance_method" title="Axlsx::Series#index (method)">#index</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::Series</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#index-instance_method" title="Axlsx::OneCellAnchor#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#index-instance_method" title="Axlsx::Chart#index (method)">#index</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Chart</small> </li> @@ -1305,9 +1273,9 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pic.html#index-instance_method" title="Axlsx::Pic#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#index-instance_method" title="Axlsx::Drawing#index (method)">#index</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::Drawing</small> </li> @@ -1321,401 +1289,401 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/GraphicFrame.html#initialize-instance_method" title="Axlsx::GraphicFrame#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/NumFmt.html#initialize-instance_method" title="Axlsx::NumFmt#initialize (method)">#initialize</a></span> - <small>Axlsx::GraphicFrame</small> + <small>Axlsx::NumFmt</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/GradientFill.html#initialize-instance_method" title="Axlsx::GradientFill#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Axis.html#initialize-instance_method" title="Axlsx::Axis#initialize (method)">#initialize</a></span> - <small>Axlsx::GradientFill</small> + <small>Axlsx::Axis</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pie3DChart.html#initialize-instance_method" title="Axlsx::Pie3DChart#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/TableStyle.html#initialize-instance_method" title="Axlsx::TableStyle#initialize (method)">#initialize</a></span> - <small>Axlsx::Pie3DChart</small> + <small>Axlsx::TableStyle</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CatAxis.html#initialize-instance_method" title="Axlsx::CatAxis#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Core.html#initialize-instance_method" title="Axlsx::Core#initialize (method)">#initialize</a></span> - <small>Axlsx::CatAxis</small> + <small>Axlsx::Core</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Core.html#initialize-instance_method" title="Axlsx::Core#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Pic.html#initialize-instance_method" title="Axlsx::Pic#initialize (method)">#initialize</a></span> - <small>Axlsx::Core</small> + <small>Axlsx::Pic</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TableStyleElement.html#initialize-instance_method" title="Axlsx::TableStyleElement#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Font.html#initialize-instance_method" title="Axlsx::Font#initialize (method)">#initialize</a></span> - <small>Axlsx::TableStyleElement</small> + <small>Axlsx::Font</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/TableStyle.html#initialize-instance_method" title="Axlsx::TableStyle#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/LineSeries.html#initialize-instance_method" title="Axlsx::LineSeries#initialize (method)">#initialize</a></span> - <small>Axlsx::TableStyle</small> + <small>Axlsx::LineSeries</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/ContentType.html#initialize-instance_method" title="Axlsx::ContentType#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Marker.html#initialize-instance_method" title="Axlsx::Marker#initialize (method)">#initialize</a></span> - <small>Axlsx::ContentType</small> + <small>Axlsx::Marker</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Xf.html#initialize-instance_method" title="Axlsx::Xf#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/BorderPr.html#initialize-instance_method" title="Axlsx::BorderPr#initialize (method)">#initialize</a></span> - <small>Axlsx::Xf</small> + <small>Axlsx::BorderPr</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Axis.html#initialize-instance_method" title="Axlsx::Axis#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#initialize-instance_method" title="Axlsx::Drawing#initialize (method)">#initialize</a></span> - <small>Axlsx::Axis</small> + <small>Axlsx::Drawing</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Chart.html#initialize-instance_method" title="Axlsx::Chart#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/CellAlignment.html#initialize-instance_method" title="Axlsx::CellAlignment#initialize (method)">#initialize</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::CellAlignment</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TableStyles.html#initialize-instance_method" title="Axlsx::TableStyles#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/PatternFill.html#initialize-instance_method" title="Axlsx::PatternFill#initialize (method)">#initialize</a></span> - <small>Axlsx::TableStyles</small> + <small>Axlsx::PatternFill</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Row.html#initialize-instance_method" title="Axlsx::Row#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Relationships.html#initialize-instance_method" title="Axlsx::Relationships#initialize (method)">#initialize</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::Relationships</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/SerAxis.html#initialize-instance_method" title="Axlsx::SerAxis#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/View3D.html#initialize-instance_method" title="Axlsx::View3D#initialize (method)">#initialize</a></span> - <small>Axlsx::SerAxis</small> + <small>Axlsx::View3D</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Border.html#initialize-instance_method" title="Axlsx::Border#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/PieSeries.html#initialize-instance_method" title="Axlsx::PieSeries#initialize (method)">#initialize</a></span> - <small>Axlsx::Border</small> + <small>Axlsx::PieSeries</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Color.html#initialize-instance_method" title="Axlsx::Color#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/ContentType.html#initialize-instance_method" title="Axlsx::ContentType#initialize (method)">#initialize</a></span> - <small>Axlsx::Color</small> + <small>Axlsx::ContentType</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/CellStyle.html#initialize-instance_method" title="Axlsx::CellStyle#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Series.html#initialize-instance_method" title="Axlsx::Series#initialize (method)">#initialize</a></span> - <small>Axlsx::CellStyle</small> + <small>Axlsx::Series</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/PieSeries.html#initialize-instance_method" title="Axlsx::PieSeries#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/TableStyles.html#initialize-instance_method" title="Axlsx::TableStyles#initialize (method)">#initialize</a></span> - <small>Axlsx::PieSeries</small> + <small>Axlsx::TableStyles</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Relationship.html#initialize-instance_method" title="Axlsx::Relationship#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Color.html#initialize-instance_method" title="Axlsx::Color#initialize (method)">#initialize</a></span> - <small>Axlsx::Relationship</small> + <small>Axlsx::Color</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Bar3DChart.html#initialize-instance_method" title="Axlsx::Bar3DChart#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/BarSeries.html#initialize-instance_method" title="Axlsx::BarSeries#initialize (method)">#initialize</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::BarSeries</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pic.html#initialize-instance_method" title="Axlsx::Pic#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Cell.html#initialize-instance_method" title="Axlsx::Cell#initialize (method)">#initialize</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::Cell</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Title.html#initialize-instance_method" title="Axlsx::Title#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Xf.html#initialize-instance_method" title="Axlsx::Xf#initialize (method)">#initialize</a></span> - <small>Axlsx::Title</small> + <small>Axlsx::Xf</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Cell.html#initialize-instance_method" title="Axlsx::Cell#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Relationship.html#initialize-instance_method" title="Axlsx::Relationship#initialize (method)">#initialize</a></span> - <small>Axlsx::Cell</small> + <small>Axlsx::Relationship</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Drawing.html#initialize-instance_method" title="Axlsx::Drawing#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/CatAxis.html#initialize-instance_method" title="Axlsx::CatAxis#initialize (method)">#initialize</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::CatAxis</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Font.html#initialize-instance_method" title="Axlsx::Font#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Bar3DChart.html#initialize-instance_method" title="Axlsx::Bar3DChart#initialize (method)">#initialize</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::Bar3DChart</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Package.html#initialize-instance_method" title="Axlsx::Package#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Row.html#initialize-instance_method" title="Axlsx::Row#initialize (method)">#initialize</a></span> - <small>Axlsx::Package</small> + <small>Axlsx::Row</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/BorderPr.html#initialize-instance_method" title="Axlsx::BorderPr#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Border.html#initialize-instance_method" title="Axlsx::Border#initialize (method)">#initialize</a></span> - <small>Axlsx::BorderPr</small> + <small>Axlsx::Border</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Marker.html#initialize-instance_method" title="Axlsx::Marker#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/SerAxis.html#initialize-instance_method" title="Axlsx::SerAxis#initialize (method)">#initialize</a></span> - <small>Axlsx::Marker</small> + <small>Axlsx::SerAxis</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Fill.html#initialize-instance_method" title="Axlsx::Fill#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Default.html#initialize-instance_method" title="Axlsx::Default#initialize (method)">#initialize</a></span> - <small>Axlsx::Fill</small> + <small>Axlsx::Default</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellProtection.html#initialize-instance_method" title="Axlsx::CellProtection#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/GradientStop.html#initialize-instance_method" title="Axlsx::GradientStop#initialize (method)">#initialize</a></span> - <small>Axlsx::CellProtection</small> + <small>Axlsx::GradientStop</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Styles.html#initialize-instance_method" title="Axlsx::Styles#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/ValAxis.html#initialize-instance_method" title="Axlsx::ValAxis#initialize (method)">#initialize</a></span> - <small>Axlsx::Styles</small> + <small>Axlsx::ValAxis</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Series.html#initialize-instance_method" title="Axlsx::Series#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/GradientFill.html#initialize-instance_method" title="Axlsx::GradientFill#initialize (method)">#initialize</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::GradientFill</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Line3DChart.html#initialize-instance_method" title="Axlsx::Line3DChart#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#initialize-instance_method" title="Axlsx::Worksheet#initialize (method)">#initialize</a></span> - <small>Axlsx::Line3DChart</small> + <small>Axlsx::Worksheet</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Scaling.html#initialize-instance_method" title="Axlsx::Scaling#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#initialize-instance_method" title="Axlsx::Chart#initialize (method)">#initialize</a></span> - <small>Axlsx::Scaling</small> + <small>Axlsx::Chart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/CellAlignment.html#initialize-instance_method" title="Axlsx::CellAlignment#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/GraphicFrame.html#initialize-instance_method" title="Axlsx::GraphicFrame#initialize (method)">#initialize</a></span> - <small>Axlsx::CellAlignment</small> + <small>Axlsx::GraphicFrame</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Default.html#initialize-instance_method" title="Axlsx::Default#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/CellStyle.html#initialize-instance_method" title="Axlsx::CellStyle#initialize (method)">#initialize</a></span> - <small>Axlsx::Default</small> + <small>Axlsx::CellStyle</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#initialize-instance_method" title="Axlsx::OneCellAnchor#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Styles.html#initialize-instance_method" title="Axlsx::Styles#initialize (method)">#initialize</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Styles</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/BarSeries.html#initialize-instance_method" title="Axlsx::BarSeries#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Workbook.html#initialize-instance_method" title="Axlsx::Workbook#initialize (method)">#initialize</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::Workbook</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Workbook.html#initialize-instance_method" title="Axlsx::Workbook#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#initialize-instance_method" title="Axlsx::OneCellAnchor#initialize (method)">#initialize</a></span> - <small>Axlsx::Workbook</small> + <small>Axlsx::OneCellAnchor</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#initialize-instance_method" title="Axlsx::TwoCellAnchor#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Override.html#initialize-instance_method" title="Axlsx::Override#initialize (method)">#initialize</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::Override</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/GradientStop.html#initialize-instance_method" title="Axlsx::GradientStop#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/CatAxisData.html#initialize-instance_method" title="Axlsx::CatAxisData#initialize (method)">#initialize</a></span> - <small>Axlsx::GradientStop</small> + <small>Axlsx::CatAxisData</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/LineSeries.html#initialize-instance_method" title="Axlsx::LineSeries#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Scaling.html#initialize-instance_method" title="Axlsx::Scaling#initialize (method)">#initialize</a></span> - <small>Axlsx::LineSeries</small> + <small>Axlsx::Scaling</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/NumFmt.html#initialize-instance_method" title="Axlsx::NumFmt#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Package.html#initialize-instance_method" title="Axlsx::Package#initialize (method)">#initialize</a></span> - <small>Axlsx::NumFmt</small> + <small>Axlsx::Package</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/PatternFill.html#initialize-instance_method" title="Axlsx::PatternFill#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/CellProtection.html#initialize-instance_method" title="Axlsx::CellProtection#initialize (method)">#initialize</a></span> - <small>Axlsx::PatternFill</small> + <small>Axlsx::CellProtection</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#initialize-instance_method" title="Axlsx::Worksheet#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/TableStyleElement.html#initialize-instance_method" title="Axlsx::TableStyleElement#initialize (method)">#initialize</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::TableStyleElement</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Relationships.html#initialize-instance_method" title="Axlsx::Relationships#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Line3DChart.html#initialize-instance_method" title="Axlsx::Line3DChart#initialize (method)">#initialize</a></span> - <small>Axlsx::Relationships</small> + <small>Axlsx::Line3DChart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/ValAxis.html#initialize-instance_method" title="Axlsx::ValAxis#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#initialize-instance_method" title="Axlsx::TwoCellAnchor#initialize (method)">#initialize</a></span> - <small>Axlsx::ValAxis</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Override.html#initialize-instance_method" title="Axlsx::Override#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Title.html#initialize-instance_method" title="Axlsx::Title#initialize (method)">#initialize</a></span> - <small>Axlsx::Override</small> + <small>Axlsx::Title</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/View3D.html#initialize-instance_method" title="Axlsx::View3D#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Fill.html#initialize-instance_method" title="Axlsx::Fill#initialize (method)">#initialize</a></span> - <small>Axlsx::View3D</small> + <small>Axlsx::Fill</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CatAxisData.html#initialize-instance_method" title="Axlsx::CatAxisData#initialize (method)">#initialize</a></span> + <span class='object_link'><a href="Axlsx/Pie3DChart.html#initialize-instance_method" title="Axlsx::Pie3DChart#initialize (method)">#initialize</a></span> - <small>Axlsx::CatAxisData</small> + <small>Axlsx::Pie3DChart</small> </li> @@ -1729,17 +1697,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/BarSeries.html#labels-instance_method" title="Axlsx::BarSeries#labels (method)">#labels</a></span> + <span class='object_link'><a href="Axlsx/LineSeries.html#labels-instance_method" title="Axlsx::LineSeries#labels (method)">#labels</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::LineSeries</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/LineSeries.html#labels-instance_method" title="Axlsx::LineSeries#labels (method)">#labels</a></span> + <span class='object_link'><a href="Axlsx/BarSeries.html#labels-instance_method" title="Axlsx::BarSeries#labels (method)">#labels</a></span> - <small>Axlsx::LineSeries</small> + <small>Axlsx::BarSeries</small> </li> @@ -1809,9 +1777,9 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/TableStyle.html#name-instance_method" title="Axlsx::TableStyle#name (method)">#name</a></span> + <span class='object_link'><a href="Axlsx/BorderPr.html#name-instance_method" title="Axlsx::BorderPr#name (method)">#name</a></span> - <small>Axlsx::TableStyle</small> + <small>Axlsx::BorderPr</small> </li> @@ -1841,9 +1809,9 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/BorderPr.html#name-instance_method" title="Axlsx::BorderPr#name (method)">#name</a></span> + <span class='object_link'><a href="Axlsx/TableStyle.html#name-instance_method" title="Axlsx::TableStyle#name (method)">#name</a></span> - <small>Axlsx::BorderPr</small> + <small>Axlsx::TableStyle</small> </li> @@ -1857,17 +1825,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/NumFmt.html#numFmtId-instance_method" title="Axlsx::NumFmt#numFmtId (method)">#numFmtId</a></span> + <span class='object_link'><a href="Axlsx/Xf.html#numFmtId-instance_method" title="Axlsx::Xf#numFmtId (method)">#numFmtId</a></span> - <small>Axlsx::NumFmt</small> + <small>Axlsx::Xf</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Xf.html#numFmtId-instance_method" title="Axlsx::Xf#numFmtId (method)">#numFmtId</a></span> + <span class='object_link'><a href="Axlsx/NumFmt.html#numFmtId-instance_method" title="Axlsx::NumFmt#numFmtId (method)">#numFmtId</a></span> - <small>Axlsx::Xf</small> + <small>Axlsx::NumFmt</small> </li> @@ -1921,17 +1889,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Border.html#outline-instance_method" title="Axlsx::Border#outline (method)">#outline</a></span> + <span class='object_link'><a href="Axlsx/Font.html#outline-instance_method" title="Axlsx::Font#outline (method)">#outline</a></span> - <small>Axlsx::Border</small> + <small>Axlsx::Font</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Font.html#outline-instance_method" title="Axlsx::Font#outline (method)">#outline</a></span> + <span class='object_link'><a href="Axlsx/Border.html#outline-instance_method" title="Axlsx::Border#outline (method)">#outline</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::Border</small> </li> @@ -1969,33 +1937,33 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Drawing.html#pn-instance_method" title="Axlsx::Drawing#pn (method)">#pn</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#pn-instance_method" title="Axlsx::Chart#pn (method)">#pn</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Chart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pic.html#pn-instance_method" title="Axlsx::Pic#pn (method)">#pn</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#pn-instance_method" title="Axlsx::Drawing#pn (method)">#pn</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::Drawing</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Chart.html#pn-instance_method" title="Axlsx::Chart#pn (method)">#pn</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#pn-instance_method" title="Axlsx::Worksheet#pn (method)">#pn</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::Worksheet</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#pn-instance_method" title="Axlsx::Worksheet#pn (method)">#pn</a></span> + <span class='object_link'><a href="Axlsx/Pic.html#pn-instance_method" title="Axlsx::Pic#pn (method)">#pn</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Pic</small> </li> @@ -2049,17 +2017,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#rId-instance_method" title="Axlsx::Worksheet#rId (method)">#rId</a></span> + <span class='object_link'><a href="Axlsx/GraphicFrame.html#rId-instance_method" title="Axlsx::GraphicFrame#rId (method)">#rId</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::GraphicFrame</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/GraphicFrame.html#rId-instance_method" title="Axlsx::GraphicFrame#rId (method)">#rId</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#rId-instance_method" title="Axlsx::Worksheet#rId (method)">#rId</a></span> - <small>Axlsx::GraphicFrame</small> + <small>Axlsx::Worksheet</small> </li> @@ -2089,9 +2057,9 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#relationships-instance_method" title="Axlsx::Worksheet#relationships (method)">#relationships</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#relationships-instance_method" title="Axlsx::Drawing#relationships (method)">#relationships</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Drawing</small> </li> @@ -2105,9 +2073,9 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Drawing.html#relationships-instance_method" title="Axlsx::Drawing#relationships (method)">#relationships</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#relationships-instance_method" title="Axlsx::Worksheet#relationships (method)">#relationships</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Worksheet</small> </li> @@ -2121,17 +2089,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#rels_pn-instance_method" title="Axlsx::Worksheet#rels_pn (method)">#rels_pn</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#rels_pn-instance_method" title="Axlsx::Drawing#rels_pn (method)">#rels_pn</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Drawing</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Drawing.html#rels_pn-instance_method" title="Axlsx::Drawing#rels_pn (method)">#rels_pn</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#rels_pn-instance_method" title="Axlsx::Worksheet#rels_pn (method)">#rels_pn</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Worksheet</small> </li> @@ -2265,17 +2233,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Bar3DChart.html#shape-instance_method" title="Axlsx::Bar3DChart#shape (method)">#shape</a></span> + <span class='object_link'><a href="Axlsx/BarSeries.html#shape-instance_method" title="Axlsx::BarSeries#shape (method)">#shape</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::BarSeries</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/BarSeries.html#shape-instance_method" title="Axlsx::BarSeries#shape (method)">#shape</a></span> + <span class='object_link'><a href="Axlsx/Bar3DChart.html#shape-instance_method" title="Axlsx::Bar3DChart#shape (method)">#shape</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::Bar3DChart</small> </li> @@ -2449,17 +2417,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Chart.html#title-instance_method" title="Axlsx::Chart#title (method)">#title</a></span> + <span class='object_link'><a href="Axlsx/Series.html#title-instance_method" title="Axlsx::Series#title (method)">#title</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::Series</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Series.html#title-instance_method" title="Axlsx::Series#title (method)">#title</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#title-instance_method" title="Axlsx::Chart#title (method)">#title</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::Chart</small> </li> @@ -2497,73 +2465,73 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/SerAxis.html#to_xml-instance_method" title="Axlsx::SerAxis#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Relationship.html#to_xml-instance_method" title="Axlsx::Relationship#to_xml (method)">#to_xml</a></span> - <small>Axlsx::SerAxis</small> + <small>Axlsx::Relationship</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/NumFmt.html#to_xml-instance_method" title="Axlsx::NumFmt#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Marker.html#to_xml-instance_method" title="Axlsx::Marker#to_xml (method)">#to_xml</a></span> - <small>Axlsx::NumFmt</small> + <small>Axlsx::Marker</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/LineSeries.html#to_xml-instance_method" title="Axlsx::LineSeries#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/TableStyleElement.html#to_xml-instance_method" title="Axlsx::TableStyleElement#to_xml (method)">#to_xml</a></span> - <small>Axlsx::LineSeries</small> + <small>Axlsx::TableStyleElement</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/GradientFill.html#to_xml-instance_method" title="Axlsx::GradientFill#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Row.html#to_xml-instance_method" title="Axlsx::Row#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GradientFill</small> + <small>Axlsx::Row</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/PieSeries.html#to_xml-instance_method" title="Axlsx::PieSeries#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Core.html#to_xml-instance_method" title="Axlsx::Core#to_xml (method)">#to_xml</a></span> - <small>Axlsx::PieSeries</small> + <small>Axlsx::Core</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/GradientStop.html#to_xml-instance_method" title="Axlsx::GradientStop#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/PatternFill.html#to_xml-instance_method" title="Axlsx::PatternFill#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GradientStop</small> + <small>Axlsx::PatternFill</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Styles.html#to_xml-instance_method" title="Axlsx::Styles#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/GraphicFrame.html#to_xml-instance_method" title="Axlsx::GraphicFrame#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Styles</small> + <small>Axlsx::GraphicFrame</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#to_xml-instance_method" title="Axlsx::TwoCellAnchor#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#to_xml-instance_method" title="Axlsx::Drawing#to_xml (method)">#to_xml</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::Drawing</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Override.html#to_xml-instance_method" title="Axlsx::Override#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Fill.html#to_xml-instance_method" title="Axlsx::Fill#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Override</small> + <small>Axlsx::Fill</small> </li> @@ -2577,169 +2545,153 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Axis.html#to_xml-instance_method" title="Axlsx::Axis#to_xml (method)">#to_xml</a></span> - - <small>Axlsx::Axis</small> - - </li> - - - <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pic.html#to_xml-instance_method" title="Axlsx::Pic#to_xml (method)">#to_xml</a></span> - - <small>Axlsx::Pic</small> - - </li> - - - <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellAlignment.html#to_xml-instance_method" title="Axlsx::CellAlignment#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Line3DChart.html#to_xml-instance_method" title="Axlsx::Line3DChart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CellAlignment</small> + <small>Axlsx::Line3DChart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/View3D.html#to_xml-instance_method" title="Axlsx::View3D#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Workbook.html#to_xml-instance_method" title="Axlsx::Workbook#to_xml (method)">#to_xml</a></span> - <small>Axlsx::View3D</small> + <small>Axlsx::Workbook</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TableStyle.html#to_xml-instance_method" title="Axlsx::TableStyle#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Styles.html#to_xml-instance_method" title="Axlsx::Styles#to_xml (method)">#to_xml</a></span> - <small>Axlsx::TableStyle</small> + <small>Axlsx::Styles</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/BarSeries.html#to_xml-instance_method" title="Axlsx::BarSeries#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#to_xml-instance_method" title="Axlsx::Worksheet#to_xml (method)">#to_xml</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::Worksheet</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Chart.html#to_xml-instance_method" title="Axlsx::Chart#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Xf.html#to_xml-instance_method" title="Axlsx::Xf#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::Xf</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Series.html#to_xml-instance_method" title="Axlsx::Series#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/ValAxisData.html#to_xml-instance_method" title="Axlsx::ValAxisData#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::ValAxisData</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/PatternFill.html#to_xml-instance_method" title="Axlsx::PatternFill#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/CatAxisData.html#to_xml-instance_method" title="Axlsx::CatAxisData#to_xml (method)">#to_xml</a></span> - <small>Axlsx::PatternFill</small> + <small>Axlsx::CatAxisData</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/BorderPr.html#to_xml-instance_method" title="Axlsx::BorderPr#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Scaling.html#to_xml-instance_method" title="Axlsx::Scaling#to_xml (method)">#to_xml</a></span> - <small>Axlsx::BorderPr</small> + <small>Axlsx::Scaling</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#to_xml-instance_method" title="Axlsx::OneCellAnchor#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Cell.html#to_xml-instance_method" title="Axlsx::Cell#to_xml (method)">#to_xml</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Cell</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Bar3DChart.html#to_xml-instance_method" title="Axlsx::Bar3DChart#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Override.html#to_xml-instance_method" title="Axlsx::Override#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::Override</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Workbook.html#to_xml-instance_method" title="Axlsx::Workbook#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/ValAxis.html#to_xml-instance_method" title="Axlsx::ValAxis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Workbook</small> + <small>Axlsx::ValAxis</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/CellStyle.html#to_xml-instance_method" title="Axlsx::CellStyle#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/SerAxis.html#to_xml-instance_method" title="Axlsx::SerAxis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CellStyle</small> + <small>Axlsx::SerAxis</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Core.html#to_xml-instance_method" title="Axlsx::Core#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Border.html#to_xml-instance_method" title="Axlsx::Border#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Core</small> + <small>Axlsx::Border</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Marker.html#to_xml-instance_method" title="Axlsx::Marker#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/CatAxis.html#to_xml-instance_method" title="Axlsx::CatAxis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Marker</small> + <small>Axlsx::CatAxis</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#to_xml-instance_method" title="Axlsx::Worksheet#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/TableStyle.html#to_xml-instance_method" title="Axlsx::TableStyle#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::TableStyle</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Relationship.html#to_xml-instance_method" title="Axlsx::Relationship#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/App.html#to_xml-instance_method" title="Axlsx::App#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Relationship</small> + <small>Axlsx::App</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CatAxisData.html#to_xml-instance_method" title="Axlsx::CatAxisData#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#to_xml-instance_method" title="Axlsx::OneCellAnchor#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CatAxisData</small> + <small>Axlsx::OneCellAnchor</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Relationships.html#to_xml-instance_method" title="Axlsx::Relationships#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Title.html#to_xml-instance_method" title="Axlsx::Title#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Relationships</small> + <small>Axlsx::Title</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Cell.html#to_xml-instance_method" title="Axlsx::Cell#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/CellStyle.html#to_xml-instance_method" title="Axlsx::CellStyle#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Cell</small> + <small>Axlsx::CellStyle</small> </li> @@ -2753,49 +2705,49 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Drawing.html#to_xml-instance_method" title="Axlsx::Drawing#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/BarSeries.html#to_xml-instance_method" title="Axlsx::BarSeries#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::BarSeries</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pie3DChart.html#to_xml-instance_method" title="Axlsx::Pie3DChart#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/View3D.html#to_xml-instance_method" title="Axlsx::View3D#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Pie3DChart</small> + <small>Axlsx::View3D</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Font.html#to_xml-instance_method" title="Axlsx::Font#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#to_xml-instance_method" title="Axlsx::Chart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::Chart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Fill.html#to_xml-instance_method" title="Axlsx::Fill#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/PieSeries.html#to_xml-instance_method" title="Axlsx::PieSeries#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Fill</small> + <small>Axlsx::PieSeries</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Line3DChart.html#to_xml-instance_method" title="Axlsx::Line3DChart#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#to_xml-instance_method" title="Axlsx::TwoCellAnchor#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Line3DChart</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/ContentType.html#to_xml-instance_method" title="Axlsx::ContentType#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/SeriesTitle.html#to_xml-instance_method" title="Axlsx::SeriesTitle#to_xml (method)">#to_xml</a></span> - <small>Axlsx::ContentType</small> + <small>Axlsx::SeriesTitle</small> </li> @@ -2809,119 +2761,119 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/CatAxis.html#to_xml-instance_method" title="Axlsx::CatAxis#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Pic.html#to_xml-instance_method" title="Axlsx::Pic#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CatAxis</small> + <small>Axlsx::Pic</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TableStyleElement.html#to_xml-instance_method" title="Axlsx::TableStyleElement#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Default.html#to_xml-instance_method" title="Axlsx::Default#to_xml (method)">#to_xml</a></span> - <small>Axlsx::TableStyleElement</small> + <small>Axlsx::Default</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/GraphicFrame.html#to_xml-instance_method" title="Axlsx::GraphicFrame#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/NumFmt.html#to_xml-instance_method" title="Axlsx::NumFmt#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GraphicFrame</small> + <small>Axlsx::NumFmt</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Default.html#to_xml-instance_method" title="Axlsx::Default#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Font.html#to_xml-instance_method" title="Axlsx::Font#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Default</small> + <small>Axlsx::Font</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/App.html#to_xml-instance_method" title="Axlsx::App#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/ContentType.html#to_xml-instance_method" title="Axlsx::ContentType#to_xml (method)">#to_xml</a></span> - <small>Axlsx::App</small> + <small>Axlsx::ContentType</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Border.html#to_xml-instance_method" title="Axlsx::Border#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/LineSeries.html#to_xml-instance_method" title="Axlsx::LineSeries#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Border</small> + <small>Axlsx::LineSeries</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/SeriesTitle.html#to_xml-instance_method" title="Axlsx::SeriesTitle#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/GradientFill.html#to_xml-instance_method" title="Axlsx::GradientFill#to_xml (method)">#to_xml</a></span> - <small>Axlsx::SeriesTitle</small> + <small>Axlsx::GradientFill</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/ValAxis.html#to_xml-instance_method" title="Axlsx::ValAxis#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Bar3DChart.html#to_xml-instance_method" title="Axlsx::Bar3DChart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::ValAxis</small> + <small>Axlsx::Bar3DChart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Row.html#to_xml-instance_method" title="Axlsx::Row#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/CellAlignment.html#to_xml-instance_method" title="Axlsx::CellAlignment#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::CellAlignment</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Title.html#to_xml-instance_method" title="Axlsx::Title#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Axis.html#to_xml-instance_method" title="Axlsx::Axis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Title</small> + <small>Axlsx::Axis</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Scaling.html#to_xml-instance_method" title="Axlsx::Scaling#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/GradientStop.html#to_xml-instance_method" title="Axlsx::GradientStop#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Scaling</small> + <small>Axlsx::GradientStop</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/ValAxisData.html#to_xml-instance_method" title="Axlsx::ValAxisData#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/Pie3DChart.html#to_xml-instance_method" title="Axlsx::Pie3DChart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::ValAxisData</small> + <small>Axlsx::Pie3DChart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Xf.html#to_xml-instance_method" title="Axlsx::Xf#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/BorderPr.html#to_xml-instance_method" title="Axlsx::BorderPr#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Xf</small> + <small>Axlsx::BorderPr</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/GradientFill.html#top-instance_method" title="Axlsx::GradientFill#top (method)">#top</a></span> + <span class='object_link'><a href="Axlsx/Relationships.html#to_xml-instance_method" title="Axlsx::Relationships#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GradientFill</small> + <small>Axlsx::Relationships</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/GradientFill.html#type-instance_method" title="Axlsx::GradientFill#type (method)">#type</a></span> + <span class='object_link'><a href="Axlsx/GradientFill.html#top-instance_method" title="Axlsx::GradientFill#top (method)">#top</a></span> <small>Axlsx::GradientFill</small> @@ -2945,9 +2897,9 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#update_auto_fit_data-instance_method" title="Axlsx::Worksheet#update_auto_fit_data (method)">#update_auto_fit_data</a></span> + <span class='object_link'><a href="Axlsx/GradientFill.html#type-instance_method" title="Axlsx::GradientFill#type (method)">#type</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::GradientFill</small> </li> @@ -2969,33 +2921,33 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/RegexValidator.html#validate-class_method" title="Axlsx::RegexValidator.validate (method)">validate</a></span> + <span class='object_link'><a href="Axlsx/Package.html#validate-instance_method" title="Axlsx::Package#validate (method)">#validate</a></span> - <small>Axlsx::RegexValidator</small> + <small>Axlsx::Package</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/DataTypeValidator.html#validate-class_method" title="Axlsx::DataTypeValidator.validate (method)">validate</a></span> + <span class='object_link'><a href="Axlsx/RestrictionValidator.html#validate-class_method" title="Axlsx::RestrictionValidator.validate (method)">validate</a></span> - <small>Axlsx::DataTypeValidator</small> + <small>Axlsx::RestrictionValidator</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/RestrictionValidator.html#validate-class_method" title="Axlsx::RestrictionValidator.validate (method)">validate</a></span> + <span class='object_link'><a href="Axlsx/DataTypeValidator.html#validate-class_method" title="Axlsx::DataTypeValidator.validate (method)">validate</a></span> - <small>Axlsx::RestrictionValidator</small> + <small>Axlsx::DataTypeValidator</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Package.html#validate-instance_method" title="Axlsx::Package#validate (method)">#validate</a></span> + <span class='object_link'><a href="Axlsx/RegexValidator.html#validate-class_method" title="Axlsx::RegexValidator.validate (method)">validate</a></span> - <small>Axlsx::Package</small> + <small>Axlsx::RegexValidator</small> </li> @@ -3121,17 +3073,17 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Pic.html#width-instance_method" title="Axlsx::Pic#width (method)">#width</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#width-instance_method" title="Axlsx::OneCellAnchor#width (method)">#width</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::OneCellAnchor</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#width-instance_method" title="Axlsx::OneCellAnchor#width (method)">#width</a></span> + <span class='object_link'><a href="Axlsx/Pic.html#width-instance_method" title="Axlsx::Pic#width (method)">#width</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Pic</small> </li> diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index d18fb6e5..eff78eb4 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -94,9 +94,9 @@ </div> <div id="footer"> - Generated on Sun Nov 27 21:52:49 2011 by + Generated on Sun Nov 27 22:08:41 2011 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.7.3 (ruby-1.8.7). + 0.7.3 (ruby-1.9.3). </div> </body> diff --git a/lib/axlsx/ar.rb b/lib/axlsx/ar.rb index 83fc7041..f2e116c1 100644 --- a/lib/axlsx/ar.rb +++ b/lib/axlsx/ar.rb @@ -24,6 +24,7 @@ module Axlsx # Maps the AR class to an Axlsx package # options are passed into AR find + # @param [Symbol, :all, etc. # @option options [Integer] header_style to apply to the first row of field names # @option options [Array, Symbol] an array of Axlsx types for each cell in data rows or a single type that will be applied to all types. # @option options [Integer, Array] style The style to pass to Worksheet#add_row @@ -53,7 +54,7 @@ module Axlsx end # Empty module - I really like ruports way of allowing :include, :only, :exclude - # and am looking to add something like that in later + # and am looking to add something like that in the next release module InstanceMethods end @@ -62,7 +63,6 @@ module Axlsx end begin - require 'active_record' ActiveRecord::Base.send :include, Axlsx::Ar rescue Exception=>e -- cgit v1.2.3