caxlsx 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/examples/generate.rb +3 -1
- data/lib/axlsx/content_type/abstract_content_type.rb +4 -1
- data/lib/axlsx/content_type/content_type.rb +1 -1
- data/lib/axlsx/content_type/default.rb +4 -1
- data/lib/axlsx/content_type/override.rb +4 -1
- data/lib/axlsx/doc_props/app.rb +91 -24
- data/lib/axlsx/drawing/area_series.rb +8 -2
- data/lib/axlsx/drawing/axis.rb +24 -6
- data/lib/axlsx/drawing/bar_series.rb +12 -3
- data/lib/axlsx/drawing/cat_axis.rb +20 -5
- data/lib/axlsx/drawing/chart.rb +32 -8
- data/lib/axlsx/drawing/d_lbls.rb +4 -4
- data/lib/axlsx/drawing/drawing.rb +1 -0
- data/lib/axlsx/drawing/hyperlink.rb +12 -3
- data/lib/axlsx/drawing/line_series.rb +8 -2
- data/lib/axlsx/drawing/marker.rb +19 -4
- data/lib/axlsx/drawing/one_cell_anchor.rb +8 -2
- data/lib/axlsx/drawing/pic.rb +13 -4
- data/lib/axlsx/drawing/pie_3D_chart.rb +1 -1
- data/lib/axlsx/drawing/pie_chart.rb +36 -0
- data/lib/axlsx/drawing/pie_series.rb +16 -4
- data/lib/axlsx/drawing/scaling.rb +18 -4
- data/lib/axlsx/drawing/ser_axis.rb +8 -2
- data/lib/axlsx/drawing/series.rb +8 -2
- data/lib/axlsx/drawing/view_3D.rb +8 -2
- data/lib/axlsx/package.rb +4 -1
- data/lib/axlsx/rels/relationship.rb +13 -3
- data/lib/axlsx/rels/relationships.rb +1 -1
- data/lib/axlsx/stylesheet/border.rb +12 -3
- data/lib/axlsx/stylesheet/border_pr.rb +14 -3
- data/lib/axlsx/stylesheet/cell_alignment.rb +38 -9
- data/lib/axlsx/stylesheet/cell_protection.rb +9 -2
- data/lib/axlsx/stylesheet/cell_style.rb +29 -6
- data/lib/axlsx/stylesheet/color.rb +8 -2
- data/lib/axlsx/stylesheet/dxf.rb +29 -6
- data/lib/axlsx/stylesheet/fill.rb +4 -1
- data/lib/axlsx/stylesheet/font.rb +58 -12
- data/lib/axlsx/stylesheet/gradient_fill.rb +8 -2
- data/lib/axlsx/stylesheet/gradient_stop.rb +9 -2
- data/lib/axlsx/stylesheet/num_fmt.rb +8 -2
- data/lib/axlsx/stylesheet/pattern_fill.rb +14 -3
- data/lib/axlsx/stylesheet/styles.rb +57 -13
- data/lib/axlsx/stylesheet/table_style.rb +15 -4
- data/lib/axlsx/stylesheet/table_style_element.rb +12 -3
- data/lib/axlsx/stylesheet/table_styles.rb +10 -3
- data/lib/axlsx/stylesheet/xf.rb +68 -15
- data/lib/axlsx/util/accessors.rb +8 -6
- data/lib/axlsx/util/storage.rb +1 -1
- data/lib/axlsx/version.rb +1 -1
- data/lib/axlsx/workbook/defined_names.rb +1 -1
- data/lib/axlsx/workbook/workbook.rb +19 -6
- data/lib/axlsx/workbook/workbook_views.rb +1 -1
- data/lib/axlsx/workbook/worksheet/auto_filter/filter_column.rb +4 -2
- data/lib/axlsx/workbook/worksheet/cell.rb +30 -10
- data/lib/axlsx/workbook/worksheet/cfvo.rb +8 -2
- data/lib/axlsx/workbook/worksheet/col_breaks.rb +1 -1
- data/lib/axlsx/workbook/worksheet/cols.rb +1 -1
- data/lib/axlsx/workbook/worksheet/conditional_formatting.rb +8 -2
- data/lib/axlsx/workbook/worksheet/conditional_formatting_rule.rb +69 -14
- data/lib/axlsx/workbook/worksheet/conditional_formattings.rb +1 -1
- data/lib/axlsx/workbook/worksheet/data_validation.rb +52 -13
- data/lib/axlsx/workbook/worksheet/data_validations.rb +1 -1
- data/lib/axlsx/workbook/worksheet/icon_set.rb +16 -4
- data/lib/axlsx/workbook/worksheet/merged_cells.rb +1 -1
- data/lib/axlsx/workbook/worksheet/page_margins.rb +30 -7
- data/lib/axlsx/workbook/worksheet/page_set_up_pr.rb +1 -2
- data/lib/axlsx/workbook/worksheet/page_setup.rb +30 -7
- data/lib/axlsx/workbook/worksheet/pane.rb +8 -2
- data/lib/axlsx/workbook/worksheet/pivot_tables.rb +1 -1
- data/lib/axlsx/workbook/worksheet/protected_ranges.rb +1 -1
- data/lib/axlsx/workbook/worksheet/rich_text_run.rb +30 -10
- data/lib/axlsx/workbook/worksheet/row.rb +5 -2
- data/lib/axlsx/workbook/worksheet/row_breaks.rb +1 -1
- data/lib/axlsx/workbook/worksheet/selection.rb +8 -2
- data/lib/axlsx/workbook/worksheet/sheet_protection.rb +1 -1
- data/lib/axlsx/workbook/worksheet/sheet_view.rb +30 -9
- data/lib/axlsx/workbook/worksheet/table_style_info.rb +1 -1
- data/lib/axlsx/workbook/worksheet/tables.rb +1 -1
- data/lib/axlsx/workbook/worksheet/worksheet.rb +18 -2
- data/lib/axlsx/workbook/worksheet/worksheet_hyperlink.rb +1 -1
- data/lib/axlsx/workbook/worksheet/worksheet_hyperlinks.rb +1 -1
- metadata +6 -44
@@ -35,7 +35,7 @@ module Axlsx
|
|
35
35
|
# @param [Hash] options Options passed in from the initializer
|
36
36
|
def initialize_page_options(options)
|
37
37
|
@page_margins = PageMargins.new options[:page_margins] if options[:page_margins]
|
38
|
-
@page_setup = PageSetup.new options[:page_setup]
|
38
|
+
@page_setup = PageSetup.new options[:page_setup] if options[:page_setup]
|
39
39
|
@print_options = PrintOptions.new options[:print_options] if options[:print_options]
|
40
40
|
@header_footer = HeaderFooter.new options[:header_footer] if options[:header_footer]
|
41
41
|
@row_breaks = RowBreaks.new
|
@@ -552,6 +552,19 @@ module Axlsx
|
|
552
552
|
end
|
553
553
|
end
|
554
554
|
|
555
|
+
# This is a helper method that lets you specify a default style for multiple columns in a worksheet in one go.
|
556
|
+
# This style will be applied for all not-yet-defined cells in a column.
|
557
|
+
# Note that you must call column_styles BEFORE adding data, otherwise the styles will not be set successfully for new cells.
|
558
|
+
# @param [Integer] styles the cellXfs indexes
|
559
|
+
def column_styles(*styles)
|
560
|
+
styles.each_with_index do |style, index|
|
561
|
+
next if style.nil?
|
562
|
+
|
563
|
+
Axlsx.validate_unsigned_int(style)
|
564
|
+
find_or_create_column_info(index).style = style
|
565
|
+
end
|
566
|
+
end
|
567
|
+
|
555
568
|
# Set the style for cells in a specific column
|
556
569
|
# @param [Integer] index the index of the column
|
557
570
|
# @param [Integer] style the cellXfs index
|
@@ -833,7 +846,10 @@ module Axlsx
|
|
833
846
|
@worksheet_comments ||= WorksheetComments.new self
|
834
847
|
end
|
835
848
|
|
836
|
-
def workbook=(v)
|
849
|
+
def workbook=(v)
|
850
|
+
DataTypeValidator.validate "Worksheet.workbook", Workbook, v
|
851
|
+
@workbook = v
|
852
|
+
end
|
837
853
|
|
838
854
|
def update_column_info(cells, widths = nil)
|
839
855
|
cells.each_with_index do |cell, index|
|
@@ -8,7 +8,7 @@ module Axlsx
|
|
8
8
|
def initialize(worksheet)
|
9
9
|
DataTypeValidator.validate "Hyperlinks.worksheet", [Worksheet], worksheet
|
10
10
|
@worksheet = worksheet
|
11
|
-
super
|
11
|
+
super(WorksheetHyperlink)
|
12
12
|
end
|
13
13
|
|
14
14
|
# Creates and adds a new hyperlink based on the options provided
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caxlsx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Randy Morgan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: htmlentities
|
@@ -85,48 +85,6 @@ dependencies:
|
|
85
85
|
- - "<"
|
86
86
|
- !ruby/object:Gem::Version
|
87
87
|
version: '3'
|
88
|
-
- !ruby/object:Gem::Dependency
|
89
|
-
name: kramdown
|
90
|
-
requirement: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '2.3'
|
95
|
-
type: :development
|
96
|
-
prerelease: false
|
97
|
-
version_requirements: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '2.3'
|
102
|
-
- !ruby/object:Gem::Dependency
|
103
|
-
name: timecop
|
104
|
-
requirement: !ruby/object:Gem::Requirement
|
105
|
-
requirements:
|
106
|
-
- - "~>"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: 0.9.0
|
109
|
-
type: :development
|
110
|
-
prerelease: false
|
111
|
-
version_requirements: !ruby/object:Gem::Requirement
|
112
|
-
requirements:
|
113
|
-
- - "~>"
|
114
|
-
- !ruby/object:Gem::Version
|
115
|
-
version: 0.9.0
|
116
|
-
- !ruby/object:Gem::Dependency
|
117
|
-
name: yard
|
118
|
-
requirement: !ruby/object:Gem::Requirement
|
119
|
-
requirements:
|
120
|
-
- - "~>"
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version: 0.9.8
|
123
|
-
type: :development
|
124
|
-
prerelease: false
|
125
|
-
version_requirements: !ruby/object:Gem::Requirement
|
126
|
-
requirements:
|
127
|
-
- - "~>"
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
version: 0.9.8
|
130
88
|
description: 'xlsx spreadsheet generation with charts, images, automated column width,
|
131
89
|
customizable styles and full schema validation. Axlsx helps you create beautiful
|
132
90
|
Office Open XML Spreadsheet documents (Excel, Google Spreadsheets, Numbers, LibreOffice)
|
@@ -183,6 +141,7 @@ files:
|
|
183
141
|
- lib/axlsx/drawing/pic.rb
|
184
142
|
- lib/axlsx/drawing/picture_locking.rb
|
185
143
|
- lib/axlsx/drawing/pie_3D_chart.rb
|
144
|
+
- lib/axlsx/drawing/pie_chart.rb
|
186
145
|
- lib/axlsx/drawing/pie_series.rb
|
187
146
|
- lib/axlsx/drawing/scaling.rb
|
188
147
|
- lib/axlsx/drawing/scatter_chart.rb
|
@@ -334,6 +293,9 @@ homepage: https://github.com/caxlsx/caxlsx
|
|
334
293
|
licenses:
|
335
294
|
- MIT
|
336
295
|
metadata:
|
296
|
+
bug_tracker_uri: https://github.com/caxlsx/caxlsx/issues
|
297
|
+
changelog_uri: https://github.com/caxlsx/caxlsx/blob/master/CHANGELOG.md
|
298
|
+
source_code_uri: https://github.com/caxlsx/caxlsx
|
337
299
|
rubygems_mfa_required: 'true'
|
338
300
|
post_install_message:
|
339
301
|
rdoc_options: []
|