From 8cf0296bbc16e8eb535e9af932eed2557d5e66d2 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Thu, 1 Dec 2011 14:11:42 +0900 Subject: removing generated yard docs from repository --- doc/Axlsx.html | 2484 --------------------------- doc/Axlsx/App.html | 2562 ---------------------------- doc/Axlsx/Ar.html | 196 --- doc/Axlsx/Ar/ClassMethods.html | 188 -- doc/Axlsx/Ar/InstanceMethods.html | 108 -- doc/Axlsx/Ar/SingletonMethods.html | 312 ---- doc/Axlsx/Axis.html | 1051 ------------ doc/Axlsx/Bar3DChart.html | 1160 ------------- doc/Axlsx/BarSeries.html | 697 -------- doc/Axlsx/Border.html | 759 --------- doc/Axlsx/BorderPr.html | 691 -------- doc/Axlsx/CatAxis.html | 750 -------- doc/Axlsx/CatAxisData.html | 390 ----- doc/Axlsx/Cell.html | 1558 ----------------- doc/Axlsx/CellAlignment.html | 1219 ------------- doc/Axlsx/CellProtection.html | 551 ------ doc/Axlsx/CellStyle.html | 929 ---------- doc/Axlsx/Chart.html | 1641 ------------------ doc/Axlsx/Color.html | 649 ------- doc/Axlsx/ContentType.html | 329 ---- doc/Axlsx/Core.html | 456 ----- doc/Axlsx/DataTypeValidator.html | 316 ---- doc/Axlsx/Default.html | 553 ------ doc/Axlsx/Drawing.html | 1230 -------------- doc/Axlsx/Fill.html | 450 ----- doc/Axlsx/Font.html | 1520 ----------------- doc/Axlsx/GradientFill.html | 1004 ----------- doc/Axlsx/GradientStop.html | 516 ------ doc/Axlsx/GraphicFrame.html | 629 ------- doc/Axlsx/Line3DChart.html | 985 ----------- doc/Axlsx/LineSeries.html | 593 ------- doc/Axlsx/Marker.html | 837 --------- doc/Axlsx/NumFmt.html | 548 ------ doc/Axlsx/OneCellAnchor.html | 958 ----------- doc/Axlsx/Override.html | 540 ------ doc/Axlsx/Package.html | 885 ---------- doc/Axlsx/PatternFill.html | 666 -------- doc/Axlsx/Pic.html | 1594 ----------------- doc/Axlsx/Pie3DChart.html | 482 ------ doc/Axlsx/PieSeries.html | 696 -------- doc/Axlsx/RegexValidator.html | 264 --- doc/Axlsx/Relationship.html | 541 ------ doc/Axlsx/Relationships.html | 332 ---- doc/Axlsx/RestrictionValidator.html | 292 ---- doc/Axlsx/Row.html | 896 ---------- doc/Axlsx/Scaling.html | 727 -------- doc/Axlsx/SerAxis.html | 625 ------- doc/Axlsx/Series.html | 797 --------- doc/Axlsx/SeriesTitle.html | 286 ---- doc/Axlsx/Styles.html | 1700 ------------------- doc/Axlsx/TableStyle.html | 690 -------- doc/Axlsx/TableStyleElement.html | 663 -------- doc/Axlsx/TableStyles.html | 580 ------- doc/Axlsx/Title.html | 532 ------ doc/Axlsx/TwoCellAnchor.html | 948 ----------- doc/Axlsx/ValAxis.html | 527 ------ doc/Axlsx/ValAxisData.html | 317 ---- doc/Axlsx/View3D.html | 952 ----------- doc/Axlsx/Workbook.html | 1472 ---------------- doc/Axlsx/Worksheet.html | 2386 -------------------------- doc/Axlsx/Xf.html | 1743 ------------------- doc/_index.html | 635 ------- doc/class_list.html | 47 - doc/css/common.css | 1 - doc/css/full_list.css | 55 - doc/css/style.css | 322 ---- doc/file.LICENSE.html | 87 - doc/file.README.html | 315 ---- doc/file_list.html | 52 - doc/frames.html | 13 - doc/index.html | 315 ---- doc/js/app.js | 205 --- doc/js/full_list.js | 167 -- doc/js/jquery.js | 16 - doc/method_list.html | 3198 ----------------------------------- doc/top-level-namespace.html | 103 -- 76 files changed, 56483 deletions(-) delete mode 100644 doc/Axlsx.html delete mode 100644 doc/Axlsx/App.html delete mode 100644 doc/Axlsx/Ar.html delete mode 100644 doc/Axlsx/Ar/ClassMethods.html delete mode 100644 doc/Axlsx/Ar/InstanceMethods.html delete mode 100644 doc/Axlsx/Ar/SingletonMethods.html delete mode 100644 doc/Axlsx/Axis.html delete mode 100644 doc/Axlsx/Bar3DChart.html delete mode 100644 doc/Axlsx/BarSeries.html delete mode 100644 doc/Axlsx/Border.html delete mode 100644 doc/Axlsx/BorderPr.html delete mode 100644 doc/Axlsx/CatAxis.html delete mode 100644 doc/Axlsx/CatAxisData.html delete mode 100644 doc/Axlsx/Cell.html delete mode 100644 doc/Axlsx/CellAlignment.html delete mode 100644 doc/Axlsx/CellProtection.html delete mode 100644 doc/Axlsx/CellStyle.html delete mode 100644 doc/Axlsx/Chart.html delete mode 100644 doc/Axlsx/Color.html delete mode 100644 doc/Axlsx/ContentType.html delete mode 100644 doc/Axlsx/Core.html delete mode 100644 doc/Axlsx/DataTypeValidator.html delete mode 100644 doc/Axlsx/Default.html delete mode 100644 doc/Axlsx/Drawing.html delete mode 100644 doc/Axlsx/Fill.html delete mode 100644 doc/Axlsx/Font.html delete mode 100644 doc/Axlsx/GradientFill.html delete mode 100644 doc/Axlsx/GradientStop.html delete mode 100644 doc/Axlsx/GraphicFrame.html delete mode 100644 doc/Axlsx/Line3DChart.html delete mode 100644 doc/Axlsx/LineSeries.html delete mode 100644 doc/Axlsx/Marker.html delete mode 100644 doc/Axlsx/NumFmt.html delete mode 100644 doc/Axlsx/OneCellAnchor.html delete mode 100644 doc/Axlsx/Override.html delete mode 100644 doc/Axlsx/Package.html delete mode 100644 doc/Axlsx/PatternFill.html delete mode 100644 doc/Axlsx/Pic.html delete mode 100644 doc/Axlsx/Pie3DChart.html delete mode 100644 doc/Axlsx/PieSeries.html delete mode 100644 doc/Axlsx/RegexValidator.html delete mode 100644 doc/Axlsx/Relationship.html delete mode 100644 doc/Axlsx/Relationships.html delete mode 100644 doc/Axlsx/RestrictionValidator.html delete mode 100644 doc/Axlsx/Row.html delete mode 100644 doc/Axlsx/Scaling.html delete mode 100644 doc/Axlsx/SerAxis.html delete mode 100644 doc/Axlsx/Series.html delete mode 100644 doc/Axlsx/SeriesTitle.html delete mode 100644 doc/Axlsx/Styles.html delete mode 100644 doc/Axlsx/TableStyle.html delete mode 100644 doc/Axlsx/TableStyleElement.html delete mode 100644 doc/Axlsx/TableStyles.html delete mode 100644 doc/Axlsx/Title.html delete mode 100644 doc/Axlsx/TwoCellAnchor.html delete mode 100644 doc/Axlsx/ValAxis.html delete mode 100644 doc/Axlsx/ValAxisData.html delete mode 100644 doc/Axlsx/View3D.html delete mode 100644 doc/Axlsx/Workbook.html delete mode 100644 doc/Axlsx/Worksheet.html delete mode 100644 doc/Axlsx/Xf.html delete mode 100644 doc/_index.html delete mode 100644 doc/class_list.html delete mode 100644 doc/css/common.css delete mode 100644 doc/css/full_list.css delete mode 100644 doc/css/style.css delete mode 100644 doc/file.LICENSE.html delete mode 100644 doc/file.README.html delete mode 100644 doc/file_list.html delete mode 100644 doc/frames.html delete mode 100644 doc/index.html delete mode 100644 doc/js/app.js delete mode 100644 doc/js/full_list.js delete mode 100644 doc/js/jquery.js delete mode 100644 doc/method_list.html delete mode 100644 doc/top-level-namespace.html diff --git a/doc/Axlsx.html b/doc/Axlsx.html deleted file mode 100644 index 402e44ca..00000000 --- a/doc/Axlsx.html +++ /dev/null @@ -1,2484 +0,0 @@ - - - - - - Module: Axlsx - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Module: Axlsx - - - -

- -
- - - - - - - - -
Defined in:
-
lib/axlsx.rb,
- lib/axlsx/version.rb,
lib/axlsx/package.rb,
lib/axlsx/drawing/pic.rb,
lib/axlsx/drawing/axis.rb,
lib/axlsx/doc_props/app.rb,
lib/axlsx/drawing/title.rb,
lib/axlsx/drawing/chart.rb,
lib/axlsx/stylesheet/xf.rb,
lib/axlsx/doc_props/core.rb,
lib/axlsx/drawing/series.rb,
lib/axlsx/drawing/marker.rb,
lib/axlsx/util/constants.rb,
lib/axlsx/stylesheet/font.rb,
lib/axlsx/drawing/view_3D.rb,
lib/axlsx/drawing/drawing.rb,
lib/axlsx/stylesheet/fill.rb,
lib/axlsx/util/validators.rb,
lib/axlsx/drawing/scaling.rb,
lib/axlsx/drawing/cat_axis.rb,
lib/axlsx/stylesheet/color.rb,
lib/axlsx/drawing/ser_axis.rb,
lib/axlsx/drawing/val_axis.rb,
lib/axlsx/stylesheet/border.rb,
lib/axlsx/workbook/workbook.rb,
lib/axlsx/stylesheet/styles.rb,
lib/axlsx/rels/relationship.rb,
lib/axlsx/stylesheet/num_fmt.rb,
lib/axlsx/drawing/bar_series.rb,
lib/axlsx/rels/relationships.rb,
lib/axlsx/drawing/pie_series.rb,
lib/axlsx/drawing/line_series.rb,
lib/axlsx/drawing/bar_3D_chart.rb,
lib/axlsx/stylesheet/border_pr.rb,
lib/axlsx/content_type/default.rb,
lib/axlsx/drawing/series_title.rb,
lib/axlsx/drawing/pie_3D_chart.rb,
lib/axlsx/drawing/val_axis_data.rb,
lib/axlsx/drawing/graphic_frame.rb,
lib/axlsx/drawing/line_3D_chart.rb,
lib/axlsx/content_type/override.rb,
lib/axlsx/drawing/cat_axis_data.rb,
lib/axlsx/stylesheet/cell_style.rb,
lib/axlsx/util/simple_typed_list.rb,
lib/axlsx/workbook/worksheet/row.rb,
lib/axlsx/stylesheet/table_style.rb,
lib/axlsx/drawing/one_cell_anchor.rb,
lib/axlsx/stylesheet/table_styles.rb,
lib/axlsx/workbook/worksheet/cell.rb,
lib/axlsx/drawing/two_cell_anchor.rb,
lib/axlsx/stylesheet/pattern_fill.rb,
lib/axlsx/stylesheet/gradient_stop.rb,
lib/axlsx/stylesheet/gradient_fill.rb,
lib/axlsx/stylesheet/cell_alignment.rb,
lib/axlsx/content_type/content_type.rb,
lib/axlsx/stylesheet/cell_protection.rb,
lib/axlsx/workbook/worksheet/worksheet.rb,
lib/axlsx/stylesheet/table_style_element.rb
-
- -
-
- -

Overview

-
- -

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.

- - -
-
-
- - -

Defined Under Namespace

-

- - - - - Classes: App, Axis, Bar3DChart, BarSeries, Border, BorderPr, CatAxis, CatAxisData, Cell, CellAlignment, CellProtection, CellStyle, Chart, Color, ContentType, Core, DataTypeValidator, Default, Drawing, Fill, Font, GradientFill, GradientStop, GraphicFrame, Line3DChart, LineSeries, Marker, NumFmt, OneCellAnchor, Override, Package, PatternFill, Pic, Pie3DChart, PieSeries, RegexValidator, Relationship, Relationships, RestrictionValidator, Row, Scaling, SerAxis, Series, SeriesTitle, Styles, TableStyle, TableStyleElement, TableStyles, Title, TwoCellAnchor, ValAxis, ValAxisData, View3D, Workbook, Worksheet, Xf - - -

- -

Constant Summary

- -
- -
VERSION = -
-
- -

version

- - -
-
-
- - -
-
-
"1.0.10"
-
- -
ENCODING = -
-
- -

XML Encoding

- - -
-
-
- - -
-
-
"UTF-8"
-
- -
XML_NS = -
-
- -

spreadsheetML namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/spreadsheetml/2006/main"
-
- -
XML_NS_T = -
-
- -

content-types namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/package/2006/content-types"
-
- -
APP_NS = -
-
- -

extended-properties namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
-
- -
APP_NS_VT = -
-
- -

doc props namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"
-
- -
CORE_NS = -
-
- -

core properties namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/package/2006/metadata/core-properties"
-
- -
CORE_NS_DC = -
-
- -

dc elements (core) namespace

- - -
-
-
- - -
-
-
"http://purl.org/dc/elements/1.1/"
-
- -
CORE_NS_DCMIT = -
-
- -

dcmit (core) namespcace

- - -
-
-
- - -
-
-
"http://purl.org/dc/dcmitype/"
-
- -
CORE_NS_DCT = -
-
- -

dc terms namespace

- - -
-
-
- - -
-
-
"http://purl.org/dc/terms/"
-
- -
CORE_NS_XSI = -
-
- -

xml schema namespace

- - -
-
-
- - -
-
-
"http://www.w3.org/2001/XMLSchema-instance"
-
- -
XML_NS_XDR = -
-
- -

spreadsheet drawing namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"
-
- -
XML_NS_A = -
-
- -

drawing namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/drawingml/2006/main"
-
- -
XML_NS_C = -
-
- -

chart namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/drawingml/2006/chart"
-
- -
XML_NS_R = -
-
- -

relationships namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships"
-
- -
RELS_R = -
-
- -

relationships name space

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/package/2006/relationships"
-
- -
TABLE_R = -
-
- -

table rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"
-
- -
WORKBOOK_R = -
-
- -

workbook rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
-
- -
WORKSHEET_R = -
-
- -

worksheet rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"
-
- -
APP_R = -
-
- -

app rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
-
- -
CORE_R = -
-
- -

core rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/metadata/core-properties"
-
- -
STYLES_R = -
-
- -

styles rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"
-
- -
DRAWING_R = -
-
- -

drawing rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing"
-
- -
CHART_R = -
-
- -

chart rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"
-
- -
IMAGE_R = -
-
- -

image rels namespace

- - -
-
-
- - -
-
-
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
-
- -
TABLE_CT = -
-
- -

table content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"
-
- -
WORKBOOK_CT = -
-
- -

workbook content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
-
- -
APP_CT = -
-
- -

app content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.extended-properties+xml"
-
- -
RELS_CT = -
-
- -

rels content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-package.relationships+xml"
-
- -
STYLES_CT = -
-
- -

styles content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"
-
- -
XML_CT = -
-
- -

xml content type

- - -
-
-
- - -
-
-
"application/xml"
-
- -
WORKSHEET_CT = -
-
- -

worksheet content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"
-
- -
SHARED_STRINGS_CT = -
-
- -

shared strings content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"
-
- -
CORE_CT = -
-
- -

core content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-package.core-properties+xml"
-
- -
CHART_CT = -
-
- -

chart content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
-
- -
JPEG_CT = -
-
- -

jpeg content type

- - -
-
-
- - -
-
-
"image/jpeg"
-
- -
GIF_CT = -
-
- -

gif content type

- - -
-
-
- - -
-
-
"image/gif"
-
- -
PNG_CT = -
-
- -

png content type

- - -
-
-
- - -
-
-
"image/png"
-
- -
DRAWING_CT = -
-
- -

drawing content type

- - -
-
-
- - -
-
-
"application/vnd.openxmlformats-officedocument.drawing+xml"
-
- -
XML_EX = -
-
- -

xml content type extensions

- - -
-
-
- - -
-
-
"xml"
-
- -
JPEG_EX = -
-
- -

jpeg extension

- - -
-
-
- - -
-
-
"jpeg"
-
- -
GIF_EX = -
-
- -

gif extension

- - -
-
-
- - -
-
-
"gif"
-
- -
PNG_EX = -
-
- -

png extension

- - -
-
-
- - -
-
-
"png"
-
- -
RELS_EX = -
-
- -

rels content type extension

- - -
-
-
- - -
-
-
"rels"
-
- -
WORKBOOK_PN = -
-
- -

workbook part

- - -
-
-
- - -
-
-
"xl/workbook.xml"
-
- -
STYLES_PN = -
-
- -

styles part

- - -
-
-
- - -
-
-
"styles.xml"
-
- -
APP_PN = -
-
- -

app part

- - -
-
-
- - -
-
-
"docProps/app.xml"
-
- -
CORE_PN = -
-
- -

core part

- - -
-
-
- - -
-
-
"docProps/core.xml"
-
- -
CONTENT_TYPES_PN = -
-
- -

content types part

- - -
-
-
- - -
-
-
"[Content_Types].xml"
-
- -
RELS_PN = -
-
- -

rels part

- - -
-
-
- - -
-
-
"_rels/.rels"
-
- -
WORKBOOK_RELS_PN = -
-
- -

workbook rels part

- - -
-
-
- - -
-
-
"xl/_rels/workbook.xml.rels"
-
- -
WORKSHEET_PN = -
-
- -

worksheet part

- - -
-
-
- - -
-
-
"worksheets/sheet%d.xml"
-
- -
WORKSHEET_RELS_PN = -
-
- -

worksheet rels part

- - -
-
-
- - -
-
-
"worksheets/_rels/sheet%d.xml.rels"
-
- -
DRAWING_PN = -
-
- -

drawing part

- - -
-
-
- - -
-
-
"drawings/drawing%d.xml"
-
- -
DRAWING_RELS_PN = -
-
- -

drawing rels part

- - -
-
-
- - -
-
-
"drawings/_rels/drawing%d.xml.rels"
-
- -
CHART_PN = -
-
- -

chart part

- - -
-
-
- - -
-
-
"charts/chart%d.xml"
-
- -
IMAGE_PN = -
-
- -

chart part

- - -
-
-
- - -
-
-
"media/image%d.%s"
-
- -
APP_XSD = -
-
- -

App validation schema

- - -
-
-
- - -
-
-
"lib/schema/shared-documentPropertiesExtended.xsd"
-
- -
CORE_XSD = -
-
- -

core validation schema

- - -
-
-
- - -
-
-
"lib/schema/opc-coreProperties.xsd"
-
- -
CONTENT_TYPES_XSD = -
-
- -

content types validation schema

- - -
-
-
- - -
-
-
"lib/schema/opc-contentTypes.xsd"
-
- -
RELS_XSD = -
-
- -

rels validation schema

- - -
-
-
- - -
-
-
"lib/schema/opc-relationships.xsd"
-
- -
SML_XSD = -
-
- -

spreadsheetML validation schema

- - -
-
-
- - -
-
-
"lib/schema/sml.xsd"
-
- -
DRAWING_XSD = -
-
- -

drawing validation schema

- - -
-
-
- - -
-
-
"lib/schema/dml-spreadsheetDrawing.xsd"
-
- -
NUM_FMT_PERCENT = -
-
- -

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

- - -
-
-
- - -
-
-
9
-
- -
NUM_FMT_YYYYMMDD = -
-
- -

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

- - -
-
-
- - -
-
-
100
-
- -
NUM_FMT_YYYYMMDDHHMMSS = -
-
- -

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

- - -
-
-
- - -
-
-
101
-
- -
STYLE_THIN_BORDER = -
-
- -

cellXfs id for thin borders around the cell

- - -
-
-
- - -
-
-
1
-
- -
ERR_RESTRICTION = -
-
- -

error messages RestrictionValidor

