From 407b884ef349d6dec12f50006ea6268c96205a83 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 21:34:48 +0900 Subject: adding yields for package workbook, workbook styles and cols collection on worksheet to make charting easier. --- .yardoc/checksums | 104 +-- .yardoc/objects/root.dat | Bin 433940 -> 453858 bytes .yardoc/proxy_types | Bin 38 -> 49 bytes Gemfile.lock | 20 +- README.md | 10 +- axlsx.gemspec | 8 +- doc/Axlsx.html | 905 ++++++++++---------------- doc/Axlsx/App.html | 591 +++++++---------- doc/Axlsx/Ar.html | 4 +- doc/Axlsx/Ar/ClassMethods.html | 23 +- doc/Axlsx/Ar/InstanceMethods.html | 4 +- doc/Axlsx/Ar/SingletonMethods.html | 47 +- 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 | 317 +++++---- 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 | 229 ++++--- 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 | 605 ++++++++--------- doc/Axlsx/Worksheet.html | 970 ++++++++++----------------- doc/Axlsx/Xf.html | 322 ++++----- doc/_index.html | 4 +- doc/file.LICENSE.html | 51 +- doc/file.README.html | 273 ++++---- doc/index.html | 273 ++++---- doc/method_list.html | 1010 ++++++++++++++--------------- doc/top-level-namespace.html | 4 +- lib/axlsx/package.rb | 2 + lib/axlsx/util/simple_typed_list.rb | 5 + lib/axlsx/version.rb | 2 +- lib/axlsx/workbook/workbook.rb | 6 +- lib/axlsx/workbook/worksheet/row.rb | 5 + lib/axlsx/workbook/worksheet/worksheet.rb | 28 +- test/workbook/worksheet/tc_worksheet.rb | 13 +- 80 files changed, 6135 insertions(+), 8525 deletions(-) diff --git a/.yardoc/checksums b/.yardoc/checksums index f6e6e6dd..75f6c9c1 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.rb 13120de6532e630275e55e14c36079384fd213ea +lib/axlsx/ar.rb 3a72e7869a068f1f132674dfe746d5b9f7dac135 +lib/axlsx/package.rb 78577b6f7643ca94d34da5539d80f58b3adcabe5 +lib/axlsx/version.rb 96e3c923077c58fafda56607ef9439e203721c2b +lib/axlsx/drawing/pic.rb d91e014f8e2604480437a434f714ad25d31acbff +lib/axlsx/drawing/axis.rb 8eaf645e24c1fef43a475ceb28caf5116af25736 +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/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/package.rb e69e0ec5e24210423e7424af62e08f62cbeb0ba9 -lib/axlsx/stylesheet/cell_alignment.rb 71118e51e1d11ab570fc89b8fbbd639b8023a39c -lib/axlsx/content_type/default.rb 1c1a700e266964877599e8fdd28adb6771576030 -lib/axlsx/drawing/title.rb 497e6ddeb153bb230f5bf9dc76e799b91ae2a8ed -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 3a72e7869a068f1f132674dfe746d5b9f7dac135 -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 ff0769adf9d4ea2b957eccf5f267a9f297cc3682 -lib/axlsx/util/simple_typed_list.rb b95f7e8d8958361cb1946b8545126b9384ff9fd2 -lib/axlsx/workbook/workbook.rb 96b55e7154132baf7dac707af3eea09583ef4d95 -lib/axlsx/drawing/view_3D.rb 8a83aed740c05d28aaa0e3430c7c4d2bbc44cc61 +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/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/drawing/scaling.rb 75a7a015a715bdd25f615ecdbe084d841fdc6ad0 lib/axlsx/util/validators.rb c70f27b943d3711fbe1244a8311789a6fad7e31e -lib/axlsx/doc_props/app.rb c64077808d7cb6aa30472e15c600009a01f3f338 -lib/axlsx/workbook/worksheet/worksheet.rb cd0f6e34d8d3cf10c56af0a3c3d2de48b304126e -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 4fb6c38b6bc649f6675c04d9ecb02bcb719f28e2 -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 489dca78a3e8f2f1d9ba360c6298117ca0447bd8 +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 f81ee655..2e8df75a 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/Gemfile.lock b/Gemfile.lock index 493e4e43..9f828391 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,18 @@ +PATH + remote: . + specs: + axlsx (1.0.10) + activesupport (>= 2.3.9) + nokogiri (>= 1.4.1) + rmagick (>= 2.12.2) + zip (~> 2.0.2) + GEM remote: http://rubygems.org/ specs: - active_support (3.0.0) - activesupport (= 3.0.0) - activesupport (3.0.0) + activesupport (3.1.3) + multi_json (~> 1.0) + multi_json (1.0.3) nokogiri (1.5.0) rmagick (2.13.1) zip (2.0.2) @@ -12,7 +21,4 @@ PLATFORMS ruby DEPENDENCIES - active_support (>= 3) - nokogiri (>= 1.4) - rmagick (>= 2) - zip (>= 2) + axlsx! diff --git a/README.md b/README.md index 174df39e..8fc42120 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Axlsx: Office Open XML Spreadsheet Generation **Author**: Randy Morgan **Copyright**: 2011 **License**: MIT License -**Latest Version**: 1.0.10 +**Latest Version**: 1.0.10.a **Ruby Version**: 1.8.7 - 1.9.3 **Release Date**: November 26th 2011 @@ -194,6 +194,10 @@ Styling Rows Rails 3 + + #ImageMagick port needs to be confirgured --disable-openmp when using with rails3 + # http://stackoverflow.com/questions/2838307/why-is-this-rmagick-call-generating-a-segmentation-fault + # 1. Add the gem to your Gemfile and bundle install gem 'axlsx' @@ -230,8 +234,8 @@ This gem has 100% test coverage using test/unit. To execute tests for this gem, Changelog --------- -- **October.27.11**: 1.0.10 release - - Updating gemspec to be compatible with rails3 requirements +- **October.27.11**: 1.0.10.a release + - Updating gemspec to loosen up some of the gem requirements in the hope of maintaining compatibility with rails 2 - 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 diff --git a/axlsx.gemspec b/axlsx.gemspec index 041e5fca..92631f94 100644 --- a/axlsx.gemspec +++ b/axlsx.gemspec @@ -17,20 +17,16 @@ Gem::Specification.new do |s| s.files = FileList.new('*', 'lib/**/*', 'doc/**/*', 'test/**/*', 'schema/**/*', 'examples/**/*') do |fl| fl.exclude("*.*~") - fl.exclude(".DS_Store") - fl.exclude(".gitignore") - fl.exclude(".yardops") - fl.exclude(".yardops_guide") - fl.exclude(".git") fl.exclude(".*") fl.exclude("todo") fl.exclude("*.gem") fl.exclude("*.xlsx") end + s.add_runtime_dependency 'nokogiri', '>= 1.4.1' s.add_runtime_dependency 'activesupport', '>= 2.3.9' s.add_runtime_dependency 'rmagick', '>= 2.12.2' - s.add_runtime_dependency 'zip', '~> 2.0.2' + s.add_runtime_dependency 'zip', '>= 2.0.2' s.required_ruby_version = '>= 1.8.7' s.require_path = 'lib' end diff --git a/doc/Axlsx.html b/doc/Axlsx.html index bb177b0b..450ce489 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.10"
-
+
"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 6d7158b6..26de5840 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 cf57963c..e7b26c59 100644 --- a/doc/Axlsx/Ar.html +++ b/doc/Axlsx/Ar.html @@ -97,9 +97,9 @@
diff --git a/doc/Axlsx/Ar/ClassMethods.html b/doc/Axlsx/Ar/ClassMethods.html index 5d3fff33..7dc8e5ce 100644 --- a/doc/Axlsx/Ar/ClassMethods.html +++ b/doc/Axlsx/Ar/ClassMethods.html @@ -106,9 +106,8 @@ -

-we should do what ruport did and use only, exclude and methods hashes. -

+
+

we should do what ruport did and use only, exclude and methods hashes.

@@ -132,9 +131,8 @@ we should do what ruport did and use only, exclude and methods hashes.

-

-we should do what ruport did and use only, exclude and methods hashes -

+ +

we should do what ruport did and use only, exclude and methods hashes

@@ -156,11 +154,10 @@ we should do what ruport did and use only, exclude and methods hashes
# File 'lib/axlsx/ar.rb', line 14
 
-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 @@ -171,9 +168,9 @@ we should do what ruport did and use only, exclude and methods hashes
diff --git a/doc/Axlsx/Ar/InstanceMethods.html b/doc/Axlsx/Ar/InstanceMethods.html index 7734dde4..d993180c 100644 --- a/doc/Axlsx/Ar/InstanceMethods.html +++ b/doc/Axlsx/Ar/InstanceMethods.html @@ -87,9 +87,9 @@
diff --git a/doc/Axlsx/Ar/SingletonMethods.html b/doc/Axlsx/Ar/SingletonMethods.html index 9781895c..e2994ddd 100644 --- a/doc/Axlsx/Ar/SingletonMethods.html +++ b/doc/Axlsx/Ar/SingletonMethods.html @@ -158,28 +158,27 @@
# File 'lib/axlsx/ar.rb', line 22
 