- - -
-
-
- - -
-
-
"Invalid Data: %s. %s must be one of %s."
-
- -
ERR_TYPE = -
-
- -

error message DataTypeValidator

- - -
-
-
- - -
-
-
"Invalid Data %s for %s. must be %s."
-
- -
ERR_REGEX = -
-
- -

error message for RegexValidator

- - -
-
-
- - -
-
-
"Invalid Data. %s does not match %s."
-
- -
- - - - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) cell_range(items) - - - -

-
- -

determines the cell range for the items provided

- - -
-
-
- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-
-
# File 'lib/axlsx.rb', line 34
-
-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
-
-
-
- -
-

- - + (Object) validate_boolean(v) - - - -

-
- -

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”

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-65
-66
-67
-
-
# 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
-
-
-
- -
-

- - + (Object) validate_content_type(v) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-114
-115
-116
-
-
# 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
-
-
-
- -
-

- - + (Object) validate_float(v) - - - -

-
- -

Requires that the value is a Float

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'lib/axlsx/util/validators.rb', line 77
-
-def self.validate_float(v)
-  DataTypeValidator.validate :float, Float, v
-end
-
-
-
- -
-

- - + (Object) validate_gradient_type(v) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-93
-94
-95
-
-
# File 'lib/axlsx/util/validators.rb', line 93
-
-def self.validate_gradient_type(v)
-  RestrictionValidator.validate :gradient_type, [:linear, :path], v
-end
-
-
-
- -
-

- - + (Object) validate_horizontal_alignment(v) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-100
-101
-102
-
-
# 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
-
-
-
- -
-

- - + (Object) validate_int(v) - - - -

-
- -

Requires that the value is a Fixnum or Integer

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'lib/axlsx/util/validators.rb', line 57
-
-def self.validate_int(v)
-  DataTypeValidator.validate :unsigned_int, [Fixnum, Integer], v
-end
-
-
-
- -
-

- - + (Object) validate_pattern_type(v) - - - -

-
- -

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.

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-85
-86
-87
-88
-
-
# 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
-
-
-
- -
-

- - + (Object) validate_relationship_type(v) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-121
-122
-123
-
-
# 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
-
-
-
- -
-

- - + (Object) validate_string(v) - - - -

-
- -

Requires that the value is a String

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/axlsx/util/validators.rb', line 71
-
-def self.validate_string(v)
-  DataTypeValidator.validate :string, String, v
-end
-
-
-
- -
-

- - + (Object) validate_table_element_type(v) - - - -

-
- -

Requires that the value is a valid 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 are allowed

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-128
-129
-130
-
-
# 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
-
-
-
- -
-

- - + (Boolean) validate_unsigned_int(v) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if the data is valid

    -
    - -
  • - -
-

Raises:

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

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

    -
    - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# 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
-
-
-
- -
-

- - + (Object) validate_vertical_alignment(v) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Any) - - - - — -
    -

    The value validated

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-107
-108
-109
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/App.html b/doc/Axlsx/App.html deleted file mode 100644 index f7e59649..00000000 --- a/doc/Axlsx/App.html +++ /dev/null @@ -1,2562 +0,0 @@ - - - - - - Class: Axlsx::App - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::App - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/doc_props/app.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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 -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.

- - -
-
-
- - -

See Also:

-
    - -
  • shared-documentPropertiesExtendedshared-documentPropertiesExtended.xsd
  • - -
- -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - - -
-

Instance Attribute Details

- - - - -
-

- - - (String) Application - - - -

-
- -

The name of the application

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The name of the application

    -
    - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'lib/axlsx/doc_props/app.rb', line 74
-
-def Application
-  @Application
-end
-
-
-
- - - - -
-

- - - (String) AppVersion - - - -

-
- -

The version of the application.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The version of the application.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'lib/axlsx/doc_props/app.rb', line 77
-
-def AppVersion
-  @AppVersion
-end
-
-
-
- - - - -
-

- - - (Integer) Characters - - - -

-
- -

The number of characters in the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of characters in the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/doc_props/app.rb', line 29
-
-def Characters
-  @Characters
-end
-
-
-
- - - - -
-

- - - (Integer) CharactersWithSpaces - - - -

-
- -

The number of characters in the document including spaces.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of characters in the document including spaces.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/axlsx/doc_props/app.rb', line 62
-
-def CharactersWithSpaces
-  @CharactersWithSpaces
-end
-
-
-
- - - - -
-

- - - (String) Company - - - -

-
- -

The name of the company generating the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The name of the company generating the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/axlsx/doc_props/app.rb', line 20
-
-def Company
-  @Company
-end
-
-
-
- - - - -
-

- - - (Integer) DocSecurity - - - -

-
- -

Document security

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    Document security

    -
    - -
  • - -
- -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'lib/axlsx/doc_props/app.rb', line 80
-
-def DocSecurity
-  @DocSecurity
-end
-
-
-
- - - - -
-

- - - (Integer) HiddenSlides - - - -

-
- -

The number of hidden slides.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of hidden slides.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/axlsx/doc_props/app.rb', line 50
-
-def HiddenSlides
-  @HiddenSlides
-end
-
-
-
- - - - -
-

- - - (String) HyperLinkBase - - - -

-
- -

The base for hyper links in the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The base for hyper links in the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'lib/axlsx/doc_props/app.rb', line 68
-
-def HyperLinkBase
-  @HyperLinkBase
-end
-
-
-
- - - - -
-

- - - (Boolean) HyperlinksChanged - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

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

    -
    - -
  • - -
- -
- - - - -
-
-
-
-71
-72
-73
-
-
# File 'lib/axlsx/doc_props/app.rb', line 71
-
-def HyperlinksChanged
-  @HyperlinksChanged
-end
-
-
-
- - - - -
-

- - - (Integer) Lines - - - -

-
- -

The number of lines in the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of lines in the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/axlsx/doc_props/app.rb', line 35
-
-def Lines
-  @Lines
-end
-
-
-
- - - - -
-

- - - (Boolean) LinksUpToDate - - - -

-
- -

The links in the document are up to date.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    The links in the document are up to date.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/axlsx/doc_props/app.rb', line 59
-
-def LinksUpToDate
-  @LinksUpToDate
-end
-
-
-
- - - - -
-

- - - (String) Manager - - - -

-
- -

The name of the manager for the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The name of the manager for the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/axlsx/doc_props/app.rb', line 17
-
-def Manager
-  @Manager
-end
-
-
-
- - - - -
-

- - - (Integer) MMClips - - - -

-
- -

The total number multimedia clips

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The total number multimedia clips

    -
    - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'lib/axlsx/doc_props/app.rb', line 53
-
-def MMClips
-  @MMClips
-end
-
-
-
- - - - -
-

- - - (Integer) Notes - - - -

-
- -

The number of slides that have notes.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of slides that have notes.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'lib/axlsx/doc_props/app.rb', line 44
-
-def Notes
-  @Notes
-end
-
-
-
- - - - -
-

- - - (Integer) Pages - - - -

-
- -

The number of pages in the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of pages in the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/axlsx/doc_props/app.rb', line 23
-
-def Pages
-  @Pages
-end
-
-
-
- - - - -
-

- - - (Integer) Paragraphs - - - -

-
- -

The number of paragraphs in the document

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of paragraphs in the document

    -
    - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/axlsx/doc_props/app.rb', line 38
-
-def Paragraphs
-  @Paragraphs
-end
-
-
-
- - - - -
-

- - - (String) PresentationFormat - - - -

-
- -

The intended format of the presentation.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The intended format of the presentation.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'lib/axlsx/doc_props/app.rb', line 32
-
-def PresentationFormat
-  @PresentationFormat
-end
-
-
-
- - - - -
-

- - - (Boolean) ScaleCrop - - - -

-
- -

The display mode for the document thumbnail.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    The display mode for the document thumbnail.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-56
-57
-58
-
-
# File 'lib/axlsx/doc_props/app.rb', line 56
-
-def ScaleCrop
-  @ScaleCrop
-end
-
-
-
- - - - -
-

- - - (Boolean) ShareDoc - - - -

-
- -

Indicates if the document is shared.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    Indicates if the document is shared.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-65
-66
-67
-
-
# File 'lib/axlsx/doc_props/app.rb', line 65
-
-def ShareDoc
-  @ShareDoc
-end
-
-
-
- - - - -
-

- - - (Intger) Slides - - - -

-
- -

The number of slides in the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Intger) - - - - — -
    -

    The number of slides in the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'lib/axlsx/doc_props/app.rb', line 41
-
-def Slides
-  @Slides
-end
-
-
-
- - - - -
-

- - - (String) Template - - - -

-
- -

The name of the document template.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The name of the document template.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/doc_props/app.rb', line 14
-
-def Template
-  @Template
-end
-
-
-
- - - - -
-

- - - (Integer) TotalTime - - - -

-
- -

The total amount of time spent editing.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The total amount of time spent editing.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'lib/axlsx/doc_props/app.rb', line 47
-
-def TotalTime
-  @TotalTime
-end
-
-
-
- - - - -
-

- - - (Integer) Words - - - -

-
- -

The number of words in the document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The number of words in the document.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/axlsx/doc_props/app.rb', line 26
-
-def Words
-  @Words
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) initalize(options = {}) - - - -

-
- -

Creates an App object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - Template - (String) - - - - -
  • - -
  • - Manager - (String) - - - - -
  • - -
  • - Pages - (Integer) - - - - -
  • - -
  • - Words - (Integer) - - - - -
  • - -
  • - Characters - (Integer) - - - - -
  • - -
  • - PresentationFormat - (String) - - - - -
  • - -
  • - Lines - (Integer) - - - - -
  • - -
  • - Paragraphs - (Integer) - - - - -
  • - -
  • - Slides - (Integer) - - - - -
  • - -
  • - Notes - (Integer) - - - - -
  • - -
  • - TotalTime - (Integer) - - - - -
  • - -
  • - HiddenSlides - (Integer) - - - - -
  • - -
  • - MMClips - (Integer) - - - - -
  • - -
  • - ScaleCrop - (Boolean) - - - - -
  • - -
  • - LinksUpToDate - (Boolean) - - - - -
  • - -
  • - CharactersWithSpaces - (Integer) - - - - -
  • - -
  • - ShareDoc - (Boolean) - - - - -
  • - -
  • - HyperLinkBase - (String) - - - - -
  • - -
  • - HyperlinksChanged - (String) - - - - -
  • - -
  • - Application - (String) - - - - -
  • - -
  • - AppVersion - (String) - - - - -
  • - -
  • - DocSecurity - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-105
-106
-107
-108
-109
-
-
# 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
-
-
-
- -
-

- - - (String) to_xml - - - -

-
- -

Generate an app.xml document

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The document as a string

    -
    - -
  • - -
- -
- - - - -
-
-
-
-167
-168
-169
-170
-171
-172
-173
-174
-175
-176
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Ar.html b/doc/Axlsx/Ar.html deleted file mode 100644 index 27b11b00..00000000 --- a/doc/Axlsx/Ar.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - Module: Axlsx::Ar - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Module: Axlsx::Ar - - - -

- -
- - - - - - - - -
Defined in:
-
lib/axlsx/ar.rb
- -
-
- -

Overview

-
- -

Mixing module for adding acts_as_axlsx to active record base

- - -
-
-
- - -

Defined Under Namespace

-

- - - Modules: ClassMethods, InstanceMethods, SingletonMethods - - - - -

- - - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) included(base) - - - -

-
- -

Extents active record with this ojbects class method acts_as_axlsx

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/ar.rb', line 8
-
-def self.included(base)
-  base.send :extend, ClassMethods
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Ar/ClassMethods.html b/doc/Axlsx/Ar/ClassMethods.html deleted file mode 100644 index 9107ed38..00000000 --- a/doc/Axlsx/Ar/ClassMethods.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - Module: Axlsx::Ar::ClassMethods - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Module: Axlsx::Ar::ClassMethods - - - -

- -
- - - - - - - - -
Defined in:
-
lib/axlsx/ar.rb
- -
-
- -

Overview

-
- -

Class methods for the mixin

- - -
-
-
- - -
- - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) acts_as_axlsx(options = {}) - - - -

-
- -

adds in the instance and singleton methods

- - -
-
-
- - -
- - - - -
-
-
-
-16
-17
-18
-19
-
-
# File 'lib/axlsx/ar.rb', line 16
-
-def acts_as_axlsx(options={})        
-  include Axlsx::Ar::InstanceMethods        
-  extend Axlsx::Ar::SingletonMethods
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Ar/InstanceMethods.html b/doc/Axlsx/Ar/InstanceMethods.html deleted file mode 100644 index 18ab5996..00000000 --- a/doc/Axlsx/Ar/InstanceMethods.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - Module: Axlsx::Ar::InstanceMethods - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Module: Axlsx::Ar::InstanceMethods - - - -

- -
- - - - - - - - -
Defined in:
-
lib/axlsx/ar.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -
- - - - - - -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Ar/SingletonMethods.html b/doc/Axlsx/Ar/SingletonMethods.html deleted file mode 100644 index 58b6b29c..00000000 --- a/doc/Axlsx/Ar/SingletonMethods.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - Module: Axlsx::Ar::SingletonMethods - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Module: Axlsx::Ar::SingletonMethods - - - -

- -
- - - - - - - - -
Defined in:
-
lib/axlsx/ar.rb
- -
-
- -

Overview

-
- -

Singleton methods for the mixin

- - -
-
-
- - -
- - - - - -

- Instance Method Summary - (collapse) -

- - - - - - -
-

Instance Method Details

- - -
-

- - - (Object) to_xlsx(number = :all, options = {}) - - - -

-
- -

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

- - -
-
-
-

Parameters:

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

    :all, etc.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - header_style - (Integer) - - - - —
    -

    to apply to the first row of field names

    -
    -
  • - -
  • - an - (Array, Symbol) - - - - —
    -

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

    -
    -
  • - -
  • - style - (Integer, Array) - - - - —
    -

    The style to pass to Worksheet#add_row

    -
    -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-
-
# File 'lib/axlsx/ar.rb', line 32
-
-def to_xlsx(number = :all, options = {})
-  row_style = options.delete(:style)
-  header_style = options.delete(:header_style) || row_style
-  types = options.delete(:types)
-
-  data = [*find(number, options)]
-  data.compact!
-  data.flatten!
-  columns = data.first.attributes.keys
-  p = Package.new
-  row_style = p.workbook.styles.add_style(row_style) unless row_style.nil?
-  header_style = p.workbook.styles.add_style(header_style) unless header_style.nil?
-  
-  p.workbook.add_worksheet(:name=>table_name.humanize) do |sheet|
-    sheet.add_row columns, :style=>header_style
-    data.each do |r|
-      sheet.add_row r.attributes.values, :style=>row_style, :types=>types
-    end
-  end
-  p
-end
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Axis.html b/doc/Axlsx/Axis.html deleted file mode 100644 index 11b4f2bc..00000000 --- a/doc/Axlsx/Axis.html +++ /dev/null @@ -1,1051 +0,0 @@ - - - - - - Class: Axlsx::Axis - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Axis - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/axis.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -
-

Direct Known Subclasses

-

CatAxis, SerAxis, ValAxis

-
- - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Axis) initialize(axId, crossAx, options = {}) - - - -

-
- -

Creates an Axis object

- - -
-
-
-

Parameters:

-
    - -
  • - - axId - - - (Integer) - - - - — -
    -

    the id of this axis

    -
    - -
  • - -
  • - - crossAx - - - (Integer) - - - - — -
    -

    the id of the perpendicular axis

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - axPos - (Symbol) - - - - -
  • - -
  • - crosses - (Symbol) - - - - -
  • - -
  • - tickLblPos - (Symbol) - - - - -
  • - -
- - -

Raises:

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

    If axId or crossAx are not unsigned integers

    -
    - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Integer) axId (readonly) - - - -

-
- -

the id of the axis.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/axlsx/drawing/axis.rb', line 7
-
-def axId
-  @axId
-end
-
-
-
- - - - -
-

- - - (Symbol) axPos - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/drawing/axis.rb', line 21
-
-def axPos
-  @axPos
-end
-
-
-
- - - - -
-

- - - (Integer) crossAx (readonly) - - - -

-
- -

The perpendicular axis

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/drawing/axis.rb', line 11
-
-def crossAx
-  @crossAx
-end
-
-
-
- - - - -
-

- - - (Symbol) crosses - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-36
-37
-38
-
-
# File 'lib/axlsx/drawing/axis.rb', line 36
-
-def crosses
-  @crosses
-end
-
-
-
- - - - -
-

- - - (String) format_code - - - -

-
- -

The number format format code for this axis default :General

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/axlsx/drawing/axis.rb', line 31
-
-def format_code
-  @format_code
-end
-
-
-
- - - - -
-

- - - (Scaling) scaling (readonly) - - - -

-
- -

The scaling of the axis

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/axlsx/drawing/axis.rb', line 16
-
-def scaling
-  @scaling
-end
-
-
-
- - - - -
-

- - - (Symbol) tickLblPos - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/axlsx/drawing/axis.rb', line 26
-
-def tickLblPos
-  @tickLblPos
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the common axis

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Bar3DChart.html b/doc/Axlsx/Bar3DChart.html deleted file mode 100644 index fb338d09..00000000 --- a/doc/Axlsx/Bar3DChart.html +++ /dev/null @@ -1,1160 +0,0 @@ - - - - - - Class: Axlsx::Bar3DChart - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Bar3DChart - - - -

- -
- -
Inherits:
-
- Chart - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/bar_3D_chart.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -

See Also:

- - -
-

Constant Summary

- -
- -
GAP_AMOUNT_PERCENT = -
-
- -

validation regex for gap amount percent

- - -
-
-
- - -
-
-
/0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
-
- -
- - - - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Chart

-

graphic_frame, series, series_type, show_legend, style, title, view3D

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Chart

-

#add_series, #end_at, #from, #index, #pn, #start_at, #to

-
-

Constructor Details

- -
-

- - - (Bar3DChart) initialize(frame, options = {}) - - - -

-
- -

Creates a new bar chart object

- - -
-
-
-

Parameters:

-
    - -
  • - - frame - - - (GraphicFrame) - - - - — -
    -

    The workbook that owns this chart.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - title - (Cell, String) - - - - -
  • - -
  • - show_legend - (Boolean) - - - - -
  • - -
  • - barDir - (Symbol) - - - - -
  • - -
  • - grouping - (Symbol) - - - - -
  • - -
  • - gapWidth - (String) - - - - -
  • - -
  • - gapDepth - (String) - - - - -
  • - -
  • - shape - (Symbol) - - - - -
  • - -
  • - rotX - (Integer) - - - - -
  • - -
  • - hPercent - (String) - - - - -
  • - -
  • - rotY - (Integer) - - - - -
  • - -
  • - depthPercent - (String) - - - - -
  • - -
  • - rAngAx - (Boolean) - - - - -
  • - -
  • - perspective - (Integer) - - - - -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Symbol) barDir - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 21
-
-def barDir
-  @barDir
-end
-
-
-
- - - - -
-

- - - (CatAxis) catAxis (readonly) - - - -

-
- -

the category axis

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 12
-
-def catAxis
-  @catAxis
-end
-
-
-
- - - - -
-

- - - (String) gapDepth - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 25
-
-def gapDepth
-  @gapDepth
-end
-
-
-
- - - - -
-

- - - (String) gapWidth - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 29
-
-def gapWidth
-  @gapWidth
-end
-
-
-
- - - - -
-

- - - (Symbol) grouping - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 34
-
-def grouping
-  @grouping
-end
-
-
-
- - - - -
-

- - - (Symbol) shape - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 39
-
-def shape
-  @shape
-end
-
-
-
- - - - -
-

- - - (ValAxis) valAxis (readonly) - - - -

-
- -

the valueaxis

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/axlsx/drawing/bar_3D_chart.rb', line 16
-
-def valAxis
-  @valAxis
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml - - - -

-
- -

Serializes the bar chart

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/BarSeries.html b/doc/Axlsx/BarSeries.html deleted file mode 100644 index 30362718..00000000 --- a/doc/Axlsx/BarSeries.html +++ /dev/null @@ -1,697 +0,0 @@ - - - - - - Class: Axlsx::BarSeries - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::BarSeries - - - -

- -
- -
Inherits:
-
- Series - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/bar_series.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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

-
-
- - -

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

- - -
-
-
- - -

See Also:

- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Series

-

chart, title

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Series

-

#index, #order, #order=

-
-

Constructor Details

- -
-

- - - (BarSeries) initialize(chart, options = {}) - - - -

-
- -

Creates a new series

- - -
-
-
-

Parameters:

-
    - -
  • - - chart - - - (Chart) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - data - (Array, SimpleTypedList) - - - - -
  • - -
  • - labels - (Array, SimpleTypedList) - - - - -
  • - -
  • - title - (String) - - - - -
  • - -
  • - shape - (String) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Array, SimpleTypedList) data - - - -

-
- -

The data for this series.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/drawing/bar_series.rb', line 11
-
-def data
-  @data
-end
-
-
-
- - - - -
-

- - - (Array, SimpleTypedList) labels - - - -

-
- -

The labels for this series.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/axlsx/drawing/bar_series.rb', line 15
-
-def labels
-  @labels
-end
-
-
-
- - - - -
-

- - - (Symbol) shape - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/axlsx/drawing/bar_series.rb', line 20
-
-def shape
-  @shape
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (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) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Border.html b/doc/Axlsx/Border.html deleted file mode 100644 index 71a33a92..00000000 --- a/doc/Axlsx/Border.html +++ /dev/null @@ -1,759 +0,0 @@ - - - - - - Class: Axlsx::Border - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Border - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/border.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Border) initialize(options = {}) - - - -

-
- -

Creates a new Border object

- - -
-
-
- -
-

Examples:

- -

-

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
-
- -
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - diagonalUp - (Boolean) - - - - -
  • - -
  • - diagonalDown - (Boolean) - - - - -
  • - -
  • - outline - (Boolean) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Boolean) diagonalDown - - - -

-
- -

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.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    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.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/stylesheet/border.rb', line 9
-
-def diagonalDown
-  @diagonalDown
-end
-
-
-
- - - - -
-

- - - (Boolean) diagonalUp - - - -

-
- -

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.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    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.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'lib/axlsx/stylesheet/border.rb', line 6
-
-def diagonalUp
-  @diagonalUp
-end
-
-
-
- - - - -
-

- - - (Boolean) outline - - - -

-
- -

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.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    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.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/stylesheet/border.rb', line 12
-
-def outline
-  @outline
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) prs (readonly) - - - -

-
- -

A list of BorderPr objects for this border.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (SimpleTypedList) - - - - — -
    -

    A list of BorderPr objects for this border.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/axlsx/stylesheet/border.rb', line 15
-
-def prs
-  @prs
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) to_xml(xml) - - - -

-
- -

Serializes the border element

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-51
-52
-53
-54
-55
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/BorderPr.html b/doc/Axlsx/BorderPr.html deleted file mode 100644 index 6daa67a9..00000000 --- a/doc/Axlsx/BorderPr.html +++ /dev/null @@ -1,691 +0,0 @@ - - - - - - Class: Axlsx::BorderPr - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::BorderPr - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/border_pr.rb
- -
-
- -

Overview

-
- -

A border part.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (BorderPr) initialize(options = {}) - - - -

-
- -

Creates a new Border Part Object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - color - (Color) - - - - -
  • - -
  • - name - (Symbol) - - - - -
  • - -
  • - style - (Symbol) - - - - -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Color) color - - - -

-
- -

The color of this border part.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Color) - - - - — -
    -

    The color of this border part.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'lib/axlsx/stylesheet/border_pr.rb', line 6
-
-def color
-  @color
-end
-
-
-
- - - - -
-

- - - (Symbol) name - - - -

-
- -
- Note: -
-

The following are allowed

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

The name of this border part

- - -
-
-
- -

Returns:

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

    The name of this border part

    -
    - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/axlsx/stylesheet/border_pr.rb', line 39
-
-def name
-  @name
-end
-
-
-
- - - - -
-

- - - (Symbol) style - - - -

-
- -
- Note: -
-

The following are allowed

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

The syle of this border part.

- - -
-
-
- -

Returns:

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

    The syle of this border part.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/axlsx/stylesheet/border_pr.rb', line 25
-
-def style
-  @style
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the border part

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-65
-66
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/CatAxis.html b/doc/Axlsx/CatAxis.html deleted file mode 100644 index 51fbc5ab..00000000 --- a/doc/Axlsx/CatAxis.html +++ /dev/null @@ -1,750 +0,0 @@ - - - - - - Class: Axlsx::CatAxis - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::CatAxis - - - -

- -
- -
Inherits:
-
- Axis - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/cat_axis.rb
- -
-
- -

Overview

-
- -

A CatAxis object defines a chart category axis

- - -
-
-
- - -
-

Constant Summary

- -
- -
LBL_OFFSET_REGEX = -
-
- -

regex for validating label offset

- - -
-
-
- - -
-
-
/0*(([0-9])|([1-9][0-9])|([1-9][0-9][0-9])|1000)%/
-
- -
- - - - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Axis

-

axId, axPos, crossAx, crosses, format_code, scaling, tickLblPos

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (CatAxis) initialize(axId, crossAx, options = {}) - - - -

-
- -

Creates a new CatAxis object

- - -
-
-
-

Parameters:

-
    - -
  • - - axId - - - (Integer) - - - - — -
    -

    the id of this axis. Inherited

    -
    - -
  • - -
  • - - crossAx - - - (Integer) - - - - — -
    -

    the id of the perpendicular axis. Inherited

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - axPos. - (Symbol) - - - - —
    -

    Inherited

    -
    -
  • - -
  • - tickLblPos. - (Symbol) - - - - —
    -

    Inherited

    -
    -
  • - -
  • - crosses. - (Symbol) - - - - —
    -

    Inherited

    -
    -
  • - -
  • - auto - (Boolean) - - - - -
  • - -
  • - lblAlgn - (Symbol) - - - - -
  • - -
  • - lblOffset - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-31
-32
-33
-34
-35
-36
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Boolean) auto - - - -

-
- -

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.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/axlsx/drawing/cat_axis.rb', line 7
-
-def auto
-  @auto
-end
-
-
-
- - - - -
-

- - - (Symbol) lblAlgn - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/drawing/cat_axis.rb', line 12
-
-def lblAlgn
-  @lblAlgn
-end
-
-
-
- - - - -
-

- - - (Integer) lblOffset - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/axlsx/drawing/cat_axis.rb', line 17
-
-def lblOffset
-  @lblOffset
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the category axis

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-58
-59
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/CatAxisData.html b/doc/Axlsx/CatAxisData.html deleted file mode 100644 index 7530a7c6..00000000 --- a/doc/Axlsx/CatAxisData.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - Class: Axlsx::CatAxisData - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::CatAxisData - - - -

- -
- -
Inherits:
-
- SimpleTypedList - - - show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/cat_axis_data.rb
- -
-
- -

Overview

-
- -

The CatAxisData class serializes the category axis data for a chart

- - -
-
-
- - -
-

Direct Known Subclasses

-

ValAxisData

-
- - - - - - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from SimpleTypedList

-

allowed_types, locked_at, serialize_as

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (CatAxisData) initialize(data = []) - - - -

-
- -

Create a new CatAxisData object

- - -
-
-
-

Parameters:

-
    - -
  • - - data - - - (Array, SimpleTypedList) - - - (defaults to: []) - - - — -
    -

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

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-7
-8
-9
-10
-11
-
-
# 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
-
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Axlsx::SimpleTypedList - -

- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the category axis data

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Cell.html b/doc/Axlsx/Cell.html deleted file mode 100644 index 59403b4a..00000000 --- a/doc/Axlsx/Cell.html +++ /dev/null @@ -1,1558 +0,0 @@ - - - - - - Class: Axlsx::Cell - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Cell - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/workbook/worksheet/cell.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to generate cells is via Worksheet#add_row

-
-
- - -

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.

- - -
-
-
- -
-

Examples:

- -

-

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]
-
-# 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
-
-# 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
-
- -
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Cell) initialize(row, value = "", options = {}) - - - -

-
- -

A new instance of Cell

- - -
-
-
-

Parameters:

-
    - -
  • - - row - - - (Row) - - - - — -
    -

    The row this cell belongs to.

    -
    - -
  • - -
  • - - value - - - (Any) - - - (defaults to: "") - - - — -
    -

    The value associated with this cell.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

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

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

    -
    -
  • - -
  • - style - (Integer) - - - - —
    -

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

    -
    -
  • - -
- - - -
- - - - -
-
-
-
-69
-70
-71
-72
-73
-74
-75
-76
-77
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Row) row - - - -

-
- -

The row this cell belongs to.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Row) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 33
-
-def row
-  @row
-end
-
-
-
- - - - -
-

- - - (Integer) style - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 29
-
-def style
-  @style
-end
-
-
-
- - - - -
-

- - - (Symbol) type - - - -

-
- -
- 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.

-
-
- - -

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.

- - -
-
-
- -

Returns:

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

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

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (ArgumentExeption) - - - - — -
    -

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

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 46
-
-def type
-  @type
-end
-
-
-
- - - - -
-

- - - (Object) value - - - -

-
- -

The value of this cell.

- - -
-
-
- -

Returns:

-
    - -
  • - - - - - - - -
    -

    casted value based on cell’s type attribute.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 57
-
-def value
-  @value
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (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
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 169
-
-def cast_value(v)
-  if (@type == :time && v.is_a?(Time)) || (@type == :time && v.respond_to?(:to_time))
-    v = v.respond_to?(:to_time) ? v.to_time : v
-    # Using hardcoded offsets here as some operating systems will not except a 'negative' offset from the ruby epoc.
-    # (1970)
-    epoc1900 = -2209021200 #Time.local(1900, 1, 1) 
-    epoc1904 = -2082877200 #Time.local(1904, 1, 1) 
-    epoc = Workbook.date1904 ? epoc1904 : epoc1900
-    ((v.localtime.to_f - 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
-  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. -

    :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.

    -
-
-
- - -

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
-
-
# 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)) || (@type == :time && v.respond_to?(:to_time))
-      v = v.respond_to?(:to_time) ? v.to_time : v
-      # Using hardcoded offsets here as some operating systems will not except a 'negative' offset from the ruby epoc.
-      # (1970)
-      epoc1900 = -2209021200 #Time.local(1900, 1, 1) 
-      epoc1904 = -2082877200 #Time.local(1904, 1, 1) 
-      epoc = Workbook.date1904 ? epoc1904 : epoc1900
-      ((v.localtime.to_f - 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
-    end
-  end    
-end
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of the cell in the containing row.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    The index of the cell in the containing row.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-80
-81
-82
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 80
-
-def index
-  @row.cells.index(self)
-end
-
-
-
- -
-

- - - (String) r - - - -

-
- -

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

- - -
-
-
- -
-

Examples:

- -

-

Relative Cell Reference

-

-
ws.rows.first.cells.first.r #=> "A1" 
-
- -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

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

    -
    - -
  • - -
- -
- - - - -
-
-
-
-87
-88
-89
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 87
-
-def r
-  "#{col_ref}#{@row.index+1}"      
-end
-
-
-
- -
-

- - - (String) r_abs - - - -

-
- -

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

- - -
-
-
- -
-

Examples:

- -

-

Absolute Cell Reference

-

-
ws.rows.first.cells.first.r #=> "$A$1" 
-
- -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

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

    -
    - -
  • - -
- -
- - - - -
-
-
-
-94
-95
-96
-
-
# File 'lib/axlsx/workbook/worksheet/cell.rb', line 94
-
-def r_abs
-  "$#{r.split('').join('$')}"
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -
- Note: -
-

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

-
-
- - -

Serializes the cell

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    xml text for the cell

    -
    - -
  • - -
- -
- - - - -
-
-
-
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/CellAlignment.html b/doc/Axlsx/CellAlignment.html deleted file mode 100644 index 480b145f..00000000 --- a/doc/Axlsx/CellAlignment.html +++ /dev/null @@ -1,1219 +0,0 @@ - - - - - - Class: Axlsx::CellAlignment - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::CellAlignment - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/cell_alignment.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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

-
-
- - -

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

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (CellAlignment) initialize(options = {}) - - - -

-
- -

Create a new cell_alignment object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - horizontal - (Symbol) - - - - -
  • - -
  • - vertical - (Symbol) - - - - -
  • - -
  • - textRotation - (Integer) - - - - -
  • - -
  • - wrapText - (Boolean) - - - - -
  • - -
  • - indent - (Integer) - - - - -
  • - -
  • - relativeIndent - (Integer) - - - - -
  • - -
  • - justifyLastLine - (Boolean) - - - - -
  • - -
  • - shrinkToFit - (Boolean) - - - - -
  • - -
  • - readingOrder - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-72
-73
-74
-75
-76
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Symbol) horizontal - - - -

-
- -
- Note: -
-

The horizontal cell alignement style must be one of

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

The horizontal alignment of the cell.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 18
-
-def horizontal
-  @horizontal
-end
-
-
-
- - - - -
-

- - - (Integer) indent - - - -

-
- -

The amount of indent

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 41
-
-def indent
-  @indent
-end
-
-
-
- - - - -
-

- - - (Boolean) justifyLastLine - - - -

-
- -

Indicate if the last line should be justified.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 49
-
-def justifyLastLine
-  @justifyLastLine
-end
-
-
-
- - - - -
-

- - - (Integer) readingOrder - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 60
-
-def readingOrder
-  @readingOrder
-end
-
-
-
- - - - -
-

- - - (Integer) relativeIndent - - - -

-
- -

The amount of relativeIndent

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 45
-
-def relativeIndent
-  @relativeIndent
-end
-
-
-
- - - - -
-

- - - (Boolean) shrinkToFit - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 53
-
-def shrinkToFit
-  @shrinkToFit
-end
-
-
-
- - - - -
-

- - - (Integer) textRotation - - - -

-
- -

The textRotation of the cell.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 33
-
-def textRotation
-  @textRotation
-end
-
-
-
- - - - -
-

- - - (Symbol) vertical - - - -

-
- -
- Note: -
-

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

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

The vertical alignment of the cell.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 29
-
-def vertical
-  @vertical
-end
-
-
-
- - - - -
-

- - - (Boolean) wrapText - - - -

-
- -

Indicate if the text of the cell should wrap

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 37
-
-def wrapText
-  @wrapText
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the cell alignment

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-100
-101
-102
-
-
# File 'lib/axlsx/stylesheet/cell_alignment.rb', line 100
-
-def to_xml(xml)
-  xml.alignment(self.instance_values)      
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/CellProtection.html b/doc/Axlsx/CellProtection.html deleted file mode 100644 index ae7793ce..00000000 --- a/doc/Axlsx/CellProtection.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - - - Class: Axlsx::CellProtection - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::CellProtection - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/cell_protection.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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

-
-
- - -

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

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (CellProtection) initialize(options = {}) - - - -

-
- -

Creates a new CellProtection

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - hidden - (Boolean) - - - - —
    -

    value for hidden protection

    -
    -
  • - -
  • - locked - (Boolean) - - - - —
    -

    value for locked protection

    -
    -
  • - -
- - - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Boolean) hidden - - - -

-
- -

specifies locking for cells that have the style containing this protection

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 9
-
-def 
-  @hidden
-end
-
-
-
- - - - -
-

- - - (Boolean) locked - - - -

-
- -

specifies if the cells that have the style containing this protection

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 13
-
-def locked
-  @locked
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the cell protection

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-
-
# File 'lib/axlsx/stylesheet/cell_protection.rb', line 32
-
-def to_xml(xml)
-  xml.protection(self.instance_values)
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/CellStyle.html b/doc/Axlsx/CellStyle.html deleted file mode 100644 index b66ceaf8..00000000 --- a/doc/Axlsx/CellStyle.html +++ /dev/null @@ -1,929 +0,0 @@ - - - - - - Class: Axlsx::CellStyle - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::CellStyle - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/cell_style.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (CellStyle) initialize(options = {}) - - - -

-
- -

Creats a new CellStyle object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - name - (String) - - - - -
  • - -
  • - xfId - (Integer) - - - - -
  • - -
  • - buildinId - (Integer) - - - - -
  • - -
  • - iLevel - (Integer) - - - - -
  • - -
  • - hidden - (Boolean) - - - - -
  • - -
  • - customBuiltIn - (Boolean) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Integer) builtinId - - - -

-
- -

The buildinId to use when this named style is applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 18
-
-def builtinId
-  @builtinId
-end
-
-
-
- - - - -
-

- - - (Boolean) customBuiltin - - - -

-
- -

Indicates that the build in style reference has been customized.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 30
-
-def customBuiltin
-  @customBuiltin
-end
-
-
-
- - - - -
-

- - - (Boolean) hidden - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 26
-
-def 
-  @hidden
-end
-
-
-
- - - - -
-

- - - (Integer) iLevel - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 22
-
-def iLevel
-  @iLevel
-end
-
-
-
- - - - -
-

- - - (String) name - - - -

-
- -

The name of this cell style

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 8
-
-def name
-  @name
-end
-
-
-
- - - - -
-

- - - (Integer) xfId - - - -

-
- -

The formatting record id this named style utilizes

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -

See Also:

-
    - -
  • Xf
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 13
-
-def xfId
-  @xfId
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the cell style

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-
-
# File 'lib/axlsx/stylesheet/cell_style.rb', line 60
-
-def to_xml(xml)
-  xml.cellStyle(self.instance_values)
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Chart.html b/doc/Axlsx/Chart.html deleted file mode 100644 index 2fe97954..00000000 --- a/doc/Axlsx/Chart.html +++ /dev/null @@ -1,1641 +0,0 @@ - - - - - - Class: Axlsx::Chart - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Chart - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/chart.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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

-
-
- - -

A Chart is the superclass for specific charts

- - -
-
-
- - -

See Also:

-
    - -
  • for examples
  • - -
- -
-

Direct Known Subclasses

-

Bar3DChart, Line3DChart, Pie3DChart

-
- - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Chart) initialize(frame, options = {}) {|_self| ... } - - - -

-
- -

Creates a new chart object

- - -
-
-
-

Parameters:

-
    - -
  • - - frame - - - (GraphicalFrame) - - - - — -
    -

    The frame that holds this chart.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - title - (Cell, String) - - - - -
  • - -
  • - show_legend - (Boolean) - - - - -
  • - -
- - -

Yields:

-
    - -
  • - - - (_self) - - - -
  • - -
-

Yield Parameters:

-
    - -
  • - - _self - - - (Axlsx::Chart) - - - - — -
    -

    the object that the method was called on

    -
    - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (GraphicFrame) graphic_frame (readonly) - - - -

-
- -

A reference to the graphic frame that owns this chart

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/drawing/chart.rb', line 14
-
-def graphic_frame
-  @graphic_frame
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) series (readonly) - - - -

-
- -

A collection of series objects that are applied to the chart

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/axlsx/drawing/chart.rb', line 18
-
-def series
-  @series
-end
-
-
-
- - - - -
-

- - - (Series) series_type (readonly) - - - -

-
- -

The type of series to use for this chart.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Series) - - - -
  • - -
- -
- - - - -
-
-
-
-22
-23
-24
-
-
# File 'lib/axlsx/drawing/chart.rb', line 22
-
-def series_type
-  @series_type
-end
-
-
-
- - - - -
-

- - - (Boolean) show_legend - - - -

-
- -

Show the legend in the chart

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/axlsx/drawing/chart.rb', line 38
-
-def show_legend
-  @show_legend
-end
-
-
-
- - - - -
-

- - - (Integer) style - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-34
-35
-36
-
-
# File 'lib/axlsx/drawing/chart.rb', line 34
-
-def style
-  @style
-end
-
-
-
- - - - -
-

- - - (Title) title - - - -

-
- -

The title object for the chart.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Title) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/drawing/chart.rb', line 29
-
-def title
-  @title
-end
-
-
-
- - - - -
-

- - - (Object) view3D - - - -

-
- -

The 3D view properties for the chart

- - -
-
-
- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/axlsx/drawing/chart.rb', line 10
-
-def view3D
-  @view3D
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Series) add_series(options = {}) - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Series) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-106
-107
-108
-109
-
-
# File 'lib/axlsx/drawing/chart.rb', line 106
-
-def add_series(options={})
-  @series_type.new(self, options)
-  @series.last
-end
-
-
-
- -
-