-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
-
+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 @@ -190,9 +189,9 @@
diff --git a/doc/Axlsx/Axis.html b/doc/Axlsx/Axis.html index 7e86aa9a..5d40c825 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 2fb7ad0b..5059cd15 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 44a77f03..71d42e30 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 18ebcd51..ea984d75 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 334f4680..ebda5715 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 1f15ae61..c4d964a0 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 12bed40c..47acaebe 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 f5e8ca97..d769e2b7 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 9f940a3f..b1b11ac7 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 7e1648f1..d0e27a71 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 2006b15b..9f357759 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 28333626..52ac2c91 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 5653b8ea..36a08186 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 93d99a54..52ccc159 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 9cbb01f3..4248da2c 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 9da38c77..ec1a74c4 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 850334c6..161d2b2b 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 48fc3412..bc6b61ad 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 3b3e1485..2fcf0aea 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 349c3650..6326b2c6 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 8c1c6653..89990a4d 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 baa08449..53491565 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 7db028a7..49993fab 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 ee3c0e92..5770eddb 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 a47310ed..559a3dfa 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 7153d97b..05bdfeeb 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 51a18033..6d519adf 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 2952035f..ea8827f8 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 60f12a51..211af1a7 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 7b0a39c1..85b9a005 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.

    @@ -220,7 +215,7 @@ Validate all parts of the package against xsd schema.
  • - - (Workbook) workbook + - (Workbook) workbook {|@workbook| ... } @@ -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

    @@ -592,8 +570,6 @@ serialized
     
     
    -59
    -60
     61
     62
     63
    @@ -609,30 +585,31 @@ serialized
     73
     74
     75
    -76
    +76 +77 +78 -
    # File 'lib/axlsx/package.rb', line 59
    -
    -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
    -
    +
    # 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
    @@ -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.

    @@ -720,21 +692,20 @@ An array of all validation errors found.
     
     
    -93
    -94
     95
     96
    -97
    +97 +98 +99 -
    # File 'lib/axlsx/package.rb', line 93
    -
    -def validate
    -  errors = []
    -  parts.each { |part| errors.concat validate_single_doc(part[:schema], part[:doc]) unless part[:schema].nil? }
    -  errors
    -end
    -
    +
    # 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
    @@ -743,7 +714,7 @@ An array of all validation errors found.

    - - (Workbook) workbook + - (Workbook) workbook {|@workbook| ... } @@ -752,31 +723,41 @@ 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.

    +

    Yields:

    +
      + +
    • + + + (@workbook) + + + +
    • + +

    Returns:

      @@ -788,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.

      @@ -808,9 +788,8 @@ instance is returned. -

      -ArgumentError if workbook parameter is not a Workbook instance. -

      +
      +

      ArgumentError if workbook parameter is not a Workbook instance.

      @@ -825,15 +804,18 @@ ArgumentError if workbook parameter is not a Workbook instance. 37 38 -39 +39 +40 +41
      # File 'lib/axlsx/package.rb', line 37
       
      -def workbook
      -  @workbook || @workbook = Workbook.new
      -end
      -
      +def workbook + @workbook || @workbook = Workbook.new + yield @workbook if block_given? + @workbook +end @@ -868,13 +850,12 @@ ArgumentError if workbook parameter is not a Workbook instance.
       
       
      -42
      +44 -
      # File 'lib/axlsx/package.rb', line 42
      +      
      # 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
      @@ -885,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 c3916fe2..45fa1eb9 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 27dd83cf..b521ab60 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 e7754542..81b8c2aa 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 37d077e8..42be3ffc 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 93b584b3..80addd38 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 1c2499b2..1c48cb2e 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 50312a07..f9d03c0d 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 8d865072..1e1821b3 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 ecd9a49a..cabe0e35 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,11 +276,31 @@ Creates a new row. -

      -sets the style for every cell in this row. -

      +
      +

      sets the style for every cell in this row.

      + + + +
    • + + + - (Object) to_ary + + + + + + + + + + + + +
      +
    • @@ -307,9 +320,8 @@ sets the style for every cell in this row. -

      -Serializes the row. -

      +
      +

      Serializes the row.

      @@ -330,19 +342,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.
      @@ -374,9 +384,8 @@ style and types options are applied as follows: — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -449,13 +458,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 @@ -478,9 +486,8 @@ a customizable set of options

      -

      -The cells this row holds -

      + +

      The cells this row holds

      @@ -514,10 +521,9 @@ The cells this row holds
      # File 'lib/axlsx/workbook/worksheet/row.rb', line 13
       
      -def cells
      -  @cells
      -end
      -
      +def cells + @cells +end @@ -535,9 +541,8 @@ The cells this row holds

      -

      -The worksheet this row belongs to -

      + +

      The worksheet this row belongs to

      @@ -571,10 +576,9 @@ The worksheet this row belongs to
      # File 'lib/axlsx/workbook/worksheet/row.rb', line 9
       
      -def worksheet
      -  @worksheet
      -end
      -
      +def worksheet + @worksheet +end @@ -596,10 +600,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.

      @@ -635,12 +638,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 @@ -655,9 +657,8 @@ worksheet’s autofit data.

      -

      -The index of this row in the worksheet -

      + +

      The index of this row in the worksheet

      @@ -691,10 +692,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 @@ -709,9 +709,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

      @@ -735,13 +734,40 @@ 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 + + + +
      + +
      +

      + + - (Object) to_ary + + + +

      + + +
      +
      +
      +
      +65
      +66
      +67
      +
      +
      # File 'lib/axlsx/workbook/worksheet/row.rb', line 65
      +
      +def to_ary
      +  @cells.to_ary
      +end
      @@ -756,9 +782,8 @@ sets the style for every cell in this row

      -

      -Serializes the row -

      + +

      Serializes the row

      @@ -777,9 +802,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.

      @@ -813,10 +837,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 @@ -827,9 +850,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 5878f1d4..cd33b36b 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 4d5cdef3..20a85a15 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 29aca381..99210c00 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 4cf2cdd9..89fdfc33 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 daac86c5..ced08baf 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 d4b8c80e..0bb35a91 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 48dc8694..5819b873 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 e80cc5eb..a8c27dda 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 4c3ebdbf..fd8ce088 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 45425383..77eacc3e 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 6e8f501c..ba94cab4 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 b8636123..b9f26043 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 6b78984f..3e87aeeb 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 ffb0522c..27c67ec0 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,36 +226,8 @@ A colllection of drawings associated with this workbook. -

      -A colllection of images associated with this workbook. -

      -
      - - - - -
    • - - - - (Styles) styles - - - - - - - readonly - - - - - - - - -

      -The styles associated with this workbook. -

      +
      +

      A colllection of images associated with this workbook.

    • @@ -286,9 +252,8 @@ The styles associated with this workbook. -

      -A collection of worksheets associated with this workbook. -

      +
      +

      A collection of worksheets associated with this workbook.

      @@ -323,9 +288,8 @@ A collection of worksheets associated with this workbook. -

      -retrieves the date1904 attribute. -

      +
      +

      retrieves the date1904 attribute.

      @@ -347,9 +311,8 @@ retrieves the date1904 attribute. -

      -Sets the date1904 attribute to the provided boolean. -

      +
      +

      Sets the date1904 attribute to the provided boolean.

      @@ -380,9 +343,8 @@ Sets the date1904 attribute to the provided boolean. -

      -Adds a worksheet to this workbook. -

      +
      +

      Adds a worksheet to this workbook.

      @@ -404,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.

      @@ -428,9 +389,8 @@ Instance level access to the class variable 1904. -

      -see @date1904. -

      +
      +

      see @date1904.

      @@ -454,9 +414,8 @@ see @date1904. -

      -Creates a new Workbook. -

      +
      +

      Creates a new Workbook.

      @@ -478,9 +437,31 @@ Creates a new Workbook. -

      -The workbook relationships. -

      +
      +

      The workbook relationships.

      +
      + + + + +
    • + + + - (Styles) styles {|@styles| ... } + + + + + + + + + + + + +
      +

      The styles associated with this workbook.

    • @@ -502,9 +483,8 @@ The workbook relationships. -

      -Serializes the workbook document. -

      +
      +

      Serializes the workbook document.

      @@ -525,9 +505,8 @@ Serializes the workbook document.

      -

      -Creates a new Workbook -

      + +

      Creates a new Workbook

      @@ -548,9 +527,8 @@ Creates a new Workbook — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -601,9 +579,8 @@ a customizable set of options — -

      -the object that the method was called on -

      +
      +

      the object that the method was called on

      @@ -616,29 +593,28 @@ the object that the method was called on
       
       
      -75
      -76
       77
       78
       79
       80
       81
       82
      -83
      +83 +84 +85 -
      # File 'lib/axlsx/workbook/workbook.rb', line 75
      -
      -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
      -
      +
      # 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
      @@ -664,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

      @@ -715,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 @@ -739,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

      @@ -790,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 @@ -814,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

      @@ -865,85 +833,9 @@ A colllection of images associated with this workbook
      # File 'lib/axlsx/workbook/workbook.rb', line 52
       
      -def images
      -  @images
      -end
      -
      - - - -
      - - - - -
      -

      - - - (Styles) styles (readonly) - - - -

      -
      - -
      - Note: -

      -The recommended way to manage styles is Styles#add_style -

      -
      -
      - -

      -The styles associated with this workbook -

      - - -
      -
      -
      - -

      Returns:

      -
        - -
      • - - - (Styles) - - - -
      • - -
      - -

      See Also:

      -
        - -
      • Style#add_style
      • - -
      • Style
      • - -
      - -
      - - -
      -
      -
      -
      -66
      -67
      -68
      -
      -
      # File 'lib/axlsx/workbook/workbook.rb', line 66
      -
      -def styles
      -  @styles
      -end
      -
      +def images + @images +end
      @@ -964,15 +856,13 @@ The styles 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.

      @@ -1015,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 @@ -1040,9 +929,8 @@ A collection of worksheets associated with this workbook.

      -

      -retrieves the date1904 attribute -

      + +

      retrieves the date1904 attribute

      @@ -1069,13 +957,12 @@ retrieves the date1904 attribute
       
       
      -98
      +100 -
      # File 'lib/axlsx/workbook/workbook.rb', line 98
      +      
      # File 'lib/axlsx/workbook/workbook.rb', line 100
       
      -def self.date1904() @@date1904; end
      -
      +def self.date1904() @@date1904; end
      @@ -1090,9 +977,8 @@ retrieves the date1904 attribute

      -

      -Sets the date1904 attribute to the provided boolean -

      + +

      Sets the date1904 attribute to the provided boolean

      @@ -1119,13 +1005,12 @@ Sets the date1904 attribute to the provided boolean
       
       
      -94
      +96 -
      # File 'lib/axlsx/workbook/workbook.rb', line 94
      +      
      # 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
      @@ -1146,9 +1031,8 @@ Sets the date1904 attribute to the provided boolean

      -

      -Adds a worksheet to this workbook -

      + +

      Adds a worksheet to this workbook

      @@ -1169,9 +1053,8 @@ Adds a worksheet to this workbook — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -1190,9 +1073,8 @@ a customizable set of options - —

      -The name of the worksheet. -

      + —
      +

      The name of the worksheet.

      @@ -1239,21 +1121,20 @@ The name of the worksheet.
       
       
      -104
      -105
       106
       107
      -108
      +108 +109 +110 -
      # File 'lib/axlsx/workbook/workbook.rb', line 104
      -
      -def add_worksheet(options={})
      -  worksheet = Worksheet.new(self, options)
      -  yield worksheet if block_given?
      -  worksheet
      -end
      -
      +
      # File 'lib/axlsx/workbook/workbook.rb', line 106
      +
      +def add_worksheet(options={})
      +  worksheet = Worksheet.new(self, options)
      +  yield worksheet if block_given?
      +  worksheet
      +end
      @@ -1268,9 +1149,8 @@ The name of the worksheet.

      -

      -Instance level access to the class variable 1904 -

      + +

      Instance level access to the class variable 1904

      @@ -1297,13 +1177,12 @@ Instance level access to the class variable 1904
       
       
      -87
      +89 -
      # File 'lib/axlsx/workbook/workbook.rb', line 87
      +      
      # File 'lib/axlsx/workbook/workbook.rb', line 89
       
      -def date1904() @@date1904; end
      -
      +def date1904() @@date1904; end
      @@ -1318,9 +1197,8 @@ Instance level access to the class variable 1904

      -

      -see @date1904 -

      + +

      see @date1904

      @@ -1334,13 +1212,12 @@ see @date1904
       
       
      -90
      +92 -
      # File 'lib/axlsx/workbook/workbook.rb', line 90
      +      
      # 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
      @@ -1355,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

      @@ -1384,27 +1260,110 @@ The workbook relationships. This is managed automatically by the workbook
       
       
      -112
      -113
       114
       115
       116
       117
       118
      -119
      +119 +120 +121 + + +
      # 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
      + + + +
      + +
      +

      + + - (Styles) styles {|@styles| ... } + + + +

      +
      + +
      + Note: +
      +

      The recommended way to manage styles is Styles#add_style

      +
      +
      + + +

      The styles associated with this workbook

      + + +
      +
      +
      + +

      Yields:

      +
        + +
      • + + + (@styles) + + + +
      • + +
      +

      Returns:

      +
        + +
      • + + + (Styles) + + + +
      • + +
      + +

      See Also:

      +
        + +
      • Style#add_style
      • + +
      • Style
      • + +
      + +
      + +
      +
      +
      +
      +66
      +67
      +68
      +69
      -
      # File 'lib/axlsx/workbook/workbook.rb', line 112
      -
      -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
      -
      +
      # File 'lib/axlsx/workbook/workbook.rb', line 66
      +
      +def styles
      +  yield @styles if block_given?
      +  @styles
      +end
      @@ -1419,9 +1378,8 @@ The workbook relationships. This is managed automatically by the workbook

      -

      -Serializes the workbook document -

      + +

      Serializes the workbook document

      @@ -1448,8 +1406,6 @@ Serializes the workbook document
       
       
      -123
      -124
       125
       126
       127
      @@ -1461,26 +1417,27 @@ Serializes the workbook document
       133
       134
       135
      -136
      +136 +137 +138 -
      # File 'lib/axlsx/workbook/workbook.rb', line 123
      -
      -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
      -
      +
      # 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
      @@ -1491,9 +1448,9 @@ Serializes the workbook document
      diff --git a/doc/Axlsx/Worksheet.html b/doc/Axlsx/Worksheet.html index 05bc4c18..89fb693b 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,9 +287,8 @@ Adds a media item to the worksheets drawing. -

      -Adds a row to the worksheet and updates auto fit data. -

      +
      +

      Adds a row to the worksheet and updates auto fit data.

      @@ -305,7 +297,7 @@ Adds a row to the worksheet and updates auto fit data.
    • - - (Float) auto_width(col) + - (Object) col_style(index, style, options = {}) @@ -318,9 +310,8 @@ Adds a row to the worksheet and updates auto fit data. -

      -Determines the proper width for a column based on content. -

      +
      +

      Set the style for cells in a specific column.

    • @@ -329,7 +320,7 @@ Determines the proper width for a column based on content.
    • - - (Object) col_style(index, style, options = {}) + - (Object) cols @@ -342,9 +333,8 @@ Determines the proper width for a column based on content. -

      -Set the style for cells in a specific column. -

      +
      +

      returns the sheet data as columnw.

    • @@ -366,9 +356,8 @@ Set the style for cells in a specific column. -

      -The drawing associated with this worksheet. -

      +
      +

      The drawing associated with this worksheet.

      @@ -390,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.

      @@ -416,9 +404,8 @@ The index of this worksheet in the owning Workbook’s worksheets list. -

      -Creates a new worksheet. -

      +
      +

      Creates a new worksheet.

      @@ -440,9 +427,8 @@ Creates a new worksheet. -

      -The part name of this worksheet. -

      +
      +

      The part name of this worksheet.

      @@ -464,9 +450,8 @@ The part name of this worksheet. -

      -The worksheet relationships. -

      +
      +

      The worksheet relationships.

      @@ -488,9 +473,8 @@ The worksheet relationships. -

      -The relationship part name of this worksheet. -

      +
      +

      The relationship part name of this worksheet.

      @@ -512,9 +496,8 @@ The relationship part name of this worksheet. -

      -The relationship Id of thiw worksheet. -

      +
      +

      The relationship Id of thiw worksheet.

      @@ -536,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.

      @@ -560,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.

    • @@ -610,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.

      @@ -639,9 +594,8 @@ Creates a new worksheet. — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -662,9 +616,8 @@ a customizable set of options - —

      -The name of this sheet. -

      + —
      +

      The name of this sheet.

      @@ -693,21 +646,22 @@ The name of this sheet. 39 40 41 -42 +42 +43
      # 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
      -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 @@ -733,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.

      @@ -760,9 +712,8 @@ An array of content based calculated column widths. — -

      -of Hash -

      +
      +

      of Hash

      @@ -782,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 @@ -803,9 +753,8 @@ of Hash

      -

      -The name of the worksheet -

      + +

      The name of the worksheet

      @@ -839,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 @@ -863,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

      @@ -912,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 @@ -933,9 +878,8 @@ The rows in this worksheet

      -

      -The workbook that owns this worksheet -

      + +

      The workbook that owns this worksheet

      @@ -969,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 @@ -997,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.

      @@ -1040,9 +981,8 @@ and all the other dirty details. — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -1140,21 +1080,20 @@ a customizable set of options
       
       
      -132
      -133
      -134
      -135
      -136
      +148 +149 +150 +151 +152 -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 132
      -
      -def add_chart(chart_type, options={})
      -  chart = drawing.add_chart(chart_type, options)
      -  yield chart if block_given?
      -  chart
      -end
      -
      +
      # 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
      @@ -1169,9 +1108,8 @@ a customizable set of options

      -

      -Adds a media item to the worksheets drawing -

      + +

      Adds a media item to the worksheets drawing

      @@ -1203,9 +1141,8 @@ Adds a media item to the worksheets drawing — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -1224,9 +1161,8 @@ a customizable set of options - —

      -unknown -

      + —
      +

      unknown

      @@ -1253,21 +1189,20 @@ unknown
       
       
      -141
      -142
      -143
      -144
      -145
      +157 +158 +159 +160 +161 -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 141
      -
      -def add_image(options={})
      -  image = drawing.add_image(options)
      -  yield image if block_given?
      -  image
      -end
      -
      +
      # 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
      @@ -1282,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

      @@ -1305,9 +1239,8 @@ Adds a row to the worksheet and updates auto fit data — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -1385,128 +1318,22 @@ a customizable set of options
       
       
      -85
       86
       87
       88
       89
      -90
      +90 +91 -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 85
      -
      -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) - - - -
      • - -
      - -
      - - -
      -
      -
      -
      -216
      -217
      -218
      -219
      -220
      -221
      -222
      -223
      -224
      -225
      -226
      -
      -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 216
      -
      -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
      -
      +
      # 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
      @@ -1524,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

      @@ -1552,9 +1377,8 @@ Set the style for cells in a specific column — -

      -the index of the column -

      +
      +

      the index of the column

      @@ -1569,9 +1393,8 @@ the index of the column — -

      -cellXfs index -

      +
      +

      cellXfs index

      @@ -1588,9 +1411,8 @@ cellXfs index — -

      -a customizable set of options -

      +
      +

      a customizable set of options

      @@ -1613,28 +1435,14 @@ a customizable set of options - —

      -only cells after this column will be updated. -

      + —
      +

      only cells after this column will be updated.

    -

    Raises:

    -
      - -
    • - - - (ArgumentError) - - - -
    • - -

    See Also:

      @@ -1651,21 +1459,71 @@ only cells after this column will be updated.
       
       
      -113
      -114
      -115
      -116
      -117
      +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 + + +
      # 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
      + + + +
    + +
    +

    + + - (Object) cols + + + +

    +
    + +

    returns the sheet data as columnw

    + + +
    +
    +
    + + +
    + +
    +
    +
    +
    +111
    +112
    +113
    -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 113
    -
    -def col_style(index, style, options={})
    -  raise ArgumentError, "Invalid Column Index" unless index < @rows.first.cells.size
    -  offset = options.delete(:row_offset) || 0
    -  @rows[(offset..-1)].each { |r| r.cells[index].style = style }
    -end
    -
    +
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 111
    +
    +def cols
    +  @rows.transpose
    +end
    @@ -1683,15 +1541,13 @@ only cells after this column will be updated.
    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.

    @@ -1725,17 +1581,16 @@ The drawing associated with this worksheet.
     
     
    -76
     77
    -78
    +78 +79 -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 76
    +      
    # 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
    @@ -1750,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.

    @@ -1779,17 +1633,16 @@ The index of this worksheet in the owning Workbook’s worksheets list.
     
     
    -68
     69
    -70
    +70 +71 -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 68
    +      
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 69
     
    -def index
    -  @workbook.worksheets.index(self)
    -end
    -
    +def index + @workbook.worksheets.index(self) +end
    @@ -1804,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

    @@ -1833,17 +1685,16 @@ The part name of this worksheet
     
     
    -50
     51
    -52
    +52 +53 -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 50
    +      
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 51
     
    -def pn
    -  "#{WORKSHEET_PN % (index+1)}"
    -end
    -
    +def pn + "#{WORKSHEET_PN % (index+1)}" +end
    @@ -1858,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

    @@ -1887,21 +1737,20 @@ The worksheet relationships. This is managed automatically by the worksheet
     
     
    -173
    -174
    -175
    -176
    -177
    +189 +190 +191 +192 +193 -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 173
    -
    -def relationships
    -    r = Relationships.new
    -    r << Relationship.new(DRAWING_R, "../#{@drawing.pn}") if @drawing
    -    r
    -end
    -
    +
    # 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
    @@ -1916,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

    @@ -1945,17 +1793,16 @@ The relationship part name of this worksheet
     
     
    -56
     57
    -58
    +58 +59 -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 56
    +      
    # 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
    @@ -1970,9 +1817,8 @@ The relationship part name of this worksheet

    -

    -The relationship Id of thiw worksheet -

    + +

    The relationship Id of thiw worksheet

    @@ -1999,17 +1845,16 @@ The relationship Id of thiw worksheet
     
     
    -62
     63
    -64
    +64 +65 -
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 62
    +      
    # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 63
     
    -def rId
    -  "rId#{index+1}"
    -end
    -
    +def rId + "rId#{index+1}" +end
    @@ -2027,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

    @@ -2054,9 +1897,8 @@ Set the style for cells in a specific row — -

    -the index of the row -

    +
    +

    or range of indexes in the table

    @@ -2071,9 +1913,8 @@ the index of the row — -

    -cellXfs index -

    +
    +

    cellXfs index

    @@ -2090,9 +1931,8 @@ cellXfs index — -

    -a customizable set of options -

    +
    +

    a customizable set of options

    @@ -2115,28 +1955,14 @@ a customizable set of options - —

    -only cells after this column will be updated. -

    + —
    +

    only cells after this column will be updated.

    -

    Raises:

    -
      - -
    • - - - (ArgumentError) - - - -
    • - -

    See Also:

      @@ -2153,21 +1979,28 @@ only cells after this column will be updated.
       
       
      -99
       100
       101
       102
      -103
      +103 +104 +105 +106 +107 +108 -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 99
      -
      -def row_style(index, style, options={})
      -  raise ArgumentError, "Invalid Row Index" unless index < @rows.size
      -  offset = options.delete(:col_offset) || 0
      -  @rows[index].cells[(offset..-1)].each { |c| c.style = style }
      -end
      -
      +
      # 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
      @@ -2182,9 +2015,8 @@ only cells after this column will be updated.

      -

      -Serializes the worksheet document -

      + +

      Serializes the worksheet document

      @@ -2211,168 +2043,52 @@ Serializes the worksheet document
       
       
      -149
      -150
      -151
      -152
      -153
      -154
      -155
      -156
      -157
      -158
      -159
      -160
      -161
      -162
      -163
      -164
       165
       166
       167
       168
      -169
      - - -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 149
      -
      -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 -

        -
        - -
      • - -
      - -
      - -
      -
      -
      -
      -188
      -189
      -190
      -191
      -192
      -193
      -194
      -195
      -196
      -197
      -198
      -199
      -200
      -201
      -202
      -203
      -204
      -205
      -206
      +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185
      -
      # File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 188
      -
      -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
      -
      +
      # 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
      @@ -2383,9 +2099,9 @@ of Cell objects
      diff --git a/doc/Axlsx/Xf.html b/doc/Axlsx/Xf.html index 79e3b590..cfdfc33b 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 ad0fc86c..b0fa25c5 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 6841b470..721788ab 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 18:05:01 2011 by + Generated on Sun Nov 27 20:28:11 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 3d433391..6dd7a7b4 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 @@ -61,7 +61,7 @@ <strong>Author</strong>: Randy Morgan <br/> <strong>Copyright</strong>: 2011 <br/> <strong>License</strong>: MIT License <br/> -<strong>Latest Version</strong>: 1.0.10 <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> @@ -96,196 +96,199 @@ 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'># 1. 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'># 2. Add 'acts_as_axslx' to your model</span> - - <span class='class class kw'>class</span> <span class='MyModel constant id'>MyModel</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='acts_as_axlsx identifier id'>acts_as_axlsx</span> - <span class='end end kw'>end</span> - - <span class='comment val'># 3. In your controlle, simply call to_xlsx against the class</span> - - <span class='class class kw'>class</span> <span class='MyModelController constant id'>MyModelController</span> <span class='lt op'><</span> <span class='ApplicationController constant id'>ApplicationController</span> - - <span class='comment val'>#GET /posts/xlsx</span> - <span class='def def kw'>def</span> <span class='xlsx identifier id'>xlsx</span> - <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='MyModel constant id'>MyModel</span><span class='dot token'>.</span><span class='since identifier id'>since</span><span class='lparen token'>(</span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span> <span class='minus op'>-</span> <span class='float val'>5</span><span class='dot token'>.</span><span class='days identifier id'>days</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_xlsx identifier id'>to_xlsx</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'>'my_model.xlsx'</span><span class='rparen token'>)</span> - <span class='send_file identifier id'>send_file</span> <span class='string val'>'my_model.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'># 1. 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'># 2. Add 'acts_as_axslx' to your model +</span> + <span class='kw'>class</span> <span class='const'>MyModel</span> <span class='op'><</span> <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span> + <span class='id acts_as_axlsx'>acts_as_axlsx</span> + <span class='kw'>end</span> + + <span class='comment'># 3. In your controlle, simply call to_xlsx against the class +</span> + <span class='kw'>class</span> <span class='const'>MyModelController</span> <span class='op'><</span> <span class='const'>ApplicationController</span> + + <span class='comment'>#GET /posts/xlsx +</span> <span class='kw'>def</span> <span class='id xlsx'>xlsx</span> + <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>MyModel</span><span class='period'>.</span><span class='id since'>since</span><span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id now'>now</span> <span class='op'>-</span> <span class='int'>5</span><span class='period'>.</span><span class='id days'>days</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_xlsx'>to_xlsx</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'>my_model.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'>my_model.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> @@ -295,10 +298,10 @@ With Axlsx you can create worksheets with charts, images, automated column width <h2>Changelog</h2> <ul> -<li><p><strong>October.27.11</strong>: 1.0.10 release</p> +<li><p><strong>October.27.11</strong>: 1.0.10.a release</p> <ul> -<li>Updating gemspec to be compatible with rails3 requirements</li> +<li>Updating gemspec to loosen up some of the gem requirements in the hope of maintaining compatibility with rails 2</li> <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> @@ -323,9 +326,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 18:05:01 2011 by + Generated on Sun Nov 27 20:28:11 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 3d433391..6dd7a7b4 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 @@ -61,7 +61,7 @@ <strong>Author</strong>: Randy Morgan <br/> <strong>Copyright</strong>: 2011 <br/> <strong>License</strong>: MIT License <br/> -<strong>Latest Version</strong>: 1.0.10 <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> @@ -96,196 +96,199 @@ 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'># 1. 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'># 2. Add 'acts_as_axslx' to your model</span> - - <span class='class class kw'>class</span> <span class='MyModel constant id'>MyModel</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='acts_as_axlsx identifier id'>acts_as_axlsx</span> - <span class='end end kw'>end</span> - - <span class='comment val'># 3. In your controlle, simply call to_xlsx against the class</span> - - <span class='class class kw'>class</span> <span class='MyModelController constant id'>MyModelController</span> <span class='lt op'><</span> <span class='ApplicationController constant id'>ApplicationController</span> - - <span class='comment val'>#GET /posts/xlsx</span> - <span class='def def kw'>def</span> <span class='xlsx identifier id'>xlsx</span> - <span class='p identifier id'>p</span> <span class='assign token'>=</span> <span class='MyModel constant id'>MyModel</span><span class='dot token'>.</span><span class='since identifier id'>since</span><span class='lparen token'>(</span><span class='Time constant id'>Time</span><span class='dot token'>.</span><span class='now identifier id'>now</span> <span class='minus op'>-</span> <span class='float val'>5</span><span class='dot token'>.</span><span class='days identifier id'>days</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='to_xlsx identifier id'>to_xlsx</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'>'my_model.xlsx'</span><span class='rparen token'>)</span> - <span class='send_file identifier id'>send_file</span> <span class='string val'>'my_model.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'># 1. 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'># 2. Add 'acts_as_axslx' to your model +</span> + <span class='kw'>class</span> <span class='const'>MyModel</span> <span class='op'><</span> <span class='const'>ActiveRecord</span><span class='op'>::</span><span class='const'>Base</span> + <span class='id acts_as_axlsx'>acts_as_axlsx</span> + <span class='kw'>end</span> + + <span class='comment'># 3. In your controlle, simply call to_xlsx against the class +</span> + <span class='kw'>class</span> <span class='const'>MyModelController</span> <span class='op'><</span> <span class='const'>ApplicationController</span> + + <span class='comment'>#GET /posts/xlsx +</span> <span class='kw'>def</span> <span class='id xlsx'>xlsx</span> + <span class='id p'>p</span> <span class='op'>=</span> <span class='const'>MyModel</span><span class='period'>.</span><span class='id since'>since</span><span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id now'>now</span> <span class='op'>-</span> <span class='int'>5</span><span class='period'>.</span><span class='id days'>days</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_xlsx'>to_xlsx</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'>my_model.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'>my_model.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> @@ -295,10 +298,10 @@ With Axlsx you can create worksheets with charts, images, automated column width <h2>Changelog</h2> <ul> -<li><p><strong>October.27.11</strong>: 1.0.10 release</p> +<li><p><strong>October.27.11</strong>: 1.0.10.a release</p> <ul> -<li>Updating gemspec to be compatible with rails3 requirements</li> +<li>Updating gemspec to loosen up some of the gem requirements in the hope of maintaining compatibility with rails 2</li> <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> @@ -323,9 +326,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 18:05:01 2011 by + Generated on Sun Nov 27 20:28:11 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 ff1c4e0d..2fd2d307 100644 --- a/doc/method_list.html +++ b/doc/method_list.html @@ -289,41 +289,41 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#add_chart-instance_method" title="Axlsx::Worksheet#add_chart (method)">#add_chart</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#add_chart-instance_method" title="Axlsx::Drawing#add_chart (method)">#add_chart</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Drawing</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Drawing.html#add_chart-instance_method" title="Axlsx::Drawing#add_chart (method)">#add_chart</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#add_chart-instance_method" title="Axlsx::TwoCellAnchor#add_chart (method)">#add_chart</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#add_chart-instance_method" title="Axlsx::TwoCellAnchor#add_chart (method)">#add_chart</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#add_chart-instance_method" title="Axlsx::Worksheet#add_chart (method)">#add_chart</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::Worksheet</small> </li> <li class="r1 "> - <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> <li class="r2 "> - <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> @@ -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/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> <li class="r2 "> - <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> @@ -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> @@ -697,17 +665,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/BorderPr.html#color-instance_method" title="Axlsx::BorderPr#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::BorderPr</small> + <small>Axlsx::GradientStop</small> </li> <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/BorderPr.html#color-instance_method" title="Axlsx::BorderPr#color (method)">#color</a></span> - <small>Axlsx::GradientStop</small> + <small>Axlsx::BorderPr</small> </li> @@ -721,6 +689,14 @@ <li class="r2 "> + <span class='object_link'><a href="Axlsx/Worksheet.html#cols-instance_method" title="Axlsx::Worksheet#cols (method)">#cols</a></span> + + <small>Axlsx::Worksheet</small> + + </li> + + + <li class="r1 "> <span class='object_link'><a href="Axlsx/Font.html#condense-instance_method" title="Axlsx::Font#condense (method)">#condense</a></span> <small>Axlsx::Font</small> @@ -728,7 +704,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Marker.html#coord-instance_method" title="Axlsx::Marker#coord (method)">#coord</a></span> <small>Axlsx::Marker</small> @@ -736,7 +712,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Core.html#creator-instance_method" title="Axlsx::Core#creator (method)">#creator</a></span> <small>Axlsx::Core</small> @@ -744,7 +720,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Axis.html#crossAx-instance_method" title="Axlsx::Axis#crossAx (method)">#crossAx</a></span> <small>Axlsx::Axis</small> @@ -752,7 +728,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/ValAxis.html#crossBetween-instance_method" title="Axlsx::ValAxis#crossBetween (method)">#crossBetween</a></span> <small>Axlsx::ValAxis</small> @@ -760,7 +736,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Axis.html#crosses-instance_method" title="Axlsx::Axis#crosses (method)">#crosses</a></span> <small>Axlsx::Axis</small> @@ -768,7 +744,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/CellStyle.html#customBuiltin-instance_method" title="Axlsx::CellStyle#customBuiltin (method)">#customBuiltin</a></span> <small>Axlsx::CellStyle</small> @@ -776,7 +752,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/BarSeries.html#data-instance_method" title="Axlsx::BarSeries#data (method)">#data</a></span> <small>Axlsx::BarSeries</small> @@ -784,7 +760,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/LineSeries.html#data-instance_method" title="Axlsx::LineSeries#data (method)">#data</a></span> <small>Axlsx::LineSeries</small> @@ -792,7 +768,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/PieSeries.html#data-instance_method" title="Axlsx::PieSeries#data (method)">#data</a></span> <small>Axlsx::PieSeries</small> @@ -800,7 +776,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Workbook.html#date1904-instance_method" title="Axlsx::Workbook#date1904 (method)">#date1904</a></span> <small>Axlsx::Workbook</small> @@ -808,7 +784,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Workbook.html#date1904-class_method" title="Axlsx::Workbook.date1904 (method)">date1904</a></span> <small>Axlsx::Workbook</small> @@ -816,23 +792,23 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Workbook.html#date1904%3D-instance_method" title="Axlsx::Workbook#date1904= (method)">#date1904=</a></span> + <li class="r1 "> + <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> </li> - <li class="r1 "> - <span class='object_link'><a href="Axlsx/Workbook.html#date1904%3D-class_method" title="Axlsx::Workbook.date1904= (method)">date1904=</a></span> + <li class="r2 "> + <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> </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/TableStyles.html#defaultPivotStyle-instance_method" title="Axlsx::TableStyles#defaultPivotStyle (method)">#defaultPivotStyle</a></span> <small>Axlsx::TableStyles</small> @@ -840,7 +816,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/TableStyles.html#defaultTableStyle-instance_method" title="Axlsx::TableStyles#defaultTableStyle (method)">#defaultTableStyle</a></span> <small>Axlsx::TableStyles</small> @@ -848,7 +824,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/GradientFill.html#degree-instance_method" title="Axlsx::GradientFill#degree (method)">#degree</a></span> <small>Axlsx::GradientFill</small> @@ -856,7 +832,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/View3D.html#depthPercent-instance_method" title="Axlsx::View3D#depthPercent (method)">#depthPercent</a></span> <small>Axlsx::View3D</small> @@ -864,7 +840,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Pic.html#descr-instance_method" title="Axlsx::Pic#descr (method)">#descr</a></span> <small>Axlsx::Pic</small> @@ -872,7 +848,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Border.html#diagonalDown-instance_method" title="Axlsx::Border#diagonalDown (method)">#diagonalDown</a></span> <small>Axlsx::Border</small> @@ -880,7 +856,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Border.html#diagonalUp-instance_method" title="Axlsx::Border#diagonalUp (method)">#diagonalUp</a></span> <small>Axlsx::Border</small> @@ -888,15 +864,15 @@ </li> - <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#drawing-instance_method" title="Axlsx::Worksheet#drawing (method)">#drawing</a></span> + <li class="r2 "> + <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="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/OneCellAnchor.html#drawing-instance_method" title="Axlsx::OneCellAnchor#drawing (method)">#drawing</a></span> <small>Axlsx::OneCellAnchor</small> @@ -904,15 +880,15 @@ </li> - <li class="r1 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#drawing-instance_method" title="Axlsx::TwoCellAnchor#drawing (method)">#drawing</a></span> + <li class="r2 "> + <span class='object_link'><a href="Axlsx/Worksheet.html#drawing-instance_method" title="Axlsx::Worksheet#drawing (method)">#drawing</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::Worksheet</small> </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Workbook.html#drawings-instance_method" title="Axlsx::Workbook#drawings (method)">#drawings</a></span> <small>Axlsx::Workbook</small> @@ -920,7 +896,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/TableStyleElement.html#dxfId-instance_method" title="Axlsx::TableStyleElement#dxfId (method)">#dxfId</a></span> <small>Axlsx::TableStyleElement</small> @@ -928,7 +904,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Styles.html#dxfs-instance_method" title="Axlsx::Styles#dxfs (method)">#dxfs</a></span> <small>Axlsx::Styles</small> @@ -936,7 +912,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Chart.html#end_at-instance_method" title="Axlsx::Chart#end_at (method)">#end_at</a></span> <small>Axlsx::Chart</small> @@ -944,7 +920,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/PieSeries.html#explosion-instance_method" title="Axlsx::PieSeries#explosion (method)">#explosion</a></span> <small>Axlsx::PieSeries</small> @@ -952,7 +928,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#extend-instance_method" title="Axlsx::Font#extend (method)">#extend</a></span> <small>Axlsx::Font</small> @@ -960,7 +936,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Pic.html#extname-instance_method" title="Axlsx::Pic#extname (method)">#extname</a></span> <small>Axlsx::Pic</small> @@ -968,7 +944,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#family-instance_method" title="Axlsx::Font#family (method)">#family</a></span> <small>Axlsx::Font</small> @@ -976,7 +952,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/PatternFill.html#fgColor-instance_method" title="Axlsx::PatternFill#fgColor (method)">#fgColor</a></span> <small>Axlsx::PatternFill</small> @@ -984,7 +960,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Pic.html#file_name-instance_method" title="Axlsx::Pic#file_name (method)">#file_name</a></span> <small>Axlsx::Pic</small> @@ -992,7 +968,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Xf.html#fillId-instance_method" title="Axlsx::Xf#fillId (method)">#fillId</a></span> <small>Axlsx::Xf</small> @@ -1000,7 +976,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Fill.html#fill_type-instance_method" title="Axlsx::Fill#fill_type (method)">#fill_type</a></span> <small>Axlsx::Fill</small> @@ -1008,7 +984,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Styles.html#fills-instance_method" title="Axlsx::Styles#fills (method)">#fills</a></span> <small>Axlsx::Styles</small> @@ -1016,7 +992,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Xf.html#fontId-instance_method" title="Axlsx::Xf#fontId (method)">#fontId</a></span> <small>Axlsx::Xf</small> @@ -1024,7 +1000,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Styles.html#fonts-instance_method" title="Axlsx::Styles#fonts (method)">#fonts</a></span> <small>Axlsx::Styles</small> @@ -1032,7 +1008,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/NumFmt.html#formatCode-instance_method" title="Axlsx::NumFmt#formatCode (method)">#formatCode</a></span> <small>Axlsx::NumFmt</small> @@ -1040,7 +1016,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Axis.html#format_code-instance_method" title="Axlsx::Axis#format_code (method)">#format_code</a></span> <small>Axlsx::Axis</small> @@ -1048,14 +1024,6 @@ </li> - <li class="r1 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#from-instance_method" title="Axlsx::OneCellAnchor#from (method)">#from</a></span> - - <small>Axlsx::OneCellAnchor</small> - - </li> - - <li class="r2 "> <span class='object_link'><a href="Axlsx/Chart.html#from-instance_method" title="Axlsx::Chart#from (method)">#from</a></span> @@ -1073,6 +1041,14 @@ <li class="r2 "> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#from-instance_method" title="Axlsx::OneCellAnchor#from (method)">#from</a></span> + + <small>Axlsx::OneCellAnchor</small> + + </li> + + + <li class="r1 "> <span class='object_link'><a href="Axlsx/Line3DChart.html#gapDepth-instance_method" title="Axlsx::Line3DChart#gapDepth (method)">#gapDepth</a></span> <small>Axlsx::Line3DChart</small> @@ -1080,7 +1056,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Bar3DChart.html#gapDepth-instance_method" title="Axlsx::Bar3DChart#gapDepth (method)">#gapDepth</a></span> <small>Axlsx::Bar3DChart</small> @@ -1088,7 +1064,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Bar3DChart.html#gapWidth-instance_method" title="Axlsx::Bar3DChart#gapWidth (method)">#gapWidth</a></span> <small>Axlsx::Bar3DChart</small> @@ -1096,7 +1072,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Chart.html#graphic_frame-instance_method" title="Axlsx::Chart#graphic_frame (method)">#graphic_frame</a></span> <small>Axlsx::Chart</small> @@ -1104,7 +1080,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Line3DChart.html#grouping-instance_method" title="Axlsx::Line3DChart#grouping (method)">#grouping</a></span> <small>Axlsx::Line3DChart</small> @@ -1112,7 +1088,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Bar3DChart.html#grouping-instance_method" title="Axlsx::Bar3DChart#grouping (method)">#grouping</a></span> <small>Axlsx::Bar3DChart</small> @@ -1120,7 +1096,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/View3D.html#hPercent-instance_method" title="Axlsx::View3D#hPercent (method)">#hPercent</a></span> <small>Axlsx::View3D</small> @@ -1128,6 +1104,14 @@ </li> + <li class="r2 "> + <span class='object_link'><a href="Axlsx/Pic.html#height-instance_method" title="Axlsx::Pic#height (method)">#height</a></span> + + <small>Axlsx::Pic</small> + + </li> + + <li class="r1 "> <span class='object_link'><a href="Axlsx/OneCellAnchor.html#height-instance_method" title="Axlsx::OneCellAnchor#height (method)">#height</a></span> @@ -1137,7 +1121,7 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Pic.html#height-instance_method" title="Axlsx::Pic#height (method)">#height</a></span> + <span class='object_link'><a href="Axlsx/Pic.html#height%3D-instance_method" title="Axlsx::Pic#height= (method)">#height=</a></span> <small>Axlsx::Pic</small> @@ -1145,9 +1129,9 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pic.html#height%3D-instance_method" title="Axlsx::Pic#height= (method)">#height=</a></span> + <span class='object_link'><a href="Axlsx/CellStyle.html#hidden-instance_method" title="Axlsx::CellStyle#hidden (method)">#hidden</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::CellStyle</small> </li> @@ -1161,14 +1145,6 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/CellStyle.html#hidden-instance_method" title="Axlsx::CellStyle#hidden (method)">#hidden</a></span> - - <small>Axlsx::CellStyle</small> - - </li> - - - <li class="r2 "> <span class='object_link'><a href="Axlsx/CellAlignment.html#horizontal-instance_method" title="Axlsx::CellAlignment#horizontal (method)">#horizontal</a></span> <small>Axlsx::CellAlignment</small> @@ -1176,7 +1152,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#i-instance_method" title="Axlsx::Font#i (method)">#i</a></span> <small>Axlsx::Font</small> @@ -1184,7 +1160,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/CellStyle.html#iLevel-instance_method" title="Axlsx::CellStyle#iLevel (method)">#iLevel</a></span> <small>Axlsx::CellStyle</small> @@ -1192,7 +1168,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Pic.html#image_src-instance_method" title="Axlsx::Pic#image_src (method)">#image_src</a></span> <small>Axlsx::Pic</small> @@ -1200,14 +1176,6 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Workbook.html#images-instance_method" title="Axlsx::Workbook#images (method)">#images</a></span> - - <small>Axlsx::Workbook</small> - - </li> - - <li class="r1 "> <span class='object_link'><a href="Axlsx/Drawing.html#images-instance_method" title="Axlsx::Drawing#images (method)">#images</a></span> @@ -1217,321 +1185,321 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellAlignment.html#indent-instance_method" title="Axlsx::CellAlignment#indent (method)">#indent</a></span> + <span class='object_link'><a href="Axlsx/Workbook.html#images-instance_method" title="Axlsx::Workbook#images (method)">#images</a></span> - <small>Axlsx::CellAlignment</small> + <small>Axlsx::Workbook</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Cell.html#index-instance_method" title="Axlsx::Cell#index (method)">#index</a></span> + <span class='object_link'><a href="Axlsx/CellAlignment.html#indent-instance_method" title="Axlsx::CellAlignment#indent (method)">#indent</a></span> - <small>Axlsx::Cell</small> + <small>Axlsx::CellAlignment</small> </li> <li class="r2 "> - <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/Pic.html#index-instance_method" title="Axlsx::Pic#index (method)">#index</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::Pic</small> </li> <li class="r1 "> - <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="r2 "> - <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/Row.html#index-instance_method" title="Axlsx::Row#index (method)">#index</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::Row</small> </li> <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/Series.html#index-instance_method" title="Axlsx::Series#index (method)">#index</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::Series</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/Drawing.html#index-instance_method" title="Axlsx::Drawing#index (method)">#index</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::Drawing</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/Cell.html#index-instance_method" title="Axlsx::Cell#index (method)">#index</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::Cell</small> </li> <li class="r2 "> - <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/Worksheet.html#index-instance_method" title="Axlsx::Worksheet#index (method)">#index</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Worksheet</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#index-instance_method" title="Axlsx::Worksheet#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::Worksheet</small> + <small>Axlsx::Chart</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/App.html#initalize-instance_method" title="Axlsx::App#initalize (method)">#initalize</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#index-instance_method" title="Axlsx::TwoCellAnchor#index (method)">#index</a></span> - <small>Axlsx::App</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r1 "> - <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/App.html#initalize-instance_method" title="Axlsx::App#initalize (method)">#initalize</a></span> - <small>Axlsx::Scaling</small> + <small>Axlsx::App</small> </li> <li class="r2 "> - <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/TwoCellAnchor.html#initialize-instance_method" title="Axlsx::TwoCellAnchor#initialize (method)">#initialize</a></span> - <small>Axlsx::Pie3DChart</small> + <small>Axlsx::TwoCellAnchor</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/Worksheet.html#initialize-instance_method" title="Axlsx::Worksheet#initialize (method)">#initialize</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::Worksheet</small> </li> <li class="r2 "> - <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/Default.html#initialize-instance_method" title="Axlsx::Default#initialize (method)">#initialize</a></span> - <small>Axlsx::BorderPr</small> + <small>Axlsx::Default</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/CellStyle.html#initialize-instance_method" title="Axlsx::CellStyle#initialize (method)">#initialize</a></span> - <small>Axlsx::Workbook</small> + <small>Axlsx::CellStyle</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/BorderPr.html#initialize-instance_method" title="Axlsx::BorderPr#initialize (method)">#initialize</a></span> - <small>Axlsx::Override</small> + <small>Axlsx::BorderPr</small> </li> <li class="r1 "> - <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/Font.html#initialize-instance_method" title="Axlsx::Font#initialize (method)">#initialize</a></span> - <small>Axlsx::CatAxis</small> + <small>Axlsx::Font</small> </li> <li class="r2 "> - <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/CellProtection.html#initialize-instance_method" title="Axlsx::CellProtection#initialize (method)">#initialize</a></span> - <small>Axlsx::Chart</small> + <small>Axlsx::CellProtection</small> </li> <li class="r1 "> - <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/Pie3DChart.html#initialize-instance_method" title="Axlsx::Pie3DChart#initialize (method)">#initialize</a></span> - <small>Axlsx::TableStyleElement</small> + <small>Axlsx::Pie3DChart</small> </li> <li class="r2 "> - <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/Override.html#initialize-instance_method" title="Axlsx::Override#initialize (method)">#initialize</a></span> - <small>Axlsx::CellStyle</small> + <small>Axlsx::Override</small> </li> <li class="r1 "> - <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/LineSeries.html#initialize-instance_method" title="Axlsx::LineSeries#initialize (method)">#initialize</a></span> - <small>Axlsx::ContentType</small> + <small>Axlsx::LineSeries</small> </li> <li class="r2 "> - <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/CatAxisData.html#initialize-instance_method" title="Axlsx::CatAxisData#initialize (method)">#initialize</a></span> - <small>Axlsx::NumFmt</small> + <small>Axlsx::CatAxisData</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/BarSeries.html#initialize-instance_method" title="Axlsx::BarSeries#initialize (method)">#initialize</a></span> - <small>Axlsx::Border</small> + <small>Axlsx::BarSeries</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/Scaling.html#initialize-instance_method" title="Axlsx::Scaling#initialize (method)">#initialize</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::Scaling</small> </li> <li class="r1 "> - <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/View3D.html#initialize-instance_method" title="Axlsx::View3D#initialize (method)">#initialize</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::View3D</small> </li> <li class="r2 "> - <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/NumFmt.html#initialize-instance_method" title="Axlsx::NumFmt#initialize (method)">#initialize</a></span> - <small>Axlsx::View3D</small> + <small>Axlsx::NumFmt</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/Line3DChart.html#initialize-instance_method" title="Axlsx::Line3DChart#initialize (method)">#initialize</a></span> - <small>Axlsx::Cell</small> + <small>Axlsx::Line3DChart</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/ContentType.html#initialize-instance_method" title="Axlsx::ContentType#initialize (method)">#initialize</a></span> - <small>Axlsx::Package</small> + <small>Axlsx::ContentType</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/GradientFill.html#initialize-instance_method" title="Axlsx::GradientFill#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::GradientFill</small> + <small>Axlsx::Color</small> </li> <li class="r1 "> - <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/PieSeries.html#initialize-instance_method" title="Axlsx::PieSeries#initialize (method)">#initialize</a></span> - <small>Axlsx::SerAxis</small> + <small>Axlsx::PieSeries</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/Bar3DChart.html#initialize-instance_method" title="Axlsx::Bar3DChart#initialize (method)">#initialize</a></span> - <small>Axlsx::LineSeries</small> + <small>Axlsx::Bar3DChart</small> </li> <li class="r1 "> - <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/Styles.html#initialize-instance_method" title="Axlsx::Styles#initialize (method)">#initialize</a></span> - <small>Axlsx::Marker</small> + <small>Axlsx::Styles</small> </li> <li class="r2 "> - <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/Title.html#initialize-instance_method" title="Axlsx::Title#initialize (method)">#initialize</a></span> - <small>Axlsx::GraphicFrame</small> + <small>Axlsx::Title</small> </li> <li class="r1 "> - <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/CatAxis.html#initialize-instance_method" title="Axlsx::CatAxis#initialize (method)">#initialize</a></span> - <small>Axlsx::CellProtection</small> + <small>Axlsx::CatAxis</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/GraphicFrame.html#initialize-instance_method" title="Axlsx::GraphicFrame#initialize (method)">#initialize</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::GraphicFrame</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/Chart.html#initialize-instance_method" title="Axlsx::Chart#initialize (method)">#initialize</a></span> - <small>Axlsx::TableStyle</small> + <small>Axlsx::Chart</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/Fill.html#initialize-instance_method" title="Axlsx::Fill#initialize (method)">#initialize</a></span> - <small>Axlsx::Title</small> + <small>Axlsx::Fill</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/SerAxis.html#initialize-instance_method" title="Axlsx::SerAxis#initialize (method)">#initialize</a></span> - <small>Axlsx::Line3DChart</small> + <small>Axlsx::SerAxis</small> </li> @@ -1545,166 +1513,174 @@ <li class="r1 "> - <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/Row.html#initialize-instance_method" title="Axlsx::Row#initialize (method)">#initialize</a></span> - <small>Axlsx::Relationships</small> + <small>Axlsx::Row</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/ValAxis.html#initialize-instance_method" title="Axlsx::ValAxis#initialize (method)">#initialize</a></span> - <small>Axlsx::PatternFill</small> + <small>Axlsx::ValAxis</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/TableStyleElement.html#initialize-instance_method" title="Axlsx::TableStyleElement#initialize (method)">#initialize</a></span> - <small>Axlsx::GradientStop</small> + <small>Axlsx::TableStyleElement</small> </li> <li class="r2 "> - <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/TableStyle.html#initialize-instance_method" title="Axlsx::TableStyle#initialize (method)">#initialize</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::TableStyle</small> </li> <li class="r1 "> - <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/Axis.html#initialize-instance_method" title="Axlsx::Axis#initialize (method)">#initialize</a></span> - <small>Axlsx::Color</small> + <small>Axlsx::Axis</small> </li> <li class="r2 "> - <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/Drawing.html#initialize-instance_method" title="Axlsx::Drawing#initialize (method)">#initialize</a></span> - <small>Axlsx::Fill</small> + <small>Axlsx::Drawing</small> </li> <li class="r1 "> - <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/CellAlignment.html#initialize-instance_method" title="Axlsx::CellAlignment#initialize (method)">#initialize</a></span> - <small>Axlsx::CatAxisData</small> + <small>Axlsx::CellAlignment</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/Relationship.html#initialize-instance_method" title="Axlsx::Relationship#initialize (method)">#initialize</a></span> - <small>Axlsx::Default</small> + <small>Axlsx::Relationship</small> </li> <li class="r1 "> - <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/Workbook.html#initialize-instance_method" title="Axlsx::Workbook#initialize (method)">#initialize</a></span> - <small>Axlsx::TableStyles</small> + <small>Axlsx::Workbook</small> </li> <li class="r2 "> - <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/Package.html#initialize-instance_method" title="Axlsx::Package#initialize (method)">#initialize</a></span> - <small>Axlsx::Relationship</small> + <small>Axlsx::Package</small> </li> <li class="r1 "> - <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/Core.html#initialize-instance_method" title="Axlsx::Core#initialize (method)">#initialize</a></span> - <small>Axlsx::Axis</small> + <small>Axlsx::Core</small> </li> <li class="r2 "> - <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/PatternFill.html#initialize-instance_method" title="Axlsx::PatternFill#initialize (method)">#initialize</a></span> - <small>Axlsx::Styles</small> + <small>Axlsx::PatternFill</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/Marker.html#initialize-instance_method" title="Axlsx::Marker#initialize (method)">#initialize</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::Marker</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/Xf.html#initialize-instance_method" title="Axlsx::Xf#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::Xf</small> + <small>Axlsx::Cell</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/Series.html#initialize-instance_method" title="Axlsx::Series#initialize (method)">#initialize</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::Series</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/Border.html#initialize-instance_method" title="Axlsx::Border#initialize (method)">#initialize</a></span> - <small>Axlsx::CellAlignment</small> + <small>Axlsx::Border</small> </li> <li class="r2 "> - <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/Xf.html#initialize-instance_method" title="Axlsx::Xf#initialize (method)">#initialize</a></span> - <small>Axlsx::ValAxis</small> + <small>Axlsx::Xf</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/GradientStop.html#initialize-instance_method" title="Axlsx::GradientStop#initialize (method)">#initialize</a></span> - <small>Axlsx::Core</small> + <small>Axlsx::GradientStop</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/GradientFill.html#initialize-instance_method" title="Axlsx::GradientFill#initialize (method)">#initialize</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::GradientFill</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> + + <small>Axlsx::Pic</small> + + </li> + + + <li class="r2 "> <span class='object_link'><a href="Axlsx/CellAlignment.html#justifyLastLine-instance_method" title="Axlsx::CellAlignment#justifyLastLine (method)">#justifyLastLine</a></span> <small>Axlsx::CellAlignment</small> @@ -1712,7 +1688,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/BarSeries.html#labels-instance_method" title="Axlsx::BarSeries#labels (method)">#labels</a></span> <small>Axlsx::BarSeries</small> @@ -1720,7 +1696,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/PieSeries.html#labels-instance_method" title="Axlsx::PieSeries#labels (method)">#labels</a></span> <small>Axlsx::PieSeries</small> @@ -1728,7 +1704,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/LineSeries.html#labels-instance_method" title="Axlsx::LineSeries#labels (method)">#labels</a></span> <small>Axlsx::LineSeries</small> @@ -1736,7 +1712,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/CatAxis.html#lblAlgn-instance_method" title="Axlsx::CatAxis#lblAlgn (method)">#lblAlgn</a></span> <small>Axlsx::CatAxis</small> @@ -1744,7 +1720,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/CatAxis.html#lblOffset-instance_method" title="Axlsx::CatAxis#lblOffset (method)">#lblOffset</a></span> <small>Axlsx::CatAxis</small> @@ -1752,7 +1728,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/GradientFill.html#left-instance_method" title="Axlsx::GradientFill#left (method)">#left</a></span> <small>Axlsx::GradientFill</small> @@ -1760,7 +1736,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/CellProtection.html#locked-instance_method" title="Axlsx::CellProtection#locked (method)">#locked</a></span> <small>Axlsx::CellProtection</small> @@ -1768,7 +1744,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Scaling.html#logBase-instance_method" title="Axlsx::Scaling#logBase (method)">#logBase</a></span> <small>Axlsx::Scaling</small> @@ -1776,7 +1752,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Scaling.html#max-instance_method" title="Axlsx::Scaling#max (method)">#max</a></span> <small>Axlsx::Scaling</small> @@ -1784,7 +1760,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Scaling.html#min-instance_method" title="Axlsx::Scaling#min (method)">#min</a></span> <small>Axlsx::Scaling</small> @@ -1792,6 +1768,14 @@ </li> + <li class="r1 "> + <span class='object_link'><a href="Axlsx/CellStyle.html#name-instance_method" title="Axlsx::CellStyle#name (method)">#name</a></span> + + <small>Axlsx::CellStyle</small> + + </li> + + <li class="r2 "> <span class='object_link'><a href="Axlsx/TableStyle.html#name-instance_method" title="Axlsx::TableStyle#name (method)">#name</a></span> @@ -1809,33 +1793,33 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#name-instance_method" title="Axlsx::Worksheet#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::Worksheet</small> + <small>Axlsx::BorderPr</small> </li> <li class="r1 "> - <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/Pic.html#name-instance_method" title="Axlsx::Pic#name (method)">#name</a></span> - <small>Axlsx::BorderPr</small> + <small>Axlsx::Pic</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellStyle.html#name-instance_method" title="Axlsx::CellStyle#name (method)">#name</a></span> + <span class='object_link'><a href="Axlsx/Worksheet.html#name-instance_method" title="Axlsx::Worksheet#name (method)">#name</a></span> - <small>Axlsx::CellStyle</small> + <small>Axlsx::Worksheet</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Pic.html#name-instance_method" title="Axlsx::Pic#name (method)">#name</a></span> + <span class='object_link'><a href="Axlsx/NumFmt.html#numFmtId-instance_method" title="Axlsx::NumFmt#numFmtId (method)">#numFmtId</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::NumFmt</small> </li> @@ -1849,17 +1833,17 @@ <li class="r1 "> - <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/Styles.html#numFmts-instance_method" title="Axlsx::Styles#numFmts (method)">#numFmts</a></span> - <small>Axlsx::NumFmt</small> + <small>Axlsx::Styles</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Styles.html#numFmts-instance_method" title="Axlsx::Styles#numFmts (method)">#numFmts</a></span> + <span class='object_link'><a href="Axlsx/OneCellAnchor.html#object-instance_method" title="Axlsx::OneCellAnchor#object (method)">#object</a></span> - <small>Axlsx::Styles</small> + <small>Axlsx::OneCellAnchor</small> </li> @@ -1873,14 +1857,6 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/OneCellAnchor.html#object-instance_method" title="Axlsx::OneCellAnchor#object (method)">#object</a></span> - - <small>Axlsx::OneCellAnchor</small> - - </li> - - - <li class="r1 "> <span class='object_link'><a href="Axlsx/Series.html#order-instance_method" title="Axlsx::Series#order (method)">#order</a></span> <small>Axlsx::Series</small> @@ -1888,7 +1864,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Series.html#order%3D-instance_method" title="Axlsx::Series#order= (method)">#order=</a></span> <small>Axlsx::Series</small> @@ -1896,7 +1872,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Scaling.html#orientation-instance_method" title="Axlsx::Scaling#orientation (method)">#orientation</a></span> <small>Axlsx::Scaling</small> @@ -1904,7 +1880,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Border.html#outline-instance_method" title="Axlsx::Border#outline (method)">#outline</a></span> <small>Axlsx::Border</small> @@ -1912,7 +1888,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#outline-instance_method" title="Axlsx::Font#outline (method)">#outline</a></span> <small>Axlsx::Font</small> @@ -1920,7 +1896,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/PatternFill.html#patternType-instance_method" title="Axlsx::PatternFill#patternType (method)">#patternType</a></span> <small>Axlsx::PatternFill</small> @@ -1928,7 +1904,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/View3D.html#perspective-instance_method" title="Axlsx::View3D#perspective (method)">#perspective</a></span> <small>Axlsx::View3D</small> @@ -1936,7 +1912,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/TableStyle.html#pivot-instance_method" title="Axlsx::TableStyle#pivot (method)">#pivot</a></span> <small>Axlsx::TableStyle</small> @@ -1944,7 +1920,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Xf.html#pivotButton-instance_method" title="Axlsx::Xf#pivotButton (method)">#pivotButton</a></span> <small>Axlsx::Xf</small> @@ -1952,18 +1928,10 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Chart.html#pn-instance_method" title="Axlsx::Chart#pn (method)">#pn</a></span> - - <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/Worksheet.html#pn-instance_method" title="Axlsx::Worksheet#pn (method)">#pn</a></span> - <small>Axlsx::Pic</small> + <small>Axlsx::Worksheet</small> </li> @@ -1977,14 +1945,22 @@ <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/Chart.html#pn-instance_method" title="Axlsx::Chart#pn (method)">#pn</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Chart</small> </li> <li class="r2 "> + <span class='object_link'><a href="Axlsx/Pic.html#pn-instance_method" title="Axlsx::Pic#pn (method)">#pn</a></span> + + <small>Axlsx::Pic</small> + + </li> + + + <li class="r1 "> <span class='object_link'><a href="Axlsx/GradientStop.html#position-instance_method" title="Axlsx::GradientStop#position (method)">#position</a></span> <small>Axlsx::GradientStop</small> @@ -1992,7 +1968,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Xf.html#protection-instance_method" title="Axlsx::Xf#protection (method)">#protection</a></span> <small>Axlsx::Xf</small> @@ -2000,7 +1976,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Border.html#prs-instance_method" title="Axlsx::Border#prs (method)">#prs</a></span> <small>Axlsx::Border</small> @@ -2008,7 +1984,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Xf.html#quotePrefix-instance_method" title="Axlsx::Xf#quotePrefix (method)">#quotePrefix</a></span> <small>Axlsx::Xf</small> @@ -2016,7 +1992,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Cell.html#r-instance_method" title="Axlsx::Cell#r (method)">#r</a></span> <small>Axlsx::Cell</small> @@ -2024,7 +2000,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/View3D.html#rAngAx-instance_method" title="Axlsx::View3D#rAngAx (method)">#rAngAx</a></span> <small>Axlsx::View3D</small> @@ -2032,15 +2008,15 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Drawing.html#rId-instance_method" title="Axlsx::Drawing#rId (method)">#rId</a></span> + <li class="r1 "> + <span class='object_link'><a href="Axlsx/Worksheet.html#rId-instance_method" title="Axlsx::Worksheet#rId (method)">#rId</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Worksheet</small> </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/GraphicFrame.html#rId-instance_method" title="Axlsx::GraphicFrame#rId (method)">#rId</a></span> <small>Axlsx::GraphicFrame</small> @@ -2048,15 +2024,15 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Worksheet.html#rId-instance_method" title="Axlsx::Worksheet#rId (method)">#rId</a></span> + <li class="r1 "> + <span class='object_link'><a href="Axlsx/Drawing.html#rId-instance_method" title="Axlsx::Drawing#rId (method)">#rId</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Drawing</small> </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Cell.html#r_abs-instance_method" title="Axlsx::Cell#r_abs (method)">#r_abs</a></span> <small>Axlsx::Cell</small> @@ -2064,7 +2040,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/CellAlignment.html#readingOrder-instance_method" title="Axlsx::CellAlignment#readingOrder (method)">#readingOrder</a></span> <small>Axlsx::CellAlignment</small> @@ -2072,6 +2048,14 @@ </li> + <li class="r2 "> + <span class='object_link'><a href="Axlsx/Worksheet.html#relationships-instance_method" title="Axlsx::Worksheet#relationships (method)">#relationships</a></span> + + <small>Axlsx::Worksheet</small> + + </li> + + <li class="r1 "> <span class='object_link'><a href="Axlsx/Workbook.html#relationships-instance_method" title="Axlsx::Workbook#relationships (method)">#relationships</a></span> @@ -2089,17 +2073,17 @@ <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/CellAlignment.html#relativeIndent-instance_method" title="Axlsx::CellAlignment#relativeIndent (method)">#relativeIndent</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::CellAlignment</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellAlignment.html#relativeIndent-instance_method" title="Axlsx::CellAlignment#relativeIndent (method)">#relativeIndent</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::CellAlignment</small> + <small>Axlsx::Worksheet</small> </li> @@ -2113,14 +2097,6 @@ <li class="r2 "> - <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::Worksheet</small> - - </li> - - - <li class="r1 "> <span class='object_link'><a href="Axlsx/Color.html#rgb-instance_method" title="Axlsx::Color#rgb (method)">#rgb</a></span> <small>Axlsx::Color</small> @@ -2128,7 +2104,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/GradientFill.html#right-instance_method" title="Axlsx::GradientFill#right (method)">#right</a></span> <small>Axlsx::GradientFill</small> @@ -2136,7 +2112,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/View3D.html#rotX-instance_method" title="Axlsx::View3D#rotX (method)">#rotX</a></span> <small>Axlsx::View3D</small> @@ -2144,7 +2120,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/View3D.html#rotY-instance_method" title="Axlsx::View3D#rotY (method)">#rotY</a></span> <small>Axlsx::View3D</small> @@ -2152,7 +2128,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Marker.html#row-instance_method" title="Axlsx::Marker#row (method)">#row</a></span> <small>Axlsx::Marker</small> @@ -2160,7 +2136,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Cell.html#row-instance_method" title="Axlsx::Cell#row (method)">#row</a></span> <small>Axlsx::Cell</small> @@ -2168,7 +2144,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Marker.html#rowOff-instance_method" title="Axlsx::Marker#rowOff (method)">#rowOff</a></span> <small>Axlsx::Marker</small> @@ -2176,7 +2152,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Worksheet.html#row_style-instance_method" title="Axlsx::Worksheet#row_style (method)">#row_style</a></span> <small>Axlsx::Worksheet</small> @@ -2184,7 +2160,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Worksheet.html#rows-instance_method" title="Axlsx::Worksheet#rows (method)">#rows</a></span> <small>Axlsx::Worksheet</small> @@ -2192,7 +2168,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Package.html#ruport_table-instance_method" title="Axlsx::Package#ruport_table (method)">#ruport_table</a></span> <small>Axlsx::Package</small> @@ -2200,7 +2176,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Axis.html#scaling-instance_method" title="Axlsx::Axis#scaling (method)">#scaling</a></span> <small>Axlsx::Axis</small> @@ -2208,7 +2184,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Line3DChart.html#serAxis-instance_method" title="Axlsx::Line3DChart#serAxis (method)">#serAxis</a></span> <small>Axlsx::Line3DChart</small> @@ -2216,7 +2192,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Package.html#serialize-instance_method" title="Axlsx::Package#serialize (method)">#serialize</a></span> <small>Axlsx::Package</small> @@ -2224,7 +2200,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Chart.html#series-instance_method" title="Axlsx::Chart#series (method)">#series</a></span> <small>Axlsx::Chart</small> @@ -2232,7 +2208,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Chart.html#series_type-instance_method" title="Axlsx::Chart#series_type (method)">#series_type</a></span> <small>Axlsx::Chart</small> @@ -2240,7 +2216,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Font.html#shadow-instance_method" title="Axlsx::Font#shadow (method)">#shadow</a></span> <small>Axlsx::Font</small> @@ -2248,7 +2224,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/BarSeries.html#shape-instance_method" title="Axlsx::BarSeries#shape (method)">#shape</a></span> <small>Axlsx::BarSeries</small> @@ -2256,7 +2232,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Bar3DChart.html#shape-instance_method" title="Axlsx::Bar3DChart#shape (method)">#shape</a></span> <small>Axlsx::Bar3DChart</small> @@ -2264,7 +2240,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Chart.html#show_legend-instance_method" title="Axlsx::Chart#show_legend (method)">#show_legend</a></span> <small>Axlsx::Chart</small> @@ -2272,7 +2248,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/CellAlignment.html#shrinkToFit-instance_method" title="Axlsx::CellAlignment#shrinkToFit (method)">#shrinkToFit</a></span> <small>Axlsx::CellAlignment</small> @@ -2280,7 +2256,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/TableStyleElement.html#size-instance_method" title="Axlsx::TableStyleElement#size (method)">#size</a></span> <small>Axlsx::TableStyleElement</small> @@ -2288,7 +2264,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Chart.html#start_at-instance_method" title="Axlsx::Chart#start_at (method)">#start_at</a></span> <small>Axlsx::Chart</small> @@ -2296,7 +2272,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Pic.html#start_at-instance_method" title="Axlsx::Pic#start_at (method)">#start_at</a></span> <small>Axlsx::Pic</small> @@ -2304,7 +2280,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/GradientFill.html#stop-instance_method" title="Axlsx::GradientFill#stop (method)">#stop</a></span> <small>Axlsx::GradientFill</small> @@ -2312,7 +2288,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#strike-instance_method" title="Axlsx::Font#strike (method)">#strike</a></span> <small>Axlsx::Font</small> @@ -2320,7 +2296,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/BorderPr.html#style-instance_method" title="Axlsx::BorderPr#style (method)">#style</a></span> <small>Axlsx::BorderPr</small> @@ -2328,7 +2304,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Chart.html#style-instance_method" title="Axlsx::Chart#style (method)">#style</a></span> <small>Axlsx::Chart</small> @@ -2336,7 +2312,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Cell.html#style-instance_method" title="Axlsx::Cell#style (method)">#style</a></span> <small>Axlsx::Cell</small> @@ -2344,7 +2320,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Row.html#style%3D-instance_method" title="Axlsx::Row#style= (method)">#style=</a></span> <small>Axlsx::Row</small> @@ -2352,7 +2328,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Workbook.html#styles-instance_method" title="Axlsx::Workbook#styles (method)">#styles</a></span> <small>Axlsx::Workbook</small> @@ -2360,7 +2336,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Font.html#sz-instance_method" title="Axlsx::Font#sz (method)">#sz</a></span> <small>Axlsx::Font</small> @@ -2368,7 +2344,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/TableStyle.html#table-instance_method" title="Axlsx::TableStyle#table (method)">#table</a></span> <small>Axlsx::TableStyle</small> @@ -2376,7 +2352,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Styles.html#tableStyles-instance_method" title="Axlsx::Styles#tableStyles (method)">#tableStyles</a></span> <small>Axlsx::Styles</small> @@ -2384,7 +2360,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Title.html#text-instance_method" title="Axlsx::Title#text (method)">#text</a></span> <small>Axlsx::Title</small> @@ -2392,7 +2368,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/CellAlignment.html#textRotation-instance_method" title="Axlsx::CellAlignment#textRotation (method)">#textRotation</a></span> <small>Axlsx::CellAlignment</small> @@ -2400,7 +2376,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/Axis.html#tickLblPos-instance_method" title="Axlsx::Axis#tickLblPos (method)">#tickLblPos</a></span> <small>Axlsx::Axis</small> @@ -2408,7 +2384,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/SerAxis.html#tickLblSkip-instance_method" title="Axlsx::SerAxis#tickLblSkip (method)">#tickLblSkip</a></span> <small>Axlsx::SerAxis</small> @@ -2416,7 +2392,7 @@ </li> - <li class="r2 "> + <li class="r1 "> <span class='object_link'><a href="Axlsx/SerAxis.html#tickMarkSkip-instance_method" title="Axlsx::SerAxis#tickMarkSkip (method)">#tickMarkSkip</a></span> <small>Axlsx::SerAxis</small> @@ -2424,7 +2400,7 @@ </li> - <li class="r1 "> + <li class="r2 "> <span class='object_link'><a href="Axlsx/Color.html#tint-instance_method" title="Axlsx::Color#tint (method)">#tint</a></span> <small>Axlsx::Color</small> @@ -2432,26 +2408,18 @@ </li> - <li class="r2 "> - <span class='object_link'><a href="Axlsx/Series.html#title-instance_method" title="Axlsx::Series#title (method)">#title</a></span> - - <small>Axlsx::Series</small> - - </li> - - <li class="r1 "> - <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="r2 "> - <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#to-instance_method" title="Axlsx::TwoCellAnchor#to (method)">#to</a></span> + <span class='object_link'><a href="Axlsx/Chart.html#title-instance_method" title="Axlsx::Chart#title (method)">#title</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::Chart</small> </li> @@ -2465,33 +2433,33 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/Ar/SingletonMethods.html#to_xlsx-instance_method" title="Axlsx::Ar::SingletonMethods#to_xlsx (method)">#to_xlsx</a></span> + <span class='object_link'><a href="Axlsx/TwoCellAnchor.html#to-instance_method" title="Axlsx::TwoCellAnchor#to (method)">#to</a></span> - <small>Axlsx::Ar::SingletonMethods</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r1 "> - <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/Row.html#to_ary-instance_method" title="Axlsx::Row#to_ary (method)">#to_ary</a></span> - <small>Axlsx::CatAxisData</small> + <small>Axlsx::Row</small> </li> <li class="r2 "> - <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/Ar/SingletonMethods.html#to_xlsx-instance_method" title="Axlsx::Ar::SingletonMethods#to_xlsx (method)">#to_xlsx</a></span> - <small>Axlsx::GradientFill</small> + <small>Axlsx::Ar::SingletonMethods</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/Styles.html#to_xml-instance_method" title="Axlsx::Styles#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GraphicFrame</small> + <small>Axlsx::Styles</small> </li> @@ -2505,177 +2473,177 @@ <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/Core.html#to_xml-instance_method" title="Axlsx::Core#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Relationship</small> + <small>Axlsx::Core</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/Row.html#to_xml-instance_method" title="Axlsx::Row#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Worksheet</small> + <small>Axlsx::Row</small> </li> <li class="r1 "> - <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/Marker.html#to_xml-instance_method" title="Axlsx::Marker#to_xml (method)">#to_xml</a></span> - <small>Axlsx::TableStyle</small> + <small>Axlsx::Marker</small> </li> <li class="r2 "> - <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/PatternFill.html#to_xml-instance_method" title="Axlsx::PatternFill#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CatAxis</small> + <small>Axlsx::PatternFill</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/Drawing.html#to_xml-instance_method" title="Axlsx::Drawing#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Scaling</small> + <small>Axlsx::Drawing</small> </li> <li class="r2 "> - <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/Border.html#to_xml-instance_method" title="Axlsx::Border#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GradientStop</small> + <small>Axlsx::Border</small> </li> <li class="r1 "> - <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/GraphicFrame.html#to_xml-instance_method" title="Axlsx::GraphicFrame#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Core</small> + <small>Axlsx::GraphicFrame</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/TableStyles.html#to_xml-instance_method" title="Axlsx::TableStyles#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Cell</small> + <small>Axlsx::TableStyles</small> </li> <li class="r1 "> - <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/Fill.html#to_xml-instance_method" title="Axlsx::Fill#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Line3DChart</small> + <small>Axlsx::Fill</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/Line3DChart.html#to_xml-instance_method" title="Axlsx::Line3DChart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Override</small> + <small>Axlsx::Line3DChart</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/TableStyles.html#to_xml-instance_method" title="Axlsx::TableStyles#to_xml (method)">#to_xml</a></span> + <span class='object_link'><a href="Axlsx/CellProtection.html#to_xml-instance_method" title="Axlsx::CellProtection#to_xml (method)">#to_xml</a></span> - <small>Axlsx::TableStyles</small> + <small>Axlsx::CellProtection</small> </li> <li class="r2 "> - <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/Workbook.html#to_xml-instance_method" title="Axlsx::Workbook#to_xml (method)">#to_xml</a></span> - <small>Axlsx::App</small> + <small>Axlsx::Workbook</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/Chart.html#to_xml-instance_method" title="Axlsx::Chart#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::Chart</small> + <small>Axlsx::Pic</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/Pie3DChart.html#to_xml-instance_method" title="Axlsx::Pie3DChart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::SeriesTitle</small> + <small>Axlsx::Pie3DChart</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/PieSeries.html#to_xml-instance_method" title="Axlsx::PieSeries#to_xml (method)">#to_xml</a></span> - <small>Axlsx::OneCellAnchor</small> + <small>Axlsx::PieSeries</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/Cell.html#to_xml-instance_method" title="Axlsx::Cell#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Relationships</small> + <small>Axlsx::Cell</small> </li> <li class="r2 "> - <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/Xf.html#to_xml-instance_method" title="Axlsx::Xf#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Series</small> + <small>Axlsx::Xf</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/CatAxisData.html#to_xml-instance_method" title="Axlsx::CatAxisData#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CellStyle</small> + <small>Axlsx::CatAxisData</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/Font.html#to_xml-instance_method" title="Axlsx::Font#to_xml (method)">#to_xml</a></span> - <small>Axlsx::ValAxisData</small> + <small>Axlsx::Font</small> </li> <li class="r1 "> - <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/Relationship.html#to_xml-instance_method" title="Axlsx::Relationship#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Workbook</small> + <small>Axlsx::Relationship</small> </li> <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/Override.html#to_xml-instance_method" title="Axlsx::Override#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Override</small> </li> @@ -2689,225 +2657,225 @@ <li class="r2 "> - <span class='object_link'><a href="Axlsx/CellProtection.html#to_xml-instance_method" title="Axlsx::CellProtection#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::CellProtection</small> + <small>Axlsx::BorderPr</small> </li> <li class="r1 "> - <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/OneCellAnchor.html#to_xml-instance_method" title="Axlsx::OneCellAnchor#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Styles</small> + <small>Axlsx::OneCellAnchor</small> </li> <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/Worksheet.html#to_xml-instance_method" title="Axlsx::Worksheet#to_xml (method)">#to_xml</a></span> - <small>Axlsx::SerAxis</small> + <small>Axlsx::Worksheet</small> </li> <li class="r1 "> - <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/ValAxis.html#to_xml-instance_method" title="Axlsx::ValAxis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Default</small> + <small>Axlsx::ValAxis</small> </li> <li class="r2 "> - <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/CellStyle.html#to_xml-instance_method" title="Axlsx::CellStyle#to_xml (method)">#to_xml</a></span> - <small>Axlsx::TwoCellAnchor</small> + <small>Axlsx::CellStyle</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/App.html#to_xml-instance_method" title="Axlsx::App#to_xml (method)">#to_xml</a></span> - <small>Axlsx::NumFmt</small> + <small>Axlsx::App</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/Title.html#to_xml-instance_method" title="Axlsx::Title#to_xml (method)">#to_xml</a></span> - <small>Axlsx::ValAxis</small> + <small>Axlsx::Title</small> </li> <li class="r1 "> - <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/CellAlignment.html#to_xml-instance_method" title="Axlsx::CellAlignment#to_xml (method)">#to_xml</a></span> - <small>Axlsx::PatternFill</small> + <small>Axlsx::CellAlignment</small> </li> <li class="r2 "> - <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/Axis.html#to_xml-instance_method" title="Axlsx::Axis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Xf</small> + <small>Axlsx::Axis</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/TwoCellAnchor.html#to_xml-instance_method" title="Axlsx::TwoCellAnchor#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Fill</small> + <small>Axlsx::TwoCellAnchor</small> </li> <li class="r2 "> - <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/SeriesTitle.html#to_xml-instance_method" title="Axlsx::SeriesTitle#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Marker</small> + <small>Axlsx::SeriesTitle</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Color.html#to_xml-instance_method" title="Axlsx::Color#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::Color</small> + <small>Axlsx::Chart</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/NumFmt.html#to_xml-instance_method" title="Axlsx::NumFmt#to_xml (method)">#to_xml</a></span> - <small>Axlsx::LineSeries</small> + <small>Axlsx::NumFmt</small> </li> <li class="r1 "> - <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/SerAxis.html#to_xml-instance_method" title="Axlsx::SerAxis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Border</small> + <small>Axlsx::SerAxis</small> </li> <li class="r2 "> - <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="r1 "> - <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/TableStyle.html#to_xml-instance_method" title="Axlsx::TableStyle#to_xml (method)">#to_xml</a></span> - <small>Axlsx::CellAlignment</small> + <small>Axlsx::TableStyle</small> </li> <li class="r2 "> - <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/BarSeries.html#to_xml-instance_method" title="Axlsx::BarSeries#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Bar3DChart</small> + <small>Axlsx::BarSeries</small> </li> <li class="r1 "> - <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/Default.html#to_xml-instance_method" title="Axlsx::Default#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Title</small> + <small>Axlsx::Default</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Pic.html#to_xml-instance_method" title="Axlsx::Pic#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::Pic</small> + <small>Axlsx::GradientFill</small> </li> <li class="r1 "> - <span class='object_link'><a href="Axlsx/Axis.html#to_xml-instance_method" title="Axlsx::Axis#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::Axis</small> + <small>Axlsx::LineSeries</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/CatAxis.html#to_xml-instance_method" title="Axlsx::CatAxis#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Font</small> + <small>Axlsx::CatAxis</small> </li> <li class="r1 "> - <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/Relationships.html#to_xml-instance_method" title="Axlsx::Relationships#to_xml (method)">#to_xml</a></span> - <small>Axlsx::PieSeries</small> + <small>Axlsx::Relationships</small> </li> <li class="r2 "> - <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/GradientStop.html#to_xml-instance_method" title="Axlsx::GradientStop#to_xml (method)">#to_xml</a></span> - <small>Axlsx::View3D</small> + <small>Axlsx::GradientStop</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/Bar3DChart.html#to_xml-instance_method" title="Axlsx::Bar3DChart#to_xml (method)">#to_xml</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::Bar3DChart</small> </li> <li class="r2 "> - <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/Color.html#to_xml-instance_method" title="Axlsx::Color#to_xml (method)">#to_xml</a></span> - <small>Axlsx::BarSeries</small> + <small>Axlsx::Color</small> </li> <li class="r1 "> - <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/ValAxisData.html#to_xml-instance_method" title="Axlsx::ValAxisData#to_xml (method)">#to_xml</a></span> - <small>Axlsx::GradientFill</small> + <small>Axlsx::ValAxisData</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/TableStyleElement.html#type-instance_method" title="Axlsx::TableStyleElement#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::TableStyleElement</small> + <small>Axlsx::GradientFill</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/TableStyleElement.html#type-instance_method" title="Axlsx::TableStyleElement#type (method)">#type</a></span> - <small>Axlsx::GradientFill</small> + <small>Axlsx::TableStyleElement</small> </li> @@ -2921,9 +2889,9 @@ <li class="r1 "> - <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> @@ -2945,33 +2913,33 @@ <li class="r2 "> - <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="r1 "> - <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/RestrictionValidator.html#validate-class_method" title="Axlsx::RestrictionValidator.validate (method)">validate</a></span> - <small>Axlsx::Package</small> + <small>Axlsx::RestrictionValidator</small> </li> <li class="r2 "> - <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="r1 "> - <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/RegexValidator.html#validate-class_method" title="Axlsx::RegexValidator.validate (method)">validate</a></span> - <small>Axlsx::DataTypeValidator</small> + <small>Axlsx::RegexValidator</small> </li> @@ -3097,17 +3065,17 @@ <li class="r1 "> - <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="r2 "> - <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> @@ -3145,17 +3113,17 @@ <li class="r1 "> - <span class='object_link'><a href="Axlsx/Drawing.html#worksheet-instance_method" title="Axlsx::Drawing#worksheet (method)">#worksheet</a></span> + <span class='object_link'><a href="Axlsx/Row.html#worksheet-instance_method" title="Axlsx::Row#worksheet (method)">#worksheet</a></span> - <small>Axlsx::Drawing</small> + <small>Axlsx::Row</small> </li> <li class="r2 "> - <span class='object_link'><a href="Axlsx/Row.html#worksheet-instance_method" title="Axlsx::Row#worksheet (method)">#worksheet</a></span> + <span class='object_link'><a href="Axlsx/Drawing.html#worksheet-instance_method" title="Axlsx::Drawing#worksheet (method)">#worksheet</a></span> - <small>Axlsx::Row</small> + <small>Axlsx::Drawing</small> </li> diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index e1066280..4368cb58 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 18:05:21 2011 by + Generated on Sun Nov 27 20:28:16 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/package.rb b/lib/axlsx/package.rb index 921646da..5c46776c 100644 --- a/lib/axlsx/package.rb +++ b/lib/axlsx/package.rb @@ -36,6 +36,8 @@ module Axlsx # wb = Package.new().workbook = Workbook.new def workbook @workbook || @workbook = Workbook.new + yield @workbook if block_given? + @workbook end # @see workbook diff --git a/lib/axlsx/util/simple_typed_list.rb b/lib/axlsx/util/simple_typed_list.rb index 53b7b994..78d31dc7 100644 --- a/lib/axlsx/util/simple_typed_list.rb +++ b/lib/axlsx/util/simple_typed_list.rb @@ -38,6 +38,10 @@ module Axlsx @locked_at = @list.size self end + + def to_ary + @list + end # Unlock the list # @return [self] @@ -152,4 +156,5 @@ module Axlsx end end + end diff --git a/lib/axlsx/version.rb b/lib/axlsx/version.rb index 92993f79..b0681d8c 100644 --- a/lib/axlsx/version.rb +++ b/lib/axlsx/version.rb @@ -1,4 +1,4 @@ module Axlsx # version - VERSION="1.0.10" + VERSION="1.0.10a" end diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb index 68f9f8b8..65020e71 100644 --- a/lib/axlsx/workbook/workbook.rb +++ b/lib/axlsx/workbook/workbook.rb @@ -63,8 +63,10 @@ require 'axlsx/workbook/worksheet/worksheet.rb' # @see Style#add_style # @see Style # @return [Styles] - attr_reader :styles - + def styles + yield @styles if block_given? + @styles + end # Indicates if the epoc date for serialization should be 1904. If false, 1900 is used. diff --git a/lib/axlsx/workbook/worksheet/row.rb b/lib/axlsx/workbook/worksheet/row.rb index 442dcf7b..0e5333b9 100644 --- a/lib/axlsx/workbook/worksheet/row.rb +++ b/lib/axlsx/workbook/worksheet/row.rb @@ -62,6 +62,10 @@ module Axlsx end end + def to_ary + @cells.to_ary + end + private # assigns the owning worksheet for this row @@ -73,6 +77,7 @@ module Axlsx worksheet.send(:update_auto_fit_data, self.cells) end + # Converts values, types, and style options into cells and associates them with this row. # A new cell is created for each item in the values array. # If value option is defined and is a symbol it is applied to all the cells created. diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index 65f620e4..285e4307 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -39,6 +39,7 @@ module Axlsx @auto_fit_data = [] self.name = options[:name] || "Sheet" + (index+1).to_s @magick_draw = Magick::Draw.new + @cols = SimpleTypedList.new Cell end # The name of the worksheet @@ -90,16 +91,25 @@ module Axlsx end # Set the style for cells in a specific row - # @param [Integer] index the index of the row + # @param [Integer] index or range of indexes in the table # @param [Integer] the cellXfs index # @option options [Integer] col_offset only cells after this column will be updated. # @note You can also specify the style in the add_row call # @see Worksheet#add_row # @see README.md for an example def row_style(index, style, options={}) - raise ArgumentError, "Invalid Row Index" unless index < @rows.size offset = options.delete(:col_offset) || 0 - @rows[index].cells[(offset..-1)].each { |c| c.style = style } + 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 + + # returns the sheet data as columnw + def cols + @rows.transpose end @@ -111,11 +121,17 @@ module Axlsx # @see Worksheet#add_row # @see README.md for an example def col_style(index, style, options={}) - raise ArgumentError, "Invalid Column Index" unless index < @rows.first.cells.size offset = options.delete(:row_offset) || 0 - @rows[(offset..-1)].each { |r| r.cells[index].style = style } + @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 - + # 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. # @param [Class] chart_type # @option options [Array] start_at diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index 6bdf5f20..b6865bd6 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -51,14 +51,25 @@ class TestWorksheet < Test::Unit::TestCase @ws.add_row [1,2,3,4] @ws.add_row [1,2,3,4] @ws.add_row [1,2,3,4] - @ws.col_style 1, 1, :row_offset=>1 + @ws.col_style (1..2), 1, :row_offset=>1 @ws.rows[(1..-1)].each do | r | assert_equal(r.cells[1].style, 1) + assert_equal(r.cells[2].style, 1) end assert_equal(@ws.rows.first.cells[1].style, 0) assert_equal(@ws.rows.first.cells[0].style, 0) end + def test_cols + @ws.add_row [1,2,3,4] + @ws.add_row [1,2,3,4] + @ws.add_row [1,2,3,4] + @ws.add_row [1,2,3,4] + c = @ws.cols[1] + assert_equal(c.size, 4) + assert_equal(c[0].value, 2) + end + def test_row_style @ws.add_row [1,2,3,4] @ws.add_row [1,2,3,4] -- cgit v1.2.3