- - - (Marker) end_at(x, y) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - x - - - (Integer) - - - - — -
    -

    The column

    -
    - -
  • - -
  • - - y - - - (Integer) - - - - — -
    -

    The row

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Marker) - - - -
  • - -
- -
- - - - -
-
-
-
-154
-155
-156
-157
-
-
# 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
-
-
-
- -
-

- - - (Object) from - - - -

-
- -
- Note: -
-

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

- - -
-
-
- - -
- - - - -
-
-
-
-99
-100
-101
-
-
# File 'lib/axlsx/drawing/chart.rb', line 99
-
-def from
-  @graphic_frame.anchor.from
-end
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of this chart in the workbooks charts collection

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-61
-62
-63
-
-
# File 'lib/axlsx/drawing/chart.rb', line 61
-
-def index
-  @graphic_frame.anchor.drawing.worksheet.workbook.charts.index(self)
-end
-
-
-
- -
-

- - - (String) pn - - - -

-
- -

The part name for this chart

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'lib/axlsx/drawing/chart.rb', line 67
-
-def pn
-  "#{CHART_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (Marker) start_at(x, y) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - x - - - (Integer) - - - - — -
    -

    The column

    -
    - -
  • - -
  • - - y - - - (Integer) - - - - — -
    -

    The row

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Marker) - - - -
  • - -
- -
- - - - -
-
-
-
-143
-144
-145
-146
-
-
# 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
-
-
-
- -
-

- - - (Object) to - - - -

-
- -
- Note: -
-

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

- - -
-
-
- - -
- - - - -
-
-
-
-93
-94
-95
-
-
# File 'lib/axlsx/drawing/chart.rb', line 93
-
-def to
-  @graphic_frame.anchor.to
-end
-
-
-
- -
-

- - - (Object) to_xml - - - -

-
- -

Chart Serialization serializes the chart

- - -
-
-
- - -
- - - - -
-
-
-
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Color.html b/doc/Axlsx/Color.html deleted file mode 100644 index 4229122e..00000000 --- a/doc/Axlsx/Color.html +++ /dev/null @@ -1,649 +0,0 @@ - - - - - - Class: Axlsx::Color - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Color - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/color.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Color) initialize(options = {}) - - - -

-
- -

Creates a new Color object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - auto - (Boolean) - - - - -
  • - -
  • - rgb - (String) - - - - -
  • - -
  • - tint - (Float) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Boolean) auto - - - -

-
- -

Determines if the color is system color dependant

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-6
-7
-8
-
-
# File 'lib/axlsx/stylesheet/color.rb', line 6
-
-def auto
-  @auto
-end
-
-
-
- - - - -
-

- - - (String) rgb - - - -

-
- -
- Note: -
-

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

-
-
- - -

The color as defined in rgb terms.

- - -
-
-
- -
-

Examples:

- -

-

rgb colors

-

-
"FF000000" is black
-"FFFFFFFF" is white
-
- -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/axlsx/stylesheet/color.rb', line 19
-
-def rgb
-  @rgb
-end
-
-
-
- - - - -
-

- - - (Float) tint - - - -

-
- -
- Note: -
-

valid values are between -1.0 and 1.0

-
-
- - -

The tint value.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'lib/axlsx/stylesheet/color.rb', line 28
-
-def tint
-  @tint
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the color

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-
-
# File 'lib/axlsx/stylesheet/color.rb', line 57
-
-def to_xml(xml) xml.color(self.instance_values) end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/ContentType.html b/doc/Axlsx/ContentType.html deleted file mode 100644 index aad3a085..00000000 --- a/doc/Axlsx/ContentType.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - Class: Axlsx::ContentType - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::ContentType - - - -

- -
- -
Inherits:
-
- SimpleTypedList - - - show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/content_type/content_type.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -
- - - - - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from SimpleTypedList

-

allowed_types, locked_at, serialize_as

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (ContentType) initialize - - - -

-
- -

A new instance of ContentType

- - -
-
-
- - -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/content_type/content_type.rb', line 8
-
-def initialize
-  super [Override, Default]
-end
-
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Axlsx::SimpleTypedList - -

- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml - - - -

-
- -

Generates the xml document for [Content_Types].xml

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The document as a string.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-17
-18
-19
-20
-21
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Core.html b/doc/Axlsx/Core.html deleted file mode 100644 index 69314818..00000000 --- a/doc/Axlsx/Core.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - - Class: Axlsx::Core - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Core - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/doc_props/core.rb
- -
-
- -

Overview

-
- -
- Note: -
-

Packages manage their own core object.

-
-
- - -

The core object for the package.

- - -
-
-
- - -

See Also:

-
    - -
  • Package#core
  • - -
- -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Core) initialize(options = {}) - - - -

-
- -

Creates a new Core object.

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - creator - (String) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/doc_props/core.rb', line 12
-
-def initialize(options={})
-  @creator = options[:creator] || 'axlsx'      
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) creator - - - -

-
- -

The author of the document. By default this is ‘axlsx’

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/doc_props/core.rb', line 8
-
-def creator
-  @creator
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml - - - -

-
- -

Serializes the core object. The created dcterms item is set to the current -time when this method is called.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/DataTypeValidator.html b/doc/Axlsx/DataTypeValidator.html deleted file mode 100644 index b120e469..00000000 --- a/doc/Axlsx/DataTypeValidator.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - Class: Axlsx::DataTypeValidator - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::DataTypeValidator - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/util/validators.rb
- -
-
- -

Overview

-
- -

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.

- - -
-
-
- - -
- - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Boolean) validate(name, types, v, other = lambda{|arg| true }) - - - -

-
- -

Perform validation

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - - — -
    -

    The name of what is being validated. This is included in the error message

    -
    - -
  • - -
  • - - types - - - (Array, Class) - - - - — -
    -

    A single class or array of classes that the value is validated against.

    -
    - -
  • - -
  • - - other - - - (Block) - - - (defaults to: lambda{|arg| true }) - - - — -
    -

    Any block that must evaluate to true for the value to be valid

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if validation succeeds.

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - (ArugumentError) - - - - — -
    -

    Raised if the class of the value provided is not in the specified array of -types or the block passed returns false

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Default.html b/doc/Axlsx/Default.html deleted file mode 100644 index 20e7aab2..00000000 --- a/doc/Axlsx/Default.html +++ /dev/null @@ -1,553 +0,0 @@ - - - - - - Class: Axlsx::Default - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Default - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/content_type/default.rb
- -
-
- -

Overview

-
- -

An default content part. These parts are automatically created by for you -based on the content of your package.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Default) initialize(options = {}) - - - -

-
- -

Creates a new Default object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - Extension - (String) - - - - -
  • - -
  • - ContentType - (String) - - - - -
  • - -
- - -

Raises:

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

    An argument error is raised if both Extension and ContentType are not -specified.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) ContentType - - - -

-
- -

The type of content.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/content_type/default.rb', line 11
-
-def ContentType
-  @ContentType
-end
-
-
-
- - - - -
-

- - - (String) Extension - - - -

-
- -

The extension of the content type.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/axlsx/content_type/default.rb', line 7
-
-def Extension
-  @Extension
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the object to xml

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/content_type/default.rb', line 33
-
-def to_xml(xml)
-  xml.Default(self.instance_values)
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Drawing.html b/doc/Axlsx/Drawing.html deleted file mode 100644 index b6e3ee72..00000000 --- a/doc/Axlsx/Drawing.html +++ /dev/null @@ -1,1230 +0,0 @@ - - - - - - Class: Axlsx::Drawing - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Drawing - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/drawing.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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 -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.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Drawing) initialize(worksheet) - - - -

-
- -

Creates a new Drawing object

- - -
-
-
-

Parameters:

-
    - -
  • - - worksheet - - - (Worksheet) - - - - — -
    -

    The worksheet that owns this drawing

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-52
-53
-54
-55
-56
-57
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (SimpleTypedList) anchors (readonly) - - - -

-
- -

A collection of anchors for this drawing only TwoCellAnchors are supported -in this version

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-48
-49
-50
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 48
-
-def anchors
-  @anchors
-end
-
-
-
- - - - -
-

- - - (Worksheet) worksheet (readonly) - - - -

-
- -

The worksheet that owns the drawing

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 43
-
-def worksheet
-  @worksheet
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) add_chart(chart_type, options = {}) - - - -

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-70
-71
-72
-73
-
-
# 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
-
-
-
- -
-

- - - (Object) add_image(options = {}) - - - -

-
- -
- Note: -
-

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

- - -
-
-
- - -

See Also:

- - -
- - - - -
-
-
-
-62
-63
-64
-65
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 62
-
-def add_image(options={})
-  OneCellAnchor.new(self, options)
-  @anchors.last.object
-end
-
-
-
- -
-

- - - (Array) charts - - - -

-
- -

An array of charts that are associated with this drawing’s anchors

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-
-
# 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
-
-
-
- -
-

- - - (Array) images - - - -

-
- -

An array of image objects that are associated with this drawing’s anchors

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-84
-85
-86
-87
-
-
# 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
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of this drawing in the owning workbooks’s drawings collection.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-91
-92
-93
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 91
-
-def index
-  @worksheet.workbook.drawings.index(self)
-end
-
-
-
- -
-

- - - (String) pn - - - -

-
- -

The part name for this drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 103
-
-def pn
-  "#{DRAWING_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (Relationships) relationships - - - -

-
- -

The drawing’s relationships.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-115
-116
-117
-118
-119
-120
-121
-122
-123
-124
-
-
# 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
-
-
-
- -
-

- - - (String) rels_pn - - - -

-
- -

The relational part name for this drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-109
-110
-111
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 109
-
-def rels_pn
-  "#{DRAWING_RELS_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (String) rId - - - -

-
- -

The relation reference id for this drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-97
-98
-99
-
-
# File 'lib/axlsx/drawing/drawing.rb', line 97
-
-def rId
-  "rId#{index+1}"
-end
-
-
-
- -
-

- - - (String) to_xml - - - -

-
- -

Serializes the drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-128
-129
-130
-131
-132
-133
-134
-135
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Fill.html b/doc/Axlsx/Fill.html deleted file mode 100644 index d2ae770c..00000000 --- a/doc/Axlsx/Fill.html +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - Class: Axlsx::Fill - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Fill - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/fill.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Fill) initialize(fill_type) - - - -

-
- -

Creates a new Fill object

- - -
-
-
-

Parameters:

- - -

Raises:

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

    if the fill_type parameter is not a PatternFill or a GradientFill instance

    -
    - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/axlsx/stylesheet/fill.rb', line 16
-
-def initialize(fill_type)
-  self.fill_type = fill_type
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (PatternFill, GradientFill) fill_type - - - -

-
- -

The type of fill

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/stylesheet/fill.rb', line 11
-
-def fill_type
-  @fill_type
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the fill

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/axlsx/stylesheet/fill.rb', line 23
-
-def to_xml(xml)
-  xml.fill { @fill_type.to_xml(xml) }
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Font.html b/doc/Axlsx/Font.html deleted file mode 100644 index efc6b488..00000000 --- a/doc/Axlsx/Font.html +++ /dev/null @@ -1,1520 +0,0 @@ - - - - - - Class: Axlsx::Font - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Font - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/font.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Font) initialize(options = {}) - - - -

-
- -

Creates a new Font

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - name - (String) - - - - -
  • - -
  • - charset - (Integer) - - - - -
  • - -
  • - family - (Integer) - - - - -
  • - -
  • - family - (Integer) - - - - -
  • - -
  • - b - (Boolean) - - - - -
  • - -
  • - i - (Boolean) - - - - -
  • - -
  • - strike - (Boolean) - - - - -
  • - -
  • - outline - (Boolean) - - - - -
  • - -
  • - shadow - (Boolean) - - - - -
  • - -
  • - condense - (Boolean) - - - - -
  • - -
  • - extend - (Boolean) - - - - -
  • - -
  • - color - (Color) - - - - -
  • - -
  • - sz - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-98
-99
-100
-101
-102
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Boolean) b - - - -

-
- -

Indicates if the font should be rendered in bold

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-50
-51
-52
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 50
-
-def b
-  @b
-end
-
-
-
- - - - -
-

- - - (Integer) charset - - - -

-
- -
- 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 charset of the font

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 33
-
-def charset
-  @charset
-end
-
-
-
- - - - -
-

- - - (Color) color - - - -

-
- -

The color of the font

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Color) - - - -
  • - -
- -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 78
-
-def color
-  @color
-end
-
-
-
- - - - -
-

- - - (Boolean) condense - - - -

-
- -

Indicates if the font should be condensed

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 70
-
-def condense
-  @condense
-end
-
-
-
- - - - -
-

- - - (Boolean) extend - - - -

-
- -

The font’s extend property

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 74
-
-def extend
-  @extend
-end
-
-
-
- - - - -
-

- - - (Integer) family - - - -

-
- -
- 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 font’s family

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 46
-
-def family
-  @family
-end
-
-
-
- - - - -
-

- - - (Boolean) i - - - -

-
- -

Indicates if the font should be rendered italicized

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 54
-
-def i
-  @i
-end
-
-
-
- - - - -
-

- - - (String) name - - - -

-
- -

The name of the font

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 8
-
-def name
-  @name
-end
-
-
-
- - - - -
-

- - - (Boolean) outline - - - -

-
- -

Indicates if the font should be rendered with an outline

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-62
-63
-64
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 62
-
-def outline
-  @outline
-end
-
-
-
- - - - -
-

- - - (Boolean) shadow - - - -

-
- -

Indicates if the font should be rendered with a shadow

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 66
-
-def shadow
-  @shadow
-end
-
-
-
- - - - -
-

- - - (Boolean) strike - - - -

-
- -

Indicates if the font should be rendered with a strikthrough

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-58
-59
-60
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 58
-
-def strike
-  @strike
-end
-
-
-
- - - - -
-

- - - (Integer) sz - - - -

-
- -

The size of the font.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-
-
# File 'lib/axlsx/stylesheet/font.rb', line 82
-
-def sz
-  @sz
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the fill

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-131
-132
-133
-134
-135
-136
-137
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/GradientFill.html b/doc/Axlsx/GradientFill.html deleted file mode 100644 index 30fa6143..00000000 --- a/doc/Axlsx/GradientFill.html +++ /dev/null @@ -1,1004 +0,0 @@ - - - - - - Class: Axlsx::GradientFill - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::GradientFill - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/gradient_fill.rb
- -
-
- -

Overview

-
- -

A GradientFill defines the color and positioning for gradiant cell fill.

- - -
-
-
- - -

See Also:

-
    - -
  • Office XML Part 1 §18.8.24
  • - -
- -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (GradientFill) initialize(options = {}) - - - -

-
- -

Creates a new GradientFill object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - type - (Symbol) - - - - -
  • - -
  • - degree - (Float) - - - - -
  • - -
  • - left - (Float) - - - - -
  • - -
  • - right - (Float) - - - - -
  • - -
  • - top - (Float) - - - - -
  • - -
  • - bottom - (Float) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-52
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Float) bottom - - - -

-
- -

Percentage format bottom

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 33
-
-def bottom
-  @bottom
-end
-
-
-
- - - - -
-

- - - (Float) degree - - - -

-
- -

Angle of the linear gradient

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 17
-
-def degree
-  @degree
-end
-
-
-
- - - - -
-

- - - (Float) left - - - -

-
- -

Percentage format left

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 21
-
-def left
-  @left
-end
-
-
-
- - - - -
-

- - - (Float) right - - - -

-
- -

Percentage format right

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 25
-
-def right
-  @right
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) stop (readonly) - - - -

-
- -

Collection of stop objects

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 37
-
-def stop
-  @stop
-end
-
-
-
- - - - -
-

- - - (Float) top - - - -

-
- -

Percentage format top

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 29
-
-def top
-  @top
-end
-
-
-
- - - - -
-

- - - (Symbol) type - - - -

-
- -
- Note: -
-

valid options are

- -
:linear
-:path
-
-
-
- - -

The type of gradient.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/stylesheet/gradient_fill.rb', line 13
-
-def type
-  @type
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the gradientFill

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-73
-74
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/GradientStop.html b/doc/Axlsx/GradientStop.html deleted file mode 100644 index c767a85e..00000000 --- a/doc/Axlsx/GradientStop.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - - - Class: Axlsx::GradientStop - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::GradientStop - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/gradient_stop.rb
- -
-
- -

Overview

-
- -

The GradientStop object represents a color point in a gradient.

- - -
-
-
- - -

See Also:

-
    - -
  • Office XML Part 1 §18.8.24
  • - -
- -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (GradientStop) initialize(color, position) - - - -

-
- -

Creates a new GradientStop object

- - -
-
-
-

Parameters:

-
    - -
  • - - color - - - (Color) - - - -
  • - -
  • - - position - - - (Float) - - - -
  • - -
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-
-
# File 'lib/axlsx/stylesheet/gradient_stop.rb', line 18
-
-def initialize(color, position)
-  self.color = color
-  self.position = position
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Color) color - - - -

-
- -

The color for this gradient stop

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Color) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/stylesheet/gradient_stop.rb', line 9
-
-def color
-  @color
-end
-
-
-
- - - - -
-

- - - (Float) position - - - -

-
- -

The position of the color

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/stylesheet/gradient_stop.rb', line 13
-
-def position
-  @position
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the gradientStop

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-
-
# File 'lib/axlsx/stylesheet/gradient_stop.rb', line 31
-
-def to_xml(xml) xml.stop(:position => self.position) {self.color.to_xml(xml)} end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/GraphicFrame.html b/doc/Axlsx/GraphicFrame.html deleted file mode 100644 index 60a775d8..00000000 --- a/doc/Axlsx/GraphicFrame.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - - - Class: Axlsx::GraphicFrame - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::GraphicFrame - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/graphic_frame.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to manage charts is Worksheet#add_chart

-
-
- - -

A graphic frame defines a container for a chart object

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (GraphicFrame) initialize(anchor, chart_type, options) - - - -

-
- -

Creates a new GraphicFrame object

- - -
-
-
-

Parameters:

-
    - -
  • - - anchor - - - (TwoCellAnchor) - - - -
  • - -
  • - - chart_type - - - (Class) - - - -
  • - -
- - -
- - - - -
-
-
-
-18
-19
-20
-21
-22
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (TwoCellAnchor) anchor (readonly) - - - -

-
- -

A anchor that holds this frame

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/drawing/graphic_frame.rb', line 13
-
-def anchor
-  @anchor
-end
-
-
-
- - - - -
-

- - - (Chart) chart (readonly) - - - -

-
- -

A reference to the chart object associated with this frame

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Chart) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/drawing/graphic_frame.rb', line 9
-
-def chart
-  @chart
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) rId - - - -

-
- -

The relationship id for this graphic

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-26
-27
-28
-
-
# File 'lib/axlsx/drawing/graphic_frame.rb', line 26
-
-def rId 
-  "rId#{@anchor.index+1}"
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the graphic frame

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Line3DChart.html b/doc/Axlsx/Line3DChart.html deleted file mode 100644 index a0995552..00000000 --- a/doc/Axlsx/Line3DChart.html +++ /dev/null @@ -1,985 +0,0 @@ - - - - - - Class: Axlsx::Line3DChart - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Line3DChart - - - -

- -
- -
Inherits:
-
- Chart - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/line_3D_chart.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- -
-

Examples:

- -

-

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"
-
-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"]
-
- -
- - -

See Also:

- - -
-

Constant Summary

- -
- -
GAP_AMOUNT_PERCENT = -
-
- -

validation regex for gap amount percent

- - -
-
-
- - -
-
-
/0*(([0-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
-
- -
- - - - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Chart

-

graphic_frame, series, series_type, show_legend, style, title, view3D

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Chart

-

#add_series, #end_at, #from, #index, #pn, #start_at, #to

-
-

Constructor Details

- -
-

- - - (Line3DChart) initialize(frame, options = {}) - - - -

-
- -

Creates a new line chart object

- - -
-
-
-

Parameters:

-
    - -
  • - - frame - - - (GraphicFrame) - - - - — -
    -

    The workbook that owns this chart.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - title - (Cell, String) - - - - -
  • - -
  • - show_legend - (Boolean) - - - - -
  • - -
  • - grouping - (Symbol) - - - - -
  • - -
  • - gapDepth - (String) - - - - -
  • - -
  • - rotX - (Integer) - - - - -
  • - -
  • - hPercent - (String) - - - - -
  • - -
  • - rotY - (Integer) - - - - -
  • - -
  • - depthPercent - (String) - - - - -
  • - -
  • - rAngAx - (Boolean) - - - - -
  • - -
  • - perspective - (Integer) - - - - -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (CatAxis) catAxis (readonly) - - - -

-
- -

the category axis

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 25
-
-def catAxis
-  @catAxis
-end
-
-
-
- - - - -
-

- - - (String) gapDepth - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 37
-
-def gapDepth
-  @gapDepth
-end
-
-
-
- - - - -
-

- - - (Symbol) grouping - - - -

-
- -

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

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-42
-43
-44
-
-
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 42
-
-def grouping
-  @grouping
-end
-
-
-
- - - - -
-

- - - (Axis) serAxis (readonly) - - - -

-
- -

the category axis

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Axis) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 33
-
-def serAxis
-  @serAxis
-end
-
-
-
- - - - -
-

- - - (ValAxis) valAxis (readonly) - - - -

-
- -

the category axis

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/drawing/line_3D_chart.rb', line 29
-
-def valAxis
-  @valAxis
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml - - - -

-
- -

Serializes the bar chart

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/LineSeries.html b/doc/Axlsx/LineSeries.html deleted file mode 100644 index f45ede72..00000000 --- a/doc/Axlsx/LineSeries.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - Class: Axlsx::LineSeries - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::LineSeries - - - -

- -
- -
Inherits:
-
- Series - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/line_series.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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

-
-
- - -

A LineSeries defines the title, data and labels for line charts

- - -
-
-
- - -

See Also:

- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Series

-

chart, title

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Series

-

#index, #order, #order=

-
-

Constructor Details

- -
-

- - - (LineSeries) initialize(chart, options = {}) - - - -

-
- -

Creates a new series

- - -
-
-
-

Parameters:

-
    - -
  • - - chart - - - (Chart) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

- - - - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (ValAxisData) data - - - -

-
- -

The data for this series.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/axlsx/drawing/line_series.rb', line 10
-
-def data
-  @data
-end
-
-
-
- - - - -
-

- - - (CatAxisData) labels - - - -

-
- -

The labels for this series.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/drawing/line_series.rb', line 14
-
-def labels
-  @labels
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (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) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Marker.html b/doc/Axlsx/Marker.html deleted file mode 100644 index 9ae65689..00000000 --- a/doc/Axlsx/Marker.html +++ /dev/null @@ -1,837 +0,0 @@ - - - - - - Class: Axlsx::Marker - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Marker - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/marker.rb
- -
-
- -

Overview

-
- -
- 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 Marker class defines a point in the worksheet that drawing anchors -attach to.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Marker) initialize(options = {}) - - - -

-
- -

Creates a new Marker object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - col - (Integer) - - - - -
  • - -
  • - colOff - (Integer) - - - - -
  • - -
  • - row - (Integer) - - - - -
  • - -
  • - rowOff - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Integer) col - - - -

-
- -

The column this marker anchors to

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/drawing/marker.rb', line 9
-
-def col
-  @col
-end
-
-
-
- - - - -
-

- - - (Integer) colOff - - - -

-
- -

The offset distance from this marker’s column

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/drawing/marker.rb', line 13
-
-def colOff
-  @colOff
-end
-
-
-
- - - - -
-

- - - (Integer) row - - - -

-
- -

The row this marker anchors to

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/axlsx/drawing/marker.rb', line 17
-
-def row
-  @row
-end
-
-
-
- - - - -
-

- - - (Integer) rowOff - - - -

-
- -

The offset distance from this marker’s row

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/drawing/marker.rb', line 21
-
-def rowOff
-  @rowOff
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) coord(col, row) - - - -

-
- -

shortcut to set the column, row position for this marker

- - -
-
-
-

Parameters:

-
    - -
  • - - col - - - - - - - — -
    -

    the column for the marker

    -
    - -
  • - -
  • - - row - - - - - - - — -
    -

    the row of the marker

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-47
-48
-49
-50
-
-
# File 'lib/axlsx/drawing/marker.rb', line 47
-
-def coord(col, row)
-  self.col = col
-  self.row = row
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the marker

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-54
-55
-56
-57
-58
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/NumFmt.html b/doc/Axlsx/NumFmt.html deleted file mode 100644 index 968f5c9b..00000000 --- a/doc/Axlsx/NumFmt.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - Class: Axlsx::NumFmt - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::NumFmt - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/num_fmt.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to manage styles is Styles#add_style

-
-
- - -

A NumFmt object defines an identifier and formatting code for data in -cells.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (NumFmt) initialize(options = {}) - - - -

-
- -

A new instance of NumFmt

- - -
-
-
- - -
- - - - -
-
-
-
-45
-46
-47
-48
-49
-50
-51
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) formatCode - - - -

-
- -

The formatting to use for this number format.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - - — -
    -

    The formatting to use for this number format.

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-44
-45
-46
-
-
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 44
-
-def formatCode
-  @formatCode
-end
-
-
-
- - - - -
-

- - - (Integer) numFmtId - - - -

-
- -
- Note: -
-

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 @
-
-
-
- - -

An unsinged integer referencing a standard or custom number format.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - - — -
    -

    An unsinged integer referencing a standard or custom number format.

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-40
-41
-42
-
-
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 40
-
-def numFmtId
-  @numFmtId
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) to_xml(xml) - - - -

-
- -

Creates a numFmt element applying the instance values of this object as -attributes.

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-60
-
-
# File 'lib/axlsx/stylesheet/num_fmt.rb', line 60
-
-def to_xml(xml) xml.numFmt(self.instance_values) end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/OneCellAnchor.html b/doc/Axlsx/OneCellAnchor.html deleted file mode 100644 index 40e76ca2..00000000 --- a/doc/Axlsx/OneCellAnchor.html +++ /dev/null @@ -1,958 +0,0 @@ - - - - - - Class: Axlsx::OneCellAnchor - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::OneCellAnchor - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/one_cell_anchor.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (OneCellAnchor) initialize(drawing, options = {}) - - - -

-
- -

Creates a new OneCellAnchor object and an Pic associated with it.

- - -
-
-
-

Parameters:

-
    - -
  • - - drawing - - - (Drawing) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - start_at - (Array) - - - - —
    -

    the col, row to start at

    -
    -
  • - -
  • - width - (Integer) - - - - -
  • - -
  • - height - (Integer) - - - - -
  • - -
  • - image_src - (String) - - - - —
    -

    the file location of the image you will render

    -
    -
  • - -
  • - name - (String) - - - - —
    -

    the name attribute for the rendered image

    -
    -
  • - -
  • - descr - (String) - - - - —
    -

    the description of the image rendered

    -
    -
  • - -
- - - -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Drawing) drawing (readonly) - - - -

-
- -

The drawing that holds this anchor

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 18
-
-def drawing
-  @drawing
-end
-
-
-
- - - - -
-

- - - (Marker) from (readonly) - - - -

-
- -

A marker that defines the from cell anchor. The default from column and row -are 0 and 0 respectively

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Marker) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 10
-
-def from
-  @from
-end
-
-
-
- - - - -
-

- - - (Integer) height - - - -

-
- -

the height of the graphic object in pixels this is converted to EMU at a 92 -ppi resolution

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-28
-29
-30
-
-
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 28
-
-def height
-  @height
-end
-
-
-
- - - - -
-

- - - (Pic) object (readonly) - - - -

-
- -

The object this anchor hosts

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Pic) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 14
-
-def object
-  @object
-end
-
-
-
- - - - -
-

- - - (Integer) width - - - -

-
- -

the width of the graphic object in pixels. this is converted to EMU at a 92 -ppi resolution

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 23
-
-def width
-  @width
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Integer) index - - - -

-
- -

The index of this anchor in the drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/axlsx/drawing/one_cell_anchor.rb', line 59
-
-def index
-  @drawing.anchors.index(self)
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the anchor

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Override.html b/doc/Axlsx/Override.html deleted file mode 100644 index 68ce281e..00000000 --- a/doc/Axlsx/Override.html +++ /dev/null @@ -1,540 +0,0 @@ - - - - - - Class: Axlsx::Override - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Override - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/content_type/override.rb
- -
-
- -

Overview

-
- -

An override content part. These parts are automatically created by for you -based on the content of your package.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Override) initialize(options = {}) - - - -

-
- -

Creates a new Override object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - PartName - (String) - - - - -
  • - -
  • - ContentType - (String) - - - - -
  • - -
- - -

Raises:

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

    An argument error is raised if both PartName and ContentType are not -specified.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-22
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) ContentType - - - -

-
- -

The type of content.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/axlsx/content_type/override.rb', line 7
-
-def ContentType
-  @ContentType
-end
-
-
-
- - - - -
-

- - - (String) PartName - - - -

-
- -

The name and location of the part.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/content_type/override.rb', line 11
-
-def PartName
-  @PartName
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) to_xml(xml) - - - -

-
- -

Serializes the Override object to xml

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/content_type/override.rb', line 33
-
-def to_xml(xml)
-  xml.Override(self.instance_values)
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Package.html b/doc/Axlsx/Package.html deleted file mode 100644 index 29c1b79f..00000000 --- a/doc/Axlsx/Package.html +++ /dev/null @@ -1,885 +0,0 @@ - - - - - - Class: Axlsx::Package - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Package - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/package.rb
- -
-
- -

Overview

-
- -

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.

- - -
-
-
- - -
- - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Package) initialize(options = {}) {|_self| ... } - - - -

-
- -

Initializes your package

- - -
-
-
- -
-

Examples:

- -

-

Package.new :author => ‘you!’, :workbook => Workbook.new

-

-
-
- -
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    A hash that you can use to specify the author and workbook for this -package.

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - :author - (String) - - - - —
    -

    The author of the document

    -
    -
  • - -
- - -

Yields:

-
    - -
  • - - - (_self) - - - -
  • - -
-

Yield Parameters:

-
    - -
  • - - _self - - - (Axlsx::Package) - - - - — -
    -

    the object that the method was called on

    -
    - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-15
-16
-17
-
-
# 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
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) ruport_table(table) - - - -

-
- -

Accepts a ruport table for serialization to xlsx

- - -
-
-
-

Parameters:

-
    - -
  • - - table - - - (Table) - - - - — -
    -

    a ruport Table object

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/package.rb', line 21
-
-def ruport_table(table)
-  puts table
-end
-
-
-
- -
-

- - - (Boolean) serialize(output, confirm_valid = false) - - - -

-
- -
- Note: -
-

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.

-
-
- - -

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)
-
-# You will find a file called test.xlsx
-
- -
-

Parameters:

-
    - -
  • - - output - - - (File) - - - - — -
    -

    The file you want to serialize your package to

    -
    - -
  • - -
  • - - confirm_valid - - - (Boolean) - - - (defaults to: false) - - - — -
    -

    Validate the package prior to serialization.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    False if confirm_valid and validation errors exist. True if the package was -serialized

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-
-
# 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
-
-
-
- -
-

- - - (Array) validate - - - -

-
- -
- Note: -
-

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 -indicates that the internal validation is not robust enough and needs to be -improved. Please report your errors to the gem author.

-
-
- - -

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 }
-
- -
- -

Returns:

-
    - -
  • - - - (Array) - - - - — -
    -

    An array of all validation errors found.

    -
    - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-95
-96
-97
-98
-99
-
-
# 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
-
-
-
- -
-

- - - (Workbook) workbook {|@workbook| ... } - - - -

-
- -
- 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
-
-
-
- - -

The workbook this package will serialize or validate.

- - -
-
-
- -

Yields:

-
    - -
  • - - - (@workbook) - - - -
  • - -
-

Returns:

-
    - -
  • - - - (Workbook) - - - - — -
    -

    If no workbook instance has been assigned with this package a new Workbook -instance is returned.

    -
    - -
  • - -
-

Raises:

-
    - -
  • - - - - - - - -
    -

    ArgumentError if workbook parameter is not a Workbook instance.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-40
-41
-
-
# File 'lib/axlsx/package.rb', line 37
-
-def workbook
-  @workbook || @workbook = Workbook.new
-  yield @workbook if block_given?
-  @workbook
-end
-
-
-
- -
-

- - - (Object) workbook=(workbook) - - - -

-
- - -
-
-
- - -

See Also:

-
    - -
  • workbook
  • - -
- -
- - - - -
-
-
-
-44
-
-
# File 'lib/axlsx/package.rb', line 44
-
-def workbook=(workbook) DataTypeValidator.validate "Package.workbook", Workbook, workbook; @workbook = workbook end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/PatternFill.html b/doc/Axlsx/PatternFill.html deleted file mode 100644 index a4a6e647..00000000 --- a/doc/Axlsx/PatternFill.html +++ /dev/null @@ -1,666 +0,0 @@ - - - - - - Class: Axlsx::PatternFill - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::PatternFill - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/pattern_fill.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to manage styles is with Styles#add_style

-
-
- - -

A PatternFill is the pattern and solid fill styling for a cell.

- - -
-
-
- - -

See Also:

-
    - -
  • Style#add_style
  • - -
- -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (PatternFill) initialize(options = {}) - - - -

-
- -

Creates a new PatternFill Object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - patternType - (Symbol) - - - - -
  • - -
  • - fgColor - (Color) - - - - -
  • - -
  • - bgColor - (Color) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Color) bgColor - - - -

-
- -

The color to use for the background of the fill when the type is not solid.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Color) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 13
-
-def bgColor
-  @bgColor
-end
-
-
-
- - - - -
-

- - - (Color) fgColor - - - -

-
- -

The color to use for the the background in solid fills.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Color) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 9
-
-def fgColor
-  @fgColor
-end
-
-
-
- - - - -
-

- - - (Object) patternType - - - -

-
- -
- 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
-
-
-
- - -

The pattern type to use

- - -
-
-
- - -

See Also:

-
    - -
  • Open XML Part 1 18.18.55
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/axlsx/stylesheet/pattern_fill.rb', line 38
-
-def patternType
-  @patternType
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the pattern fill

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-60
-61
-62
-63
-64
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Pic.html b/doc/Axlsx/Pic.html deleted file mode 100644 index cb791160..00000000 --- a/doc/Axlsx/Pic.html +++ /dev/null @@ -1,1594 +0,0 @@ - - - - - - Class: Axlsx::Pic - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Pic - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/pic.rb
- -
-
- -

Overview

-
- -

a Pic object represents an image in your worksheet Worksheet#add_image is -the recommended way to manage images in your sheets

- - -
-
-
- - -

See Also:

- - -
-

Constant Summary

- -
- -
ALLOWED_EXTENSIONS = -
-
- -

allowed file extenstions

- - -
-
-
- - -
-
-
['gif', 'jpeg', 'png', 'jpg']
-
- -
- - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Pic) initialize(anchor, options = {}) {|_self| ... } - - - -

-
- -

Creates a new Pic(ture) object

- - -
-
-
-

Parameters:

-
    - -
  • - - anchor - - - (Anchor) - - - - — -
    -

    the anchor that holds this image

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - name - (String) - - - - -
  • - -
  • - descr - (String) - - - - -
  • - -
  • - image_src - (String) - - - - -
  • - -
  • - start_at - (Array) - - - - -
  • - -
  • - width - (Intger) - - - - -
  • - -
  • - height - (Intger) - - - - -
  • - -
- - -

Yields:

-
    - -
  • - - - (_self) - - - -
  • - -
-

Yield Parameters:

-
    - -
  • - - _self - - - (Axlsx::Pic) - - - - — -
    -

    the object that the method was called on

    -
    - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-43
-44
-45
-46
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (OneCellAnchor) anchor (readonly) - - - -

-
- -

The anchor for this image

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'lib/axlsx/drawing/pic.rb', line 27
-
-def anchor
-  @anchor
-end
-
-
-
- - - - -
-

- - - (String) descr - - - -

-
- -

A description of the picture

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/axlsx/drawing/pic.rb', line 18
-
-def descr
-  @descr
-end
-
-
-
- - - - -
-

- - - (String) image_src - - - -

-
- -

The path to the image you want to include Only local images are supported -at this time and only jpg support

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/axlsx/drawing/pic.rb', line 23
-
-def image_src
-  @image_src
-end
-
-
-
- - - - -
-

- - - (String) name - - - -

-
- -

The name to use for this picture

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/drawing/pic.rb', line 13
-
-def name
-  @name
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) extname - - - -

-
- -

returns the extension of image_src without the preceeding ‘.’

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-70
-71
-72
-
-
# File 'lib/axlsx/drawing/pic.rb', line 70
-
-def extname
-  File.extname(image_src).delete('.') unless image_src.nil?
-end
-
-
-
- -
-

- - - (String) file_name - - - -

-
- -

The file name of image_src without any path information

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-64
-65
-66
-
-
# File 'lib/axlsx/drawing/pic.rb', line 64
-
-def file_name
-  File.basename(image_src) unless image_src.nil?
-end
-
-
-
- -
-

- - - (Object) height - - - -

-
- -

providing access to update the anchor’s height attribute

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Integer) - - - -
  • - -
- - -

See Also:

-
    - -
  • OneCellAnchor.width
  • - -
- -
- - - - -
-
-
-
-101
-102
-103
-
-
# File 'lib/axlsx/drawing/pic.rb', line 101
-
-def height
-  @anchor.height
-end
-
-
-
- -
-

- - - (Object) height=(v) - - - -

-
- - -
-
-
- - -

See Also:

-
    - -
  • height
  • - -
- -
- - - - -
-
-
-
-106
-107
-108
-
-
# File 'lib/axlsx/drawing/pic.rb', line 106
-
-def height=(v)
-  @anchor.height = v
-end
-
-
-
- -
-

- - - (Index) index - - - -

-
- -

The index of this image in the workbooks images collections

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Index) - - - -
  • - -
- -
- - - - -
-
-
-
-76
-77
-78
-
-
# File 'lib/axlsx/drawing/pic.rb', line 76
-
-def index
-  @anchor.drawing.worksheet.workbook.images.index(self)
-end
-
-
-
- -
-

- - - (String) pn - - - -

-
- -

The part name for this image used in serialization and relationship -building

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-82
-83
-84
-
-
# File 'lib/axlsx/drawing/pic.rb', line 82
-
-def pn
-  "#{IMAGE_PN % [(index+1), extname]}"
-end
-
-
-
- -
-

- - - (Marker) start_at(x, y) - - - -

-
- -

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

- - -
-
-
-

Parameters:

-
    - -
  • - - x - - - (Integer) - - - - — -
    -

    The column

    -
    - -
  • - -
  • - - y - - - (Integer) - - - - — -
    -

    The row

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Marker) - - - -
  • - -
- -
- - - - -
-
-
-
-116
-117
-118
-119
-
-
# File 'lib/axlsx/drawing/pic.rb', line 116
-
-def start_at(x, y)
-  @anchor.from.col = x
-  @anchor.from.row = y
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the picture

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-
-
# 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
-
-
-
- -
-

- - - (Object) width - - - -

-
- -

providing access to the anchor’s width attribute

- - -
-
-
-

Parameters:

-
    - -
  • - - v - - - (Integer) - - - -
  • - -
- - -

See Also:

-
    - -
  • OneCellAnchor.width
  • - -
- -
- - - - -
-
-
-
-89
-90
-91
-
-
# File 'lib/axlsx/drawing/pic.rb', line 89
-
-def width
-  @anchor.width
-end
-
-
-
- -
-

- - - (Object) width=(v) - - - -

-
- - -
-
-
- - -

See Also:

-
    - -
  • width
  • - -
- -
- - - - -
-
-
-
-94
-95
-96
-
-
# File 'lib/axlsx/drawing/pic.rb', line 94
-
-def width=(v)
-  @anchor.width = v
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Pie3DChart.html b/doc/Axlsx/Pie3DChart.html deleted file mode 100644 index 21cd7df4..00000000 --- a/doc/Axlsx/Pie3DChart.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - Class: Axlsx::Pie3DChart - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Pie3DChart - - - -

- -
- -
Inherits:
-
- Chart - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/pie_3D_chart.rb
- -
-
- -

Overview

-
- -

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

- - -
-
-
- - -

See Also:

- - -
- - - - - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Chart

-

graphic_frame, series, series_type, show_legend, style, title, view3D

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Chart

-

#add_series, #end_at, #from, #index, #pn, #start_at, #to

-
-

Constructor Details

- -
-

- - - (Pie3DChart) initialize(frame, options = {}) - - - -

-
- -

Creates a new pie chart object

- - -
-
-
-

Parameters:

-
    - -
  • - - frame - - - (GraphicFrame) - - - - — -
    -

    The workbook that owns this chart.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - title - (Cell, String) - - - - -
  • - -
  • - show_legend - (Boolean) - - - - -
  • - -
  • - grouping - (Symbol) - - - - -
  • - -
  • - gapDepth - (String) - - - - -
  • - -
  • - rotX - (Integer) - - - - -
  • - -
  • - hPercent - (String) - - - - -
  • - -
  • - rotY - (Integer) - - - - -
  • - -
  • - depthPercent - (String) - - - - -
  • - -
  • - rAngAx - (Boolean) - - - - -
  • - -
  • - perspective - (Integer) - - - - -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-24
-25
-26
-27
-28
-
-
# 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
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml - - - -

-
- -

Serializes the pie chart

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-32
-33
-34
-35
-36
-37
-38
-39
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/PieSeries.html b/doc/Axlsx/PieSeries.html deleted file mode 100644 index 49c37a7c..00000000 --- a/doc/Axlsx/PieSeries.html +++ /dev/null @@ -1,696 +0,0 @@ - - - - - - Class: Axlsx::PieSeries - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::PieSeries - - - -

- -
- -
Inherits:
-
- Series - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/pie_series.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Series

-

chart, title

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Series

-

#index, #order, #order=

-
-

Constructor Details

- -
-

- - - (PieSeries) initialize(chart, options = {}) - - - -

-
- -

Creates a new series

- - -
-
-
-

Parameters:

-
    - -
  • - - chart - - - (Chart) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - data - (Array, SimpleTypedList) - - - - -
  • - -
  • - labels - (Array, SimpleTypedList) - - - - -
  • - -
  • - title - (String) - - - - -
  • - -
  • - explosion - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-26
-27
-28
-29
-30
-31
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (SimpleTypedList) data - - - -

-
- -

The data for this series.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/axlsx/drawing/pie_series.rb', line 10
-
-def data
-  @data
-end
-
-
-
- - - - -
-

- - - (Integert) explosion - - - -

-
- -

The explosion for this series

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integert) - - - -
  • - -
- -
- - - - -
-
-
-
-18
-19
-20
-
-
# File 'lib/axlsx/drawing/pie_series.rb', line 18
-
-def explosion
-  @explosion
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) labels - - - -

-
- -

The labels for this series.

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/drawing/pie_series.rb', line 14
-
-def labels
-  @labels
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (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) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-42
-43
-44
-45
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/RegexValidator.html b/doc/Axlsx/RegexValidator.html deleted file mode 100644 index 0e7baede..00000000 --- a/doc/Axlsx/RegexValidator.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - Class: Axlsx::RegexValidator - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::RegexValidator - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/util/validators.rb
- -
-
- -

Overview

-
- -

Validates the value against the regular expression provided.

- - -
-
-
- - -
- - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Object) validate(name, regex, v) - - - -

-
- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - - — -
    -

    The name of what is being validated. This is included in the output when -the value is invalid

    -
    - -
  • - -
  • - - regex - - - (Regexp) - - - - — -
    -

    The regular expression to evaluate

    -
    - -
  • - -
  • - - v - - - (Any) - - - - — -
    -

    The value to validate.

    -
    - -
  • - -
- -

Raises:

-
    - -
  • - - - (ArgumentError) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Relationship.html b/doc/Axlsx/Relationship.html deleted file mode 100644 index e0f7b487..00000000 --- a/doc/Axlsx/Relationship.html +++ /dev/null @@ -1,541 +0,0 @@ - - - - - - Class: Axlsx::Relationship - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Relationship - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/rels/relationship.rb
- -
-
- -

Overview

-
- -
- Note: -
-

Packages automatcially manage relationships.

-
-
- - -

A relationship defines a reference between package parts.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Relationship) initialize(type, target) - - - -

-
- -

A new instance of Relationship

- - -
-
-
- - -
- - - - -
-
-
-
-24
-25
-26
-27
-
-
# File 'lib/axlsx/rels/relationship.rb', line 24
-
-def initialize(type, target)
-  self.Target=target
-  self.Type=type
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) Target - - - -

-
- -

The location of the relationship target

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/rels/relationship.rb', line 8
-
-def Target
-  @Target
-end
-
-
-
- - - - -
-

- - - (String) Type - - - -

-
- -
- Note: -
-

Supported types are defined as constants in Axlsx:

-
-
- - -

The type of relationship

- - -
-
-
- -

Returns:

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

See Also:

- - -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/axlsx/rels/relationship.rb', line 23
-
-def Type
-  @Type
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml, rId) - - - -

-
- -

Serializes the relationship

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
  • - - rId - - - (String) - - - - — -
    -

    the reference id of the object.

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-
-
# File 'lib/axlsx/rels/relationship.rb', line 38
-
-def to_xml(xml, rId)
-  h = self.instance_values
-  h[:Id] = rId
-  xml.Relationship(h)
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Relationships.html b/doc/Axlsx/Relationships.html deleted file mode 100644 index fd687a8b..00000000 --- a/doc/Axlsx/Relationships.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - Class: Axlsx::Relationships - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Relationships - - - -

- -
- -
Inherits:
-
- SimpleTypedList - - - show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/rels/relationships.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The package automatically manages releationships.

-
-
- - -

Relationships are a collection of Relations that define how package parts -are related.

- - -
-
-
- - -
- - - - - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from SimpleTypedList

-

allowed_types, locked_at, serialize_as

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (Relationships) initialize - - - -

-
- -

Creates a new Relationships collection based on SimpleTypedList

- - -
-
-
- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/rels/relationships.rb', line 9
-
-def initialize
-  super Relationship
-end
-
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Axlsx::SimpleTypedList - -

- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml - - - -

-
- -

Serializes the relationships document.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-15
-16
-17
-18
-19
-20
-21
-22
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/RestrictionValidator.html b/doc/Axlsx/RestrictionValidator.html deleted file mode 100644 index a5a2bb53..00000000 --- a/doc/Axlsx/RestrictionValidator.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - Class: Axlsx::RestrictionValidator - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::RestrictionValidator - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/util/validators.rb
- -
-
- -

Overview

-
- -

Validate a value against a specific list of allowed values.

- - -
-
-
- - -
- - - - - -

- Class Method Summary - (collapse) -

- - - - - - -
-

Class Method Details

- - -
-

- - + (Boolean) validate(name, choices, v) - - - -

-
- -

Perform validation

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - - — -
    -

    The name of what is being validatied. This is included in the error message

    -
    - -
  • - -
  • - - choices - - - (Array) - - - - — -
    -

    The list of choices to validate against

    -
    - -
  • - -
  • - - v - - - (Any) - - - - — -
    -

    The value to be validated

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Boolean) - - - - — -
    -

    true if validation succeeds.

    -
    - -
  • - -
-

Raises:

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

    Raised if the value provided is not in the list of choices.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-13
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Row.html b/doc/Axlsx/Row.html deleted file mode 100644 index 8a8639bf..00000000 --- a/doc/Axlsx/Row.html +++ /dev/null @@ -1,896 +0,0 @@ - - - - - - Class: Axlsx::Row - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Row - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/workbook/worksheet/row.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to manage rows and cells is to use Worksheet#add_row

-
-
- - -

A Row is a single row in a worksheet.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Row) initialize(worksheet, values = [], options = {}) - - - -

-
- -

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.
-
- - -
-
-
-

Parameters:

-
    - -
  • - - worksheet - - - (Worksheet) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - values - (Array) - - - - -
  • - -
  • - types - (Array, Symbol) - - - - -
  • - -
  • - style - (Array, Integer) - - - - -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-29
-30
-31
-32
-33
-34
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (SimpleTypedList) cells (readonly) - - - -

-
- -

The cells this row holds

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/workbook/worksheet/row.rb', line 13
-
-def cells
-  @cells
-end
-
-
-
- - - - -
-

- - - (Worksheet) worksheet - - - -

-
- -

The worksheet this row belongs to

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/workbook/worksheet/row.rb', line 9
-
-def worksheet
-  @worksheet
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Cell) add_cell(value = "", options = {}) - - - -

-
- -

Adds a singel sell to the row based on the data provided and updates the -worksheet’s autofit data.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Cell) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-54
-55
-
-
# 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
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of this row in the worksheet

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/axlsx/workbook/worksheet/row.rb', line 38
-
-def index 
-  worksheet.rows.index(self)
-end
-
-
-
- -
-

- - - (Object) style=(style) - - - -

-
- -

sets the style for every cell in this row

- - -
-
-
- - -
- - - - -
-
-
-
-58
-59
-60
-61
-62
-63
-
-
# 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
-
-
-
- -
-

- - - (Array) to_ary - - - -

-
- -

returns the cells in this row as an array This lets us transpose the rows -into columns

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - -
  • - -
- -
- - - - -
-
-
-
-68
-69
-70
-
-
# File 'lib/axlsx/workbook/worksheet/row.rb', line 68
-
-def to_ary
-  @cells.to_ary
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the row

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-45
-46
-47
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Scaling.html b/doc/Axlsx/Scaling.html deleted file mode 100644 index 333a8ba2..00000000 --- a/doc/Axlsx/Scaling.html +++ /dev/null @@ -1,727 +0,0 @@ - - - - - - Class: Axlsx::Scaling - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Scaling - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/scaling.rb
- -
-
- -

Overview

-
- -

The Scaling class defines axis scaling

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Scaling) initialize(options = {}) - - - -

-
- -

creates a new Scaling object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - logBase - (Integer, Fixnum) - - - - -
  • - -
  • - orientation - (Symbol) - - - - -
  • - -
  • - max - (Float) - - - - -
  • - -
  • - min - (Float) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-28
-29
-30
-31
-32
-33
-34
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Integer) logBase - - - -

-
- -

logarithmic base for a logarithmic axis. must be between 2 and 1000

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/drawing/scaling.rb', line 8
-
-def logBase
-  @logBase
-end
-
-
-
- - - - -
-

- - - (Float) max - - - -

-
- -

the maximum scaling

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-17
-18
-19
-
-
# File 'lib/axlsx/drawing/scaling.rb', line 17
-
-def max
-  @max
-end
-
-
-
- - - - -
-

- - - (Float) min - - - -

-
- -

the minimu scaling

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/drawing/scaling.rb', line 21
-
-def min
-  @min
-end
-
-
-
- - - - -
-

- - - (Symbol) orientation - - - -

-
- -

the orientation of the axis must be one of [:minMax, :maxMin]

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/drawing/scaling.rb', line 13
-
-def orientation
-  @orientation
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the axId

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-54
-55
-56
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/SerAxis.html b/doc/Axlsx/SerAxis.html deleted file mode 100644 index 34b87079..00000000 --- a/doc/Axlsx/SerAxis.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - - - Class: Axlsx::SerAxis - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::SerAxis - - - -

- -
- -
Inherits:
-
- Axis - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/ser_axis.rb
- -
-
- -

Overview

-
- -

A SerAxis object defines a series axis

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Axis

-

axId, axPos, crossAx, crosses, format_code, scaling, tickLblPos

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (SerAxis) initialize(axId, crossAx, options = {}) - - - -

-
- -

Creates a new SerAxis object

- - -
-
-
-

Parameters:

-
    - -
  • - - axId - - - (Integer) - - - - — -
    -

    the id of this axis. Inherited

    -
    - -
  • - -
  • - - crossAx - - - (Integer) - - - - — -
    -

    the id of the perpendicular axis. Inherited

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - axPos. - (Symbol) - - - - —
    -

    Inherited

    -
    -
  • - -
  • - tickLblPos. - (Symbol) - - - - —
    -

    Inherited

    -
    -
  • - -
  • - crosses. - (Symbol) - - - - —
    -

    Inherited

    -
    -
  • - -
  • - tickLblSkip - (Integer) - - - - -
  • - -
  • - tickMarkSkip - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-21
-22
-23
-24
-
-
# File 'lib/axlsx/drawing/ser_axis.rb', line 21
-
-def initialize(axId, crossAx, options={})
-  @tickLblSkip, @tickMarkSkip = nil, nil
-  super(axId, crossAx, options)
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Integer) tickLblSkip - - - -

-
- -

The number of tick lables to skip between labels

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/axlsx/drawing/ser_axis.rb', line 7
-
-def tickLblSkip
-  @tickLblSkip
-end
-
-
-
- - - - -
-

- - - (Boolean) tickMarkSkip - - - -

-
- -

The number of tickmarks to be skipped before the next one is rendered.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/drawing/ser_axis.rb', line 11
-
-def tickMarkSkip
-  @tickMarkSkip
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the series axis

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-38
-39
-40
-41
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Series.html b/doc/Axlsx/Series.html deleted file mode 100644 index a86ebc17..00000000 --- a/doc/Axlsx/Series.html +++ /dev/null @@ -1,797 +0,0 @@ - - - - - - Class: Axlsx::Series - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Series - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/series.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -

See Also:

- - -
-

Direct Known Subclasses

-

BarSeries, LineSeries, PieSeries

-
- - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Series) initialize(chart, options = {}) - - - -

-
- -

Creates a new series

- - -
-
-
-

Parameters:

-
    - -
  • - - chart - - - (Chart) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - order - (Integer) - - - - -
  • - -
  • - title - (String) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-20
-21
-22
-23
-24
-25
-26
-27
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Chart) chart - - - -

-
- -

The chart that owns this series

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Chart) - - - -
  • - -
- -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/axlsx/drawing/series.rb', line 10
-
-def chart
-  @chart
-end
-
-
-
- - - - -
-

- - - (SeriesTitle) title - - - -

-
- -

The title of the series

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/drawing/series.rb', line 14
-
-def title
-  @title
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Integer) index - - - -

-
- -

The index of this series in the chart’s series.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/axlsx/drawing/series.rb', line 31
-
-def index
-  @chart.series.index(self)
-end
-
-
-
- -
-

- - - (Integer) order - - - -

-
- -

The order of this series in the chart’s series. By default the order is -the index of the series.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/axlsx/drawing/series.rb', line 38
-
-def order
-  @order || index
-end
-
-
-
- -
-

- - - (Object) order=(v) - - - -

-
- - -
-
-
- - -

See Also:

-
    - -
  • order
  • - -
- -
- - - - -
-
-
-
-43
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/SeriesTitle.html b/doc/Axlsx/SeriesTitle.html deleted file mode 100644 index 08954e4c..00000000 --- a/doc/Axlsx/SeriesTitle.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - Class: Axlsx::SeriesTitle - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::SeriesTitle - - - -

- -
- -
Inherits:
-
- Title - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/series_title.rb
- -
-
- -

Overview

-
- -

A series title is a Title with a slightly different serialization than -chart titles.

- - -
-
-
- - -
- - - - - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from Title

-

cell, text

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from Title

-

#initialize

-
-

Constructor Details

- -

This class inherits a constructor from Axlsx::Title

- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the series title

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Styles.html b/doc/Axlsx/Styles.html deleted file mode 100644 index 4c5f376d..00000000 --- a/doc/Axlsx/Styles.html +++ /dev/null @@ -1,1700 +0,0 @@ - - - - - - Class: Axlsx::Styles - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Styles - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/styles.rb
- -
-
- -

Overview

-
- -
- Note: -
-

The recommended way to manage styles is with add_style

-
-
- - -

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.

- - -
-
-
- - -

See Also:

-
    - -
  • Open XML Part 1 18.8.11 for gory details on how this stuff gets put together
  • - -
  • #add_style
  • - -
- -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Styles) initialize - - - -

-
- -

Creates a new Styles object and prepopulates it with the requires objects -to generate a valid package style part.

- - -
-
-
- - -
- - - - -
-
-
-
-118
-119
-120
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 118
-
-def initialize()
-  load_default_styles
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (SimpleTypedList) borders (readonly) - - - -

-
- -
- Note: -
-

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.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-85
-86
-87
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 85
-
-def borders
-  @borders
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) cellStyles (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage styles is with add_style

-
-
- - -

The collection of named styles, referencing cellStyleXfs items in the -workbook.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-97
-98
-99
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 97
-
-def cellStyles
-  @cellStyles
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) cellStyleXfs (readonly) - - - -

-
- -
- Note: -
-

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

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-91
-92
-93
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 91
-
-def cellStyleXfs
-  @cellStyleXfs
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) cellXfs (readonly) - - - -

-
- -
- Note: -
-

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.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-103
-104
-105
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 103
-
-def cellXfs
-  @cellXfs
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) dxfs (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage styles is with add_style

-
-
- - -

The collection of non-cell formatting records used in the worksheet.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-109
-110
-111
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 109
-
-def dxfs
-  @dxfs
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) fills (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage styles is with add_style

-
-
- - -

The collection of fills used in this workbook

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-78
-79
-80
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 78
-
-def fills
-  @fills
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) fonts (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage styles is with add_style

-
-
- - -

The collection of fonts used in this workbook

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-72
-73
-74
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 72
-
-def fonts
-  @fonts
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) numFmts (readonly) - - - -

-
- -
- Note: -
-

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"
-
- - -
-
-
- -

Returns:

- - -

See Also:

-
    - -
  • Open XML Part 1 - 18.8.31 for more information on creating number formats
  • - -
  • #add_style
  • - -
- -
- - - - -
-
-
-
-66
-67
-68
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 66
-
-def numFmts
-  @numFmts
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) tableStyles (readonly) - - - -

-
- -
- Note: -
-

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

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-115
-116
-117
-
-
# File 'lib/axlsx/stylesheet/styles.rb', line 115
-
-def tableStyles
-  @tableStyles
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Integer) add_style(options = {}) - - - -

-
- -

Drastically simplifies style creation and management.

- - -
-
-
- -
-

Examples:

- -

-

You Got Style

-

-
require "rubygems" # if that is your preferred way to manage gems!
-require "axlsx"
-
-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
-
-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

-

-
# 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:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - fg_color - (String) - - - - —
    -

    The text color

    -
    -
  • - -
  • - sz - (Integer) - - - - —
    -

    The text size

    -
    -
  • - -
  • - b - (Boolean) - - - - —
    -

    Indicates if the text should be bold

    -
    -
  • - -
  • - i - (Boolean) - - - - —
    -

    Indicates if the text should be italicised

    -
    -
  • - -
  • - strike - (Boolean) - - - - —
    -

    Indicates if the text should be rendered with a strikethrough

    -
    -
  • - -
  • - strike - (Boolean) - - - - —
    -

    Indicates if the text should be rendered with a shadow

    -
    -
  • - -
  • - charset - (Integer) - - - - —
    -

    The character set to use.

    -
    -
  • - -
  • - family - (Integer) - - - - —
    -

    The font family to use.

    -
    -
  • - -
  • - name - (String) - - - - —
    -

    The name of the font to use

    -
    -
  • - -
  • - num_fmt - (Integer) - - - - —
    -

    The number format to apply

    -
    -
  • - -
  • - format_code - (String) - - - - —
    -

    The formatting to apply. If this is specified, num_fmt is ignored.

    -
    -
  • - -
  • - border - (Integer) - - - - —
    -

    The border style to use.

    -
    -
  • - -
  • - bg_color - (String) - - - - —
    -

    The background color to apply to the cell

    -
    -
  • - -
  • - hidden - (Boolean) - - - - —
    -

    Indicates if the cell should be hidden

    -
    -
  • - -
  • - locked - (Boolean) - - - - —
    -

    Indicates if the cell should be locked

    -
    -
  • - -
  • - alignment - (Hash) - - - - —
    -

    A hash defining any of the attributes used in CellAlignment

    -
    -
  • - -
- - -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
-

Raises:

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

See Also:

- - -
- - - - -
-
-
-
-191
-192
-193
-194
-195
-196
-197
-198
-199
-200
-201
-202
-203
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-223
-224
-225
-226
-227
-228
-229
-230
-231
-232
-233
-234
-235
-
-
# 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
-
-
-
- -
-

- - - (String) to_xml - - - -

-
- -

Serializes the styles document

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-239
-240
-241
-242
-243
-244
-245
-246
-247
-248
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/TableStyle.html b/doc/Axlsx/TableStyle.html deleted file mode 100644 index 41cd0318..00000000 --- a/doc/Axlsx/TableStyle.html +++ /dev/null @@ -1,690 +0,0 @@ - - - - - - Class: Axlsx::TableStyle - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::TableStyle - - - -

- -
- -
Inherits:
-
- SimpleTypedList - - - show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/table_style.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from SimpleTypedList

-

allowed_types, locked_at, serialize_as

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (TableStyle) initialize(name, options = {}) - - - -

-
- -

creates a new TableStyle object

- - -
-
-
-

Parameters:

-
    - -
  • - - name - - - (String) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - pivot - (Boolean) - - - - -
  • - -
  • - table - (Boolean) - - - - -
  • - -
- - -

Raises:

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

    if name option is not provided.

    -
    - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-26
-27
-28
-29
-
-
# 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
-
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Axlsx::SimpleTypedList - -

- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (string) name - - - -

-
- -

The name of this table style

- - -
-
-
- -

Returns:

-
    - -
  • - - - (string) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/stylesheet/table_style.rb', line 8
-
-def name
-  @name
-end
-
-
-
- - - - -
-

- - - (Boolean) pivot - - - -

-
- -

indicates if this style should be applied to pivot tables

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/stylesheet/table_style.rb', line 12
-
-def pivot
-  @pivot
-end
-
-
-
- - - - -
-

- - - (Boolean) table - - - -

-
- -

indicates if this style should be applied to tables

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-16
-17
-18
-
-
# File 'lib/axlsx/stylesheet/table_style.rb', line 16
-
-def table
-  @table
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the table style

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-41
-42
-43
-44
-45
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/TableStyleElement.html b/doc/Axlsx/TableStyleElement.html deleted file mode 100644 index 3b629497..00000000 --- a/doc/Axlsx/TableStyleElement.html +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - Class: Axlsx::TableStyleElement - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::TableStyleElement - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/table_style_element.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (TableStyleElement) initialize(options = {}) - - - -

-
- -

creates a new TableStyleElement object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - type - (Symbol) - - - - -
  • - -
  • - size - (Integer) - - - - -
  • - -
  • - dxfId - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-49
-50
-51
-52
-53
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Integer) dxfId - - - -

-
- -

The dxfId this style element points to

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'lib/axlsx/stylesheet/table_style_element.rb', line 43
-
-def dxfId
-  @dxfId
-end
-
-
-
- - - - -
-

- - - (Integer) size - - - -

-
- -

Number of rows or columns used in striping when the type is firstRowStripe, -secondRowStripe, firstColumnStripe, or secondColumnStripe.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/axlsx/stylesheet/table_style_element.rb', line 39
-
-def size
-  @size
-end
-
-
-
- - - - -
-

- - - (Symbol) type - - - -

-
- -

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
-
- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/axlsx/stylesheet/table_style_element.rb', line 35
-
-def type
-  @type
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the table style element

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'lib/axlsx/stylesheet/table_style_element.rb', line 67
-
-def to_xml(xml)
-  xml.tableStyleElement self.instance_values
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/TableStyles.html b/doc/Axlsx/TableStyles.html deleted file mode 100644 index 4f265099..00000000 --- a/doc/Axlsx/TableStyles.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - - - Class: Axlsx::TableStyles - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::TableStyles - - - -

- -
- -
Inherits:
-
- SimpleTypedList - - - show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/table_styles.rb
- -
-
- -

Overview

-
- -
- Note: -
-

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.

-
-
- - -

TableStyles represents a collection of style definitions for table styles -and pivot table styles.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from SimpleTypedList

-

allowed_types, locked_at, serialize_as

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (TableStyles) initialize(options = {}) - - - -

-
- -

Creates a new TableStyles object that is a container for TableStyle objects

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - defaultTableStyle - (String) - - - - -
  • - -
  • - defaultPivotStyle - (String) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-17
-18
-19
-20
-21
-
-
# File 'lib/axlsx/stylesheet/table_styles.rb', line 17
-
-def initialize(options={})
-  @defaultTableStyle = options[:defaultTableStyle] || "TableStyleMedium9"
-  @defaultPivotStyle = options[:defaultPivotStyle] || "PivotStyleLight16"      
-  super TableStyle
-end
-
-
-
- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Axlsx::SimpleTypedList - -

- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) defaultPivotStyle - - - -

-
- -

The default pivot table style. The default value is ‘PivotStyleLight6’

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/stylesheet/table_styles.rb', line 12
-
-def defaultPivotStyle
-  @defaultPivotStyle
-end
-
-
-
- - - - -
-

- - - (String) defaultTableStyle - - - -

-
- -

The default table style. The default value is ‘TableStyleMedium9’

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/stylesheet/table_styles.rb', line 8
-
-def defaultTableStyle
-  @defaultTableStyle
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the table styles element

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-30
-31
-32
-33
-34
-35
-36
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Title.html b/doc/Axlsx/Title.html deleted file mode 100644 index d4b7daf6..00000000 --- a/doc/Axlsx/Title.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - - - Class: Axlsx::Title - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Title - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/title.rb
- -
-
- -

Overview

-
- -

A Title stores information about the title of a chart

- - -
-
-
- - -
-

Direct Known Subclasses

-

SeriesTitle

-
- - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Title) initialize(title = "") - - - -

-
- -

Creates a new Title object

- - -
-
-
-

Parameters:

-
    - -
  • - - title - - - (String, Cell) - - - (defaults to: "") - - - — -
    -

    The cell or string to be used for the chart’s title

    -
    - -
  • - -
- - -
- - - - -
-
-
-
-15
-16
-17
-18
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Cell) cell - - - -

-
- -

The cell that holds the text for the title. Setting this property will -automatically update the text attribute.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Cell) - - - -
  • - -
- -
- - - - -
-
-
-
-11
-12
-13
-
-
# File 'lib/axlsx/drawing/title.rb', line 11
-
-def cell
-  @cell
-end
-
-
-
- - - - -
-

- - - (String) text - - - -

-
- -

The text to be shown. Setting this property directly with a string will -remove the cell reference.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-7
-8
-9
-
-
# File 'lib/axlsx/drawing/title.rb', line 7
-
-def text
-  @text
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the chart title

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/TwoCellAnchor.html b/doc/Axlsx/TwoCellAnchor.html deleted file mode 100644 index 388b1e26..00000000 --- a/doc/Axlsx/TwoCellAnchor.html +++ /dev/null @@ -1,948 +0,0 @@ - - - - - - Class: Axlsx::TwoCellAnchor - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::TwoCellAnchor - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/two_cell_anchor.rb
- -
-
- -

Overview

-
- -
- 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.

-
-
- - -

This class details the anchor points for drawings.

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (TwoCellAnchor) initialize(drawing, options = {}) - - - -

-
- -
- Note: -
-

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

- - -
-
-
-

Parameters:

-
    - -
  • - - drawing - - - (Drawing) - - - -
  • - -
  • - - chart_type - - - (Class) - - - - — -
    -

    This is passed to the graphic frame for instantiation. must be Chart or a -subclass of Chart

    -
    - -
  • - -
  • - - object - - - - - - - — -
    -

    The object this anchor holds.

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - start_at - (Array) - - - - —
    -

    the col, row to start at

    -
    -
  • - -
  • - end_at - (Array) - - - - —
    -

    the col, row to end at

    -
    -
  • - -
- - - -
- - - - -
-
-
-
-38
-39
-40
-41
-42
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Drawing) drawing (readonly) - - - -

-
- -

The drawing that holds this anchor

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/axlsx/drawing/two_cell_anchor.rb', line 25
-
-def drawing
-  @drawing
-end
-
-
-
- - - - -
-

- - - (Marker) from (readonly) - - - -

-
- -

A marker that defines the from cell anchor. The default from column and row -are 0 and 0 respectively

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Marker) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/drawing/two_cell_anchor.rb', line 9
-
-def from
-  @from
-end
-
-
-
- - - - -
-

- - - (Pic, GraphicFrame) object (readonly) - - - -

-
- -

The object this anchor hosts

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-21
-22
-23
-
-
# File 'lib/axlsx/drawing/two_cell_anchor.rb', line 21
-
-def object
-  @object
-end
-
-
-
- - - - -
-

- - - (Marker) to (readonly) - - - -

-
- -

A marker that returns the to cell anchor. The default to column and row are -5 and 10 respectively

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Marker) - - - -
  • - -
- -
- - - - -
-
-
-
-12
-13
-14
-
-
# File 'lib/axlsx/drawing/two_cell_anchor.rb', line 12
-
-def to
-  @to
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Chart) add_chart(chart_type, options) - - - -

-
- -

Creates a graphic frame and chart object associated with this anchor

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Chart) - - - -
  • - -
- -
- - - - -
-
-
-
-46
-47
-48
-49
-
-
# 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
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of this anchor in the drawing

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-53
-54
-55
-
-
# File 'lib/axlsx/drawing/two_cell_anchor.rb', line 53
-
-def index
-  @drawing.anchors.index(self)
-end
-
-
-
- -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the two cell anchor

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/ValAxis.html b/doc/Axlsx/ValAxis.html deleted file mode 100644 index 4096a451..00000000 --- a/doc/Axlsx/ValAxis.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - Class: Axlsx::ValAxis - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::ValAxis - - - -

- -
- -
Inherits:
-
- Axis - -
    -
  • Object
  • - - - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/val_axis.rb
- -
-
- -

Overview

-
- -

the ValAxis class defines a chart value axis.

- - -
-
-
- - -
- - - - - -

Instance Attribute Summary (collapse)

- - - - - - - - - -

Attributes inherited from Axis

-

axId, axPos, crossAx, crosses, format_code, scaling, tickLblPos

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - -
-

Constructor Details

- -
-

- - - (ValAxis) initialize(axId, crossAx, options = {}) - - - -

-
- -

Creates a new ValAxis object

- - -
-
-
-

Parameters:

-
    - -
  • - - axId - - - (Integer) - - - - — -
    -

    the id of this axis

    -
    - -
  • - -
  • - - crossAx - - - (Integer) - - - - — -
    -

    the id of the perpendicular axis

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - axPos - (Symbol) - - - - -
  • - -
  • - tickLblPos - (Symbol) - - - - -
  • - -
  • - crosses - (Symbol) - - - - -
  • - -
  • - crossesBetween - (Symbol) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-17
-18
-19
-20
-
-
# File 'lib/axlsx/drawing/val_axis.rb', line 17
-
-def initialize(axId, crossAx, options={})
-  self.crossBetween = :between
-  super(axId, crossAx, options)
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Symbol) crossBetween - - - -

-
- -

This element specifies how the value axis crosses the category axis. must -be one of [:between, :midCat]

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Symbol) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-
-
# File 'lib/axlsx/drawing/val_axis.rb', line 8
-
-def crossBetween
-  @crossBetween
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the value axis

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-30
-31
-32
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/ValAxisData.html b/doc/Axlsx/ValAxisData.html deleted file mode 100644 index cbc2210f..00000000 --- a/doc/Axlsx/ValAxisData.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - Class: Axlsx::ValAxisData - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::ValAxisData - - - -

- -
- -
Inherits:
-
- CatAxisData - - - show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/val_axis_data.rb
- -
-
- -

Overview

-
- -

The ValAxisData class manages the values for a chart value series.

- - -
-
-
- - -
- - - - - - - - - - - - - - - - - -

Instance Attribute Summary

- -

Attributes inherited from SimpleTypedList

-

allowed_types, locked_at, serialize_as

- - - -

- Instance Method Summary - (collapse) -

- - - - - - - - - - - - -

Methods inherited from CatAxisData

-

#initialize

- - - - - -
-

Constructor Details

- -

This class inherits a constructor from Axlsx::CatAxisData

- -
-
-

Dynamic Method Handling

-

- This class handles dynamic methods through the method_missing method - - in the class Axlsx::SimpleTypedList - -

- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the value axis data

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/View3D.html b/doc/Axlsx/View3D.html deleted file mode 100644 index 324478c2..00000000 --- a/doc/Axlsx/View3D.html +++ /dev/null @@ -1,952 +0,0 @@ - - - - - - Class: Axlsx::View3D - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::View3D - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/drawing/view_3D.rb
- -
-
- -

Overview

-
- -

3D attributes for a chart.

- - -
-
-
- - -
-

Constant Summary

- -
- -
H_PERCENT_REGEX = -
-
- -

Validation for hPercent

- - -
-
-
- - -
-
-
/0*(([5-9])|([1-9][0-9])|([1-4][0-9][0-9])|500)%/
-
- -
DEPTH_PERCENT_REGEX = -
-
- -

validation for depthPercent

- - -
-
-
- - -
-
-
/0*(([2-9][0-9])|([1-9][0-9][0-9])|(1[0-9][0-9][0-9])|2000)%/
-
- -
- - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (View3D) initialize(options = {}) - - - -

-
- -

Creates a new View3D for charts

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - rotX - (Integer) - - - - -
  • - -
  • - hPercent - (String) - - - - -
  • - -
  • - rotY - (Integer) - - - - -
  • - -
  • - depthPercent - (String) - - - - -
  • - -
  • - rAngAx - (Boolean) - - - - -
  • - -
  • - perspective - (Integer) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-46
-47
-48
-49
-50
-51
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (String) depthPercent - - - -

-
- -

depth or chart as % of chart width must be between 20% and 2000%

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-29
-30
-31
-
-
# File 'lib/axlsx/drawing/view_3D.rb', line 29
-
-def depthPercent
-  @depthPercent
-end
-
-
-
- - - - -
-

- - - (String) hPercent - - - -

-
- -

height of chart as % of chart must be between 5% and 500%

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/axlsx/drawing/view_3D.rb', line 19
-
-def hPercent
-  @hPercent
-end
-
-
-
- - - - -
-

- - - (Integer) perspective - - - -

-
- -

field of view angle

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-37
-38
-39
-
-
# File 'lib/axlsx/drawing/view_3D.rb', line 37
-
-def perspective
-  @perspective
-end
-
-
-
- - - - -
-

- - - (Boolean) rAngAx - - - -

-
- -

Chart axis are at right angles

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-33
-34
-35
-
-
# File 'lib/axlsx/drawing/view_3D.rb', line 33
-
-def rAngAx
-  @rAngAx
-end
-
-
-
- - - - -
-

- - - (Integer) rotX - - - -

-
- -

x rotation for the chart must be between -90 and 90

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-14
-15
-16
-
-
# File 'lib/axlsx/drawing/view_3D.rb', line 14
-
-def rotX
-  @rotX
-end
-
-
-
- - - - -
-

- - - (Integer) rotY - - - -

-
- -

y rotation for the chart must be between 0 and 360

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-24
-25
-26
-
-
# File 'lib/axlsx/drawing/view_3D.rb', line 24
-
-def rotY
-  @rotY
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the view3D properties

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Workbook.html b/doc/Axlsx/Workbook.html deleted file mode 100644 index 915b139b..00000000 --- a/doc/Axlsx/Workbook.html +++ /dev/null @@ -1,1472 +0,0 @@ - - - - - - Class: Axlsx::Workbook - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Workbook - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/workbook/workbook.rb
- -
-
- -

Overview

-
- -

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
-
- - -
-
-
- - -
-

Constant Summary

- -
- -
@@date1904 = -
-
- -

Indicates if the epoc date for serialization should be 1904. If false, 1900 -is used.

- - -
-
-
- - -
-
-
false
-
- -
- - - -

Instance Attribute Summary (collapse)

- - - - - - -

- Class Method Summary - (collapse) -

- - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Workbook) initialize(options = {}) {|_self| ... } - - - -

-
- -

Creates a new Workbook

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - date1904 - (Boolean) - - - - -
  • - -
- - -

Yields:

-
    - -
  • - - - (_self) - - - -
  • - -
-

Yield Parameters:

-
    - -
  • - - _self - - - (Axlsx::Workbook) - - - - — -
    -

    the object that the method was called on

    -
    - -
  • - -
- -
- - - - -
-
-
-
-77
-78
-79
-80
-81
-82
-83
-84
-85
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (SimpleTypedList) charts (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage charts is Worksheet#add_chart

-
-
- - -

A colllection of charts associated with this workbook

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-45
-46
-47
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 45
-
-def charts
-  @charts
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) drawings (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage drawings is Worksheet#add_chart

-
-
- - -

A colllection of drawings associated with this workbook

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 59
-
-def drawings
-  @drawings
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) images (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage images is Worksheet#add_image

-
-
- - -

A colllection of images associated with this workbook

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-52
-53
-54
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 52
-
-def images
-  @images
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) worksheets (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage worksheets is add_worksheet

-
-
- - -

A collection of worksheets associated with this workbook.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-38
-39
-40
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 38
-
-def worksheets
-  @worksheets
-end
-
-
-
- -
- - -
-

Class Method Details

- - -
-

- - + (Boolean) date1904 - - - -

-
- -

retrieves the date1904 attribute

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-100
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 100
-
-def self.date1904() @@date1904; end
-
-
-
- -
-

- - + (Boolean) date1904=(v) - - - -

-
- -

Sets the date1904 attribute to the provided boolean

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-96
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 96
-
-def self.date1904=(v) Axlsx::validate_boolean v; @@date1904 = v end
-
-
-
- -
- -
-

Instance Method Details

- - -
-

- - - (Worksheet) add_worksheet(options = {}) {|worksheet| ... } - - - -

-
- -

Adds a worksheet to this workbook

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - name - (String) - - - - —
    -

    The name of the worksheet.

    -
    -
  • - -
- - -

Yields:

-
    - -
  • - - - (worksheet) - - - -
  • - -
-

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-106
-107
-108
-109
-110
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 106
-
-def add_worksheet(options={})
-  worksheet = Worksheet.new(self, options)
-  yield worksheet if block_given?
-  worksheet
-end
-
-
-
- -
-

- - - (Boolean) date1904 - - - -

-
- -

Instance level access to the class variable 1904

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-89
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 89
-
-def date1904() @@date1904; end
-
-
-
- -
-

- - - (Object) date1904=(v) - - - -

-
- -

see @date1904

- - -
-
-
- - -
- - - - -
-
-
-
-92
-
-
# File 'lib/axlsx/workbook/workbook.rb', line 92
-
-def date1904=(v) Axlsx::validate_boolean v; @@date1904 = v end
-
-
-
- -
-

- - - (Relationships) relationships - - - -

-
- -

The workbook relationships. This is managed automatically by the workbook

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-114
-115
-116
-117
-118
-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 66
-
-def styles
-  yield @styles if block_given?
-  @styles
-end
-
-
-
- -
-

- - - (String) to_xml - - - -

-
- -

Serializes the workbook document

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Worksheet.html b/doc/Axlsx/Worksheet.html deleted file mode 100644 index 39bd418b..00000000 --- a/doc/Axlsx/Worksheet.html +++ /dev/null @@ -1,2386 +0,0 @@ - - - - - - Class: Axlsx::Worksheet - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Worksheet - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/workbook/worksheet/worksheet.rb
- -
-
- -

Overview

-
- -

The Worksheet class represents a worksheet in the workbook.

- - -
-
-
- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Worksheet) initialize(wb, options = {}) - - - -

-
- -
- Note: -
-

the recommended way to manage worksheets is Workbook#add_worksheet

-
-
- - -

Creates a new worksheet.

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - name - (String) - - - - —
    -

    The name of this sheet.

    -
    -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-34
-35
-36
-37
-38
-39
-40
-41
-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
-  @cols = SimpleTypedList.new Cell
-end
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (Array) auto_fit_data (readonly) - - - -

-
- -
- Note: -
-

a single auto fit data item is a hash with :longest => [String] and -:sz=> [Integer] members.

-
-
- - -

An array of content based calculated column widths.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Array) - - - - — -
    -

    of Hash

    -
    - -
  • - -
- -
- - - - -
-
-
-
-25
-26
-27
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 25
-
-def auto_fit_data
-  @auto_fit_data
-end
-
-
-
- - - - -
-

- - - (String) name - - - -

-
- -

The name of the worksheet

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-9
-10
-11
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 9
-
-def name
-  @name
-end
-
-
-
- - - - -
-

- - - (SimpleTypedList) rows (readonly) - - - -

-
- -
- Note: -
-

The recommended way to manage rows is Worksheet#add_row

-
-
- - -

The rows in this worksheet

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-20
-21
-22
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 20
-
-def rows
-  @rows
-end
-
-
-
- - - - -
-

- - - (Workbook) workbook - - - -

-
- -

The workbook that owns this worksheet

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-13
-14
-15
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 13
-
-def workbook
-  @workbook
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (Object) add_chart(chart_type, options = {}) {|chart| ... } - - - -

-
- -
- Note: -
-

each chart type also specifies additional options

-
-
- - -

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.

- - -
-
-
-

Parameters:

-
    - -
  • - - chart_type - - - (Class) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - start_at - (Array) - - - - -
  • - -
  • - end_at - (Array) - - - - -
  • - -
  • - title - (Cell, String) - - - - -
  • - -
  • - show_legend - (Boolean) - - - - -
  • - -
  • - style - (Integer) - - - - -
  • - -
- - -

Yields:

-
    - -
  • - - - (chart) - - - -
  • - -
- -

See Also:

- - -
- - - - -
-
-
-
-148
-149
-150
-151
-152
-
-
# 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
-
-
-
- -
-

- - - (Object) add_image(options = {}) {|image| ... } - - - -

-
- -

Adds a media item to the worksheets drawing

- - -
-
-
-

Parameters:

-
    - -
  • - - media_type - - - (Class) - - - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - [] - (Object) - - - - —
    -

    unknown

    -
    -
  • - -
- - -

Yields:

-
    - -
  • - - - (image) - - - -
  • - -
- -
- - - - -
-
-
-
-157
-158
-159
-160
-161
-
-
# 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
-
-
-
- -
-

- - - (Row) add_row(values = [], options = {}) {|@rows.last| ... } - - - -

-
- -

Adds a row to the worksheet and updates auto fit data

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - -

Options Hash (options):

-
    - -
  • - values - (Array) - - - - -
  • - -
  • - types - (Array, Symbol) - - - - -
  • - -
  • - style - (Array, Integer) - - - - -
  • - -
- - -

Yields:

-
    - -
  • - - - (@rows.last) - - - -
  • - -
-

Returns:

-
    - -
  • - - - (Row) - - - -
  • - -
- -
- - - - -
-
-
-
-86
-87
-88
-89
-90
-91
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 86
-
-def add_row(values=[], options={})
-  Row.new(self, values, options)
-  update_auto_fit_data @rows.last.cells
-  yield @rows.last if block_given?
-  @rows.last
-end
-
-
-
- -
-

- - - (Float) auto_width(col) - - - -

-
- -
- Note: -
-

From ECMA docs

- -
Column width measured as the number of characters of the maximum digit width of the numbers 0 .. 9 as 
-rendered in the normal style's font. There are 4 pixels of margin padding (two on each side), plus 1 pixel padding for the gridlines.
-width = Truncate([!{Number of Characters} * !{Maximum Digit Width} + !{5 pixel padding}]/{Maximum Digit Width}*256)/256
-
-
-
- - -

Determines the proper width for a column based on content.

- - -
-
-
-

Parameters:

-
    - -
  • - - A - - - (Hash) - - - - — -
    -

    hash of auto_fit_data

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Float) - - - -
  • - -
- -
- - - - -
-
-
-
-232
-233
-234
-235
-236
-237
-238
-239
-240
-241
-242
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 232
-
-def auto_width(col)
-  mdw = 6.0 # maximum digit with is always 6.0 with RMagick's default font
-  mdw_count = 0 
-  best_guess = 1.5  #direct testing shows the results of the documented formula to be a bit too small. This is a best guess scaling
-  font_scale = col[:sz].to_f / (self.workbook.styles.fonts[0].sz.to_f || 11.0)
-  
-  col[:longest].scan(/./mu).each do |i|
-    mdw_count +=1 if @magick_draw.get_type_metrics(i).width >= mdw 
-  end
-  ((mdw_count * mdw + 5) / mdw * 256) / 256.0 * best_guess * font_scale      
-end
-
-
-
- -
-

- - - (Object) col_style(index, style, options = {}) - - - -

-
- -
- Note: -
-

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

- - -
-
-
-

Parameters:

-
    - -
  • - - index - - - (Integer) - - - - — -
    -

    the index of the column

    -
    - -
  • - -
  • - - the - - - (Integer) - - - - — -
    -

    cellXfs index

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - row_offset - (Integer) - - - - —
    -

    only cells after this column will be updated.

    -
    -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-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 111
-
-def cols
-  @rows.transpose
-end
-
-
-
- -
-

- - - (Drawing) drawing - - - -

-
- -
- Note: -
-

the recommended way to work with drawings and charts is Worksheet#add_chart

-
-
- - -

The drawing associated with this worksheet.

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-77
-78
-79
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 77
-
-def drawing
-  @drawing || @drawing = Axlsx::Drawing.new(self)
-end
-
-
-
- -
-

- - - (Integer) index - - - -

-
- -

The index of this worksheet in the owning Workbook’s worksheets list.

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-69
-70
-71
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 69
-
-def index
-  @workbook.worksheets.index(self)
-end
-
-
-
- -
-

- - - (String) pn - - - -

-
- -

The part name of this worksheet

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 51
-
-def pn
-  "#{WORKSHEET_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (Relationships) relationships - - - -

-
- -

The worksheet relationships. This is managed automatically by the worksheet

- - -
-
-
- -

Returns:

- - -
- - - - -
-
-
-
-189
-190
-191
-192
-193
-
-
# 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
-
-
-
- -
-

- - - (String) rels_pn - - - -

-
- -

The relationship part name of this worksheet

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-57
-58
-59
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 57
-
-def rels_pn
-  "#{WORKSHEET_RELS_PN % (index+1)}"
-end
-
-
-
- -
-

- - - (String) rId - - - -

-
- -

The relationship Id of thiw worksheet

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-64
-65
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 63
-
-def rId
-  "rId#{index+1}"
-end
-
-
-
- -
-

- - - (Object) row_style(index, style, options = {}) - - - -

-
- -
- Note: -
-

You can also specify the style in the add_row call

-
-
- - -

Set the style for cells in a specific row

- - -
-
-
-

Parameters:

-
    - -
  • - - index - - - (Integer) - - - - — -
    -

    or range of indexes in the table

    -
    - -
  • - -
  • - - the - - - (Integer) - - - - — -
    -

    cellXfs index

    -
    - -
  • - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - - - - - -

Options Hash (options):

-
    - -
  • - col_offset - (Integer) - - - - —
    -

    only cells after this column will be updated.

    -
    -
  • - -
- - - -

See Also:

- - -
- - - - -
-
-
-
-100
-101
-102
-103
-104
-105
-106
-107
-108
-
-
# 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
-
-
-
- -
-

- - - (String) to_xml - - - -

-
- -

Serializes the worksheet document

- - -
-
-
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-165
-166
-167
-168
-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 165
-
-def to_xml
-  builder = Nokogiri::XML::Builder.new(:encoding => ENCODING) do |xml|
-    xml.worksheet(:xmlns => XML_NS, :'xmlns:r' => XML_NS_R) {
-      if @auto_fit_data.size > 0
-        xml.cols {
-          @auto_fit_data.each_with_index do |col, index|
-            min_max = index+1
-            xml.col(:min=>min_max, :max=>min_max, :width => auto_width(col), :customWidth=>"true")
-          end
-        }
-      end
-      xml.sheetData {
-        @rows.each do |row|
-          row.to_xml(xml)
-        end
-      }
-      xml.drawing :"r:id"=>"rId1" if @drawing          
-    }
-  end
-  builder.to_xml
-end
-
-
-
- -
-

- - - (Array) update_auto_fit_data(cells) - - - -

-
- -

Updates auto fit data. Autofit data attempts to determine the cell in a -column that has the greatest width by comparing the length of the text -multiplied by the size of the font.

- - -
-
-
-

Parameters:

-
    - -
  • - - cells - - - (Array) - - - - — -
    -

    an array of cells

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (Array) - - - - — -
    -

    of Cell objects

    -
    - -
  • - -
- -
- - - - -
-
-
-
-204
-205
-206
-207
-208
-209
-210
-211
-212
-213
-214
-215
-216
-217
-218
-219
-220
-221
-222
-
-
# File 'lib/axlsx/workbook/worksheet/worksheet.rb', line 204
-
-def update_auto_fit_data(cells)
-  styles = self.workbook.styles
-  cellXfs, fonts = styles.cellXfs, styles.fonts
-  sz = fonts[0].sz
-
-  cells.each_with_index do |item, index|
-    col = @auto_fit_data[index] || {:longest=>"", :sz=>sz} 
-    cell_xf = cellXfs[item.style]
-    font = fonts[cell_xf.fontId || 0]
-    sz = font.sz || sz
-
-    if (col[:longest].scan(/./mu).size * col[:sz]) < (item.value.to_s.scan(/./mu).size * sz)
-      col[:sz] =  sz
-      col[:longest] = item.value.to_s
-    end
-    @auto_fit_data[index] = col
-  end
-  cells
-end
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/Axlsx/Xf.html b/doc/Axlsx/Xf.html deleted file mode 100644 index 4c839a3e..00000000 --- a/doc/Axlsx/Xf.html +++ /dev/null @@ -1,1743 +0,0 @@ - - - - - - Class: Axlsx::Xf - - — AXLSX - - - - - - - - - - - - - - - - - - - - - - -

Class: Axlsx::Xf - - - -

- -
- -
Inherits:
-
- Object - -
    -
  • Object
  • - - - -
- show all - -
- - - - - - - - - -
Defined in:
-
lib/axlsx/stylesheet/xf.rb
- -
-
- -

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

- - -
-
-
- - -

See Also:

- - -
- -

Instance Attribute Summary (collapse)

- - - - - - -

- Instance Method Summary - (collapse) -

- - - - -
-

Constructor Details

- -
-

- - - (Xf) initialize(options = {}) - - - -

-
- -

Creates a new Xf object

- - -
-
-
-

Parameters:

-
    - -
  • - - options - - - (Hash) - - - (defaults to: {}) - - - — -
    -

    a customizable set of options

    -
    - -
  • - -
- - - - -

Options Hash (options):

-
    - -
  • - numFmtId - (Integer) - - - - -
  • - -
  • - fontId - (Integer) - - - - -
  • - -
  • - fillId - (Integer) - - - - -
  • - -
  • - borderId - (Integer) - - - - -
  • - -
  • - xfId - (Integer) - - - - -
  • - -
  • - quotePrefix - (Boolean) - - - - -
  • - -
  • - pivotButton - (Boolean) - - - - -
  • - -
  • - applyNumberFormat - (Boolean) - - - - -
  • - -
  • - applyFont - (Boolean) - - - - -
  • - -
  • - applyFill - (Boolean) - - - - -
  • - -
  • - applyBorder - (Boolean) - - - - -
  • - -
  • - applyAlignment - (Boolean) - - - - -
  • - -
  • - applyProtection - (Boolean) - - - - -
  • - -
  • - alignment - (CellAlignment) - - - - -
  • - -
  • - protection - (CellProtection) - - - - -
  • - -
- - - -
- - - - -
-
-
-
-85
-86
-87
-88
-89
-
-
# 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
-
-
-
- -
- -
-

Instance Attribute Details

- - - - -
-

- - - (CellAlignment) alignment - - - -

-
- -

The cell alignment for this style

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-10
-11
-12
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 10
-
-def alignment
-  @alignment
-end
-
-
-
- - - - -
-

- - - (Boolean) applyAlignment - - - -

-
- -

Indicates if the alignment options should be applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-63
-64
-65
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 63
-
-def applyAlignment
-  @applyAlignment
-end
-
-
-
- - - - -
-

- - - (Boolean) applyBorder - - - -

-
- -

indicates if the borderId should be applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-59
-60
-61
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 59
-
-def applyBorder
-  @applyBorder
-end
-
-
-
- - - - -
-

- - - (Boolean) applyFill - - - -

-
- -

indicates if the fillId should be applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-55
-56
-57
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 55
-
-def applyFill
-  @applyFill
-end
-
-
-
- - - - -
-

- - - (Boolean) applyFont - - - -

-
- -

indicates if the fontId should be applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-51
-52
-53
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 51
-
-def applyFont
-  @applyFont
-end
-
-
-
- - - - -
-

- - - (Boolean) applyNumberFormat - - - -

-
- -

indicates if the numFmtId should be applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-47
-48
-49
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 47
-
-def applyNumberFormat
-  @applyNumberFormat
-end
-
-
-
- - - - -
-

- - - (Boolean) applyProtection - - - -

-
- -

Indicates if the protection options should be applied

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-67
-68
-69
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 67
-
-def applyProtection
-  @applyProtection
-end
-
-
-
- - - - -
-

- - - (Integer) borderId - - - -

-
- -

index (0 based) of the border to be used in this style

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-31
-32
-33
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 31
-
-def borderId
-  @borderId
-end
-
-
-
- - - - -
-

- - - (Integer) fillId - - - -

-
- -

index (0 based) of the fill to be used in this style

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-27
-28
-29
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 27
-
-def fillId
-  @fillId
-end
-
-
-
- - - - -
-

- - - (Integer) fontId - - - -

-
- -

index (0 based) of the font to be used in this style

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-23
-24
-25
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 23
-
-def fontId
-  @fontId
-end
-
-
-
- - - - -
-

- - - (Integer) numFmtId - - - -

-
- -

id of the numFmt to apply to this style

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-19
-20
-21
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 19
-
-def numFmtId
-  @numFmtId
-end
-
-
-
- - - - -
-

- - - (Boolean) pivotButton - - - -

-
- -

indicates if the cell has a pivot table drop down button

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-43
-44
-45
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 43
-
-def pivotButton
-  @pivotButton
-end
-
-
-
- - - - -
-

- - - (CellProtection) protection - - - -

-
- -

The cell protection for this style

- - -
-
-
- -

Returns:

- - -

See Also:

- - -
- - - - -
-
-
-
-15
-16
-17
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 15
-
-def protection
-  @protection
-end
-
-
-
- - - - -
-

- - - (Boolean) quotePrefix - - - -

-
- -

indecates if text should be prefixed by a single quote in the cell

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Boolean) - - - -
  • - -
- -
- - - - -
-
-
-
-39
-40
-41
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 39
-
-def quotePrefix
-  @quotePrefix
-end
-
-
-
- - - - -
-

- - - (Integer) xfId - - - -

-
- -

index (0 based) of cellStylesXfs item to be used in this style. Only -applies to cellXfs items

- - -
-
-
- -

Returns:

-
    - -
  • - - - (Integer) - - - -
  • - -
- -
- - - - -
-
-
-
-35
-36
-37
-
-
# File 'lib/axlsx/stylesheet/xf.rb', line 35
-
-def xfId
-  @xfId
-end
-
-
-
- -
- - -
-

Instance Method Details

- - -
-

- - - (String) to_xml(xml) - - - -

-
- -

Serializes the xf elemen

- - -
-
-
-

Parameters:

-
    - -
  • - - xml - - - (Nokogiri::XML::Builder) - - - - — -
    -

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

    -
    - -
  • - -
- -

Returns:

-
    - -
  • - - - (String) - - - -
  • - -
- -
- - - - -
-
-
-
-131
-132
-133
-134
-135
-136
-
-
# 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
-
-
-
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/_index.html b/doc/_index.html deleted file mode 100644 index 91b046d0..00000000 --- a/doc/_index.html +++ /dev/null @@ -1,635 +0,0 @@ - - - - - - AXLSX - - - - - - - - - - - - - - - - - - - - - - -

AXLSX

-
-

Alphabetic Index

- -

File Listing

- - -
-

Namespace Listing A-Z

- - - - - - - - -
- - -
    -
  • A
  • -
      - -
    • - App - - (Axlsx) - -
    • - -
    • - Axis - - (Axlsx) - -
    • - -
    • - Axlsx - -
    • - -
    -
- - - - - - - - - - - -
    -
  • F
  • -
      - -
    • - Fill - - (Axlsx) - -
    • - -
    • - Font - - (Axlsx) - -
    • - -
    -
- - - - - - - - -
- - -
    -
  • M
  • -
      - -
    • - Marker - - (Axlsx) - -
    • - -
    -
- - -
    -
  • N
  • -
      - -
    • - NumFmt - - (Axlsx) - -
    • - -
    -
- - - - - - - - - - - - - - - - - - - - -
- - - - - -
    -
  • X
  • -
      - -
    • - Xf - - (Axlsx) - -
    • - -
    -
- -
- -
- -
- - - - - \ No newline at end of file diff --git a/doc/class_list.html b/doc/class_list.html deleted file mode 100644 index 2d555b04..00000000 --- a/doc/class_list.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
-

Class List

- - - - -
- - diff --git a/doc/css/common.css b/doc/css/common.css deleted file mode 100644 index cf25c452..00000000 --- a/doc/css/common.css +++ /dev/null @@ -1 +0,0 @@ -/* Override this file with custom rules */ \ No newline at end of file diff --git a/doc/css/full_list.css b/doc/css/full_list.css deleted file mode 100644 index 3c032964..00000000 --- a/doc/css/full_list.css +++ /dev/null @@ -1,55 +0,0 @@ -body { - margin: 0; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; - height: 101%; - overflow-x: hidden; -} - -h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } -.clear { clear: both; } -#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } -#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } -#full_list { padding: 0; list-style: none; margin-left: 0; } -#full_list ul { padding: 0; } -#full_list li { padding: 5px; padding-left: 12px; margin: 0; font-size: 1.1em; list-style: none; } -#noresults { padding: 7px 12px; } -#content.insearch #noresults { margin-left: 7px; } -ul.collapsed ul, ul.collapsed li { display: none; } -ul.collapsed.search_uncollapsed { display: block; } -ul.collapsed.search_uncollapsed li { display: list-item; } -li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } -li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } -li { color: #888; cursor: pointer; } -li.deprecated { text-decoration: line-through; font-style: italic; } -li.r1 { background: #f0f0f0; } -li.r2 { background: #fafafa; } -li:hover { background: #ddd; } -li small:before { content: "("; } -li small:after { content: ")"; } -li small.search_info { display: none; } -a:link, a:visited { text-decoration: none; color: #05a; } -li.clicked { background: #05a; color: #ccc; } -li.clicked a:link, li.clicked a:visited { color: #eee; } -li.clicked a.toggle { opacity: 0.5; background-position: bottom right; } -li.collapsed.clicked a.toggle { background-position: top right; } -#search input { border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } -#nav { margin-left: 10px; font-size: 0.9em; display: none; color: #aaa; } -#nav a:link, #nav a:visited { color: #358; } -#nav a:hover { background: transparent; color: #5af; } - -.frames #content h1 { margin-top: 0; } -.frames li { white-space: nowrap; cursor: normal; } -.frames li small { display: block; font-size: 0.8em; } -.frames li small:before { content: ""; } -.frames li small:after { content: ""; } -.frames li small.search_info { display: none; } -.frames #search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } -.frames #content.insearch #search { background-position: center right; } -.frames #search input { width: 110px; } -.frames #nav { display: block; } - -#full_list.insearch li { display: none; } -#full_list.insearch li.found { display: list-item; padding-left: 10px; } -#full_list.insearch li a.toggle { display: none; } -#full_list.insearch li small.search_info { display: block; } diff --git a/doc/css/style.css b/doc/css/style.css deleted file mode 100644 index 0b6fa69b..00000000 --- a/doc/css/style.css +++ /dev/null @@ -1,322 +0,0 @@ -body { - padding: 0 20px; - font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; - font-size: 13px; -} -body.frames { padding: 0 5px; } -h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; } -h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; } -h1.title { margin-bottom: 10px; } -h1.alphaindex { margin-top: 0; font-size: 22px; } -h2 { - padding: 0; - padding-bottom: 3px; - border-bottom: 1px #aaa solid; - font-size: 1.4em; - margin: 1.8em 0 0.5em; -} -h2 small { font-weight: normal; font-size: 0.7em; display: block; float: right; } -.clear { clear: both; } -.inline { display: inline; } -.inline p:first-child { display: inline; } -.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; } -.docstring h1 { font-size: 1.2em; } -.docstring h2 { font-size: 1.1em; } -.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; } -.summary_desc .object_link, .docstring .object_link { font-family: monospace; } -.rdoc-term { padding-right: 25px; font-weight: bold; } -.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; } - -/* style for