xlsxrb 0.1.18 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +200 -0
- data/README.md +35 -12
- data/lib/ruby_lsp/xlsxrb/completion_listener.rb +410 -80
- data/lib/xlsxrb/chart_builder.rb +251 -386
- data/lib/xlsxrb/dsl_helpers.rb +169 -68
- data/lib/xlsxrb/elements/cell.rb +37 -157
- data/lib/xlsxrb/elements/column.rb +11 -19
- data/lib/xlsxrb/elements/coordinate_access.rb +15 -86
- data/lib/xlsxrb/elements/image.rb +5 -72
- data/lib/xlsxrb/elements/metadata.rb +463 -817
- data/lib/xlsxrb/elements/row.rb +27 -145
- data/lib/xlsxrb/elements/styles.rb +30 -88
- data/lib/xlsxrb/elements/types.rb +6 -99
- data/lib/xlsxrb/elements/workbook.rb +19 -126
- data/lib/xlsxrb/elements/worksheet.rb +45 -316
- data/lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb +4 -1
- data/lib/xlsxrb/ooxml/reader/listeners/drawing_listeners.rb +7 -7
- data/lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb +32 -17
- data/lib/xlsxrb/ooxml/reader.rb +49 -51
- data/lib/xlsxrb/ooxml/styles_parser.rb +26 -2
- data/lib/xlsxrb/ooxml/utils.rb +15 -2
- data/lib/xlsxrb/ooxml/workbook_parser.rb +0 -1
- data/lib/xlsxrb/ooxml/workbook_writer.rb +184 -94
- data/lib/xlsxrb/ooxml/worksheet_parser.rb +61 -29
- data/lib/xlsxrb/ooxml/worksheet_writer.rb +353 -261
- data/lib/xlsxrb/ooxml/writer/drawing_xml.rb +28 -11
- data/lib/xlsxrb/ooxml/writer/features_xml.rb +62 -16
- data/lib/xlsxrb/ooxml/writer/styles_xml.rb +1 -1
- data/lib/xlsxrb/ooxml/writer.rb +106 -42
- data/lib/xlsxrb/ooxml/xml_builder.rb +18 -0
- data/lib/xlsxrb/ooxml/xml_parser.rb +78 -5
- data/lib/xlsxrb/ooxml/zip_reader.rb +65 -15
- data/lib/xlsxrb/ooxml/zip_writer.rb +119 -30
- data/lib/xlsxrb/stream_row.rb +14 -118
- data/lib/xlsxrb/stream_sheet.rb +14 -261
- data/lib/xlsxrb/stream_writer.rb +807 -1537
- data/lib/xlsxrb/style_builder.rb +715 -593
- data/lib/xlsxrb/version.rb +1 -1
- data/lib/xlsxrb/workbook_builder.rb +403 -286
- data/lib/xlsxrb/worksheet_builder.rb +1297 -1458
- data/lib/xlsxrb.rb +281 -1079
- data/sig/generated/xlsxrb/chart_builder.rbs +202 -205
- data/sig/generated/xlsxrb/dsl_helpers.rbs +92 -16
- data/sig/generated/xlsxrb/elements/cell.rbs +12 -76
- data/sig/generated/xlsxrb/elements/column.rbs +0 -7
- data/sig/generated/xlsxrb/elements/coordinate_access.rbs +5 -41
- data/sig/generated/xlsxrb/elements/image.rbs +3 -29
- data/sig/generated/xlsxrb/elements/metadata.rbs +138 -151
- data/sig/generated/xlsxrb/elements/row.rbs +10 -53
- data/sig/generated/xlsxrb/elements/styles.rbs +1 -39
- data/sig/generated/xlsxrb/elements/workbook.rbs +14 -78
- data/sig/generated/xlsxrb/elements/worksheet.rbs +5 -121
- data/sig/generated/xlsxrb/ooxml/reader/listeners/feature_listeners.rbs +0 -4
- data/sig/generated/xlsxrb/ooxml/reader.rbs +0 -3
- data/sig/generated/xlsxrb/ooxml/styles_parser.rbs +1 -1
- data/sig/generated/xlsxrb/ooxml/utils.rbs +13 -3
- data/sig/generated/xlsxrb/ooxml/workbook_writer.rbs +17 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +16 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_writer.rbs +58 -3
- data/sig/generated/xlsxrb/ooxml/writer/features_xml.rbs +10 -0
- data/sig/generated/xlsxrb/ooxml/writer.rbs +20 -14
- data/sig/generated/xlsxrb/ooxml/xml_builder.rbs +12 -0
- data/sig/generated/xlsxrb/ooxml/xml_parser.rbs +70 -0
- data/sig/generated/xlsxrb/ooxml/zip_reader.rbs +22 -7
- data/sig/generated/xlsxrb/ooxml/zip_writer.rbs +26 -1
- data/sig/generated/xlsxrb/stream_row.rbs +9 -44
- data/sig/generated/xlsxrb/stream_sheet.rbs +1 -158
- data/sig/generated/xlsxrb/stream_writer.rbs +491 -974
- data/sig/generated/xlsxrb/style_builder.rbs +464 -239
- data/sig/generated/xlsxrb/workbook_builder.rbs +124 -139
- data/sig/generated/xlsxrb/worksheet_builder.rbs +922 -686
- data/sig/generated/xlsxrb.rbs +56 -188
- data/sig/rexml.rbs +8 -0
- metadata +3 -5
- data/lib/xlsxrb/utils.rb +0 -251
- data/sig/generated/xlsxrb/utils.rbs +0 -200
|
@@ -20,17 +20,6 @@ module Xlsxrb
|
|
|
20
20
|
# : String?
|
|
21
21
|
attr_reader current_sheet: untyped
|
|
22
22
|
|
|
23
|
-
# @return [Boolean] Whether to treat strings starting with formula prefixes as plain text.
|
|
24
|
-
# : bool
|
|
25
|
-
attr_accessor escape_formulas: untyped
|
|
26
|
-
|
|
27
|
-
# Returns whether formula escaping is enabled.
|
|
28
|
-
#
|
|
29
|
-
# @return [Boolean]
|
|
30
|
-
# @api public
|
|
31
|
-
# : () -> bool
|
|
32
|
-
def escape_formulas?: () -> bool
|
|
33
|
-
|
|
34
23
|
# Returns whether the shared strings table is enabled.
|
|
35
24
|
#
|
|
36
25
|
# @return [Boolean]
|
|
@@ -38,10 +27,6 @@ module Xlsxrb
|
|
|
38
27
|
# : () -> bool
|
|
39
28
|
def shared_strings?: () -> bool
|
|
40
29
|
|
|
41
|
-
# @deprecated Use {#shared_strings?} instead. Will be removed in 0.2.0.
|
|
42
|
-
# : () -> bool
|
|
43
|
-
def shared_strings: () -> bool
|
|
44
|
-
|
|
45
30
|
# @return [Integer] The ZIP deflate compression level (0..9).
|
|
46
31
|
# : Integer
|
|
47
32
|
attr_reader compression_level: untyped
|
|
@@ -54,111 +39,61 @@ module Xlsxrb
|
|
|
54
39
|
#
|
|
55
40
|
# @param target [String, IO, StringIO] Destination file path or writable IO stream.
|
|
56
41
|
# @param strict_excel_mode [Boolean] Whether to enforce Microsoft Excel specification limits.
|
|
57
|
-
# @param escape_formulas [Boolean] Whether to treat strings starting with formula prefixes as plain text.
|
|
58
42
|
# @param default_font [Hash, nil] Optional default font options (e.g. `{ name: "Arial", size: 12 }`).
|
|
59
43
|
# @param shared_strings [Boolean] Whether to intern strings into a shared strings table (`xl/sharedStrings.xml`).
|
|
60
44
|
# When set to `false`, strings are written directly as inline strings (`<c t="inlineStr">`), maintaining flat
|
|
61
45
|
# $O(1)$ constant memory regardless of row count or unique string cardinality. Note that disabling shared strings
|
|
62
46
|
# may slightly increase archive size (typically 3-5%) on datasets with high repetition.
|
|
63
|
-
# @param compression_level [Integer, nil] ZIP deflate compression level (0..9, or Zlib::DEFAULT_COMPRESSION
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
# : (untyped target, ?strict_excel_mode: bool, ?
|
|
67
|
-
def initialize: (untyped target, ?strict_excel_mode: bool, ?
|
|
47
|
+
# @param compression_level [Integer, nil] ZIP deflate compression level (0..9, or Zlib::DEFAULT_COMPRESSION
|
|
48
|
+
# for zlib's level 6). Defaults to {Xlsxrb::DEFAULT_COMPRESSION_LEVEL}. Higher levels write smaller files more slowly;
|
|
49
|
+
# level 0 stores entries without compression. See docs/adr/0009-default-zip-compression-level.md.
|
|
50
|
+
# : (untyped target, ?strict_excel_mode: bool, ?default_font: untyped?, ?shared_strings: bool, ?compression_level: Integer | nil) -> void
|
|
51
|
+
def initialize: (untyped target, ?strict_excel_mode: bool, ?default_font: untyped?, ?shared_strings: bool, ?compression_level: Integer | nil) -> void
|
|
68
52
|
|
|
69
53
|
# Gets or sets the active worksheet tab in the workbook window.
|
|
70
54
|
#
|
|
71
55
|
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
72
56
|
# @return [String, Symbol, Integer, nil]
|
|
73
57
|
# @api public
|
|
74
|
-
#
|
|
75
|
-
#
|
|
76
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#active_sheet=} instead.
|
|
77
|
-
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
78
|
-
# @return [String, Symbol, Integer, nil]
|
|
79
|
-
# @api public
|
|
80
|
-
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
81
|
-
def active_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
82
|
-
|
|
83
|
-
# @deprecated Use {#active_sheet} instead. Will be removed in 0.2.0.
|
|
84
|
-
alias active_tab active_sheet
|
|
85
|
-
|
|
86
|
-
# Sets the active worksheet tab in the workbook window.
|
|
87
|
-
#
|
|
88
|
-
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
89
|
-
# @return [String, Symbol, Integer, nil]
|
|
90
|
-
# @api public
|
|
91
|
-
attr_writer active_sheet: String | Symbol | Integer | nil
|
|
92
|
-
|
|
93
|
-
# @deprecated Use {#active_sheet=} instead. Will be removed in 0.2.0.
|
|
94
|
-
alias active_tab= active_sheet=
|
|
95
|
-
|
|
96
|
-
# Gets or sets the first sheet tab visible in the sheet tab scroll area.
|
|
97
|
-
#
|
|
98
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#first_sheet=} instead.
|
|
99
|
-
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
58
|
+
# Active worksheet tab in the workbook window.
|
|
100
59
|
# @return [String, Symbol, Integer, nil]
|
|
101
60
|
# @api public
|
|
102
|
-
|
|
103
|
-
def first_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
61
|
+
attr_accessor active_sheet: String | Symbol | Integer | nil
|
|
104
62
|
|
|
105
|
-
#
|
|
106
|
-
#
|
|
107
|
-
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
63
|
+
# First sheet tab visible in the sheet tab scroll area.
|
|
108
64
|
# @return [String, Symbol, Integer, nil]
|
|
109
65
|
# @api public
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
# Gets or sets whether sheet tabs are visible in the workbook window.
|
|
113
|
-
#
|
|
114
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#show_sheet_tabs=} instead.
|
|
115
|
-
# @param visible [Boolean, nil]
|
|
116
|
-
# @return [Boolean, nil]
|
|
117
|
-
# @api public
|
|
118
|
-
# : (?bool? visible) -> bool?
|
|
119
|
-
def show_sheet_tabs: (?bool? visible) -> bool?
|
|
66
|
+
attr_accessor first_sheet: String | Symbol | Integer | nil
|
|
120
67
|
|
|
121
68
|
# Sets whether sheet tabs are visible in the workbook window.
|
|
122
|
-
#
|
|
123
69
|
# @param visible [Boolean, nil]
|
|
124
70
|
# @return [Boolean, nil]
|
|
125
71
|
# @api public
|
|
126
|
-
attr_writer show_sheet_tabs:
|
|
72
|
+
attr_writer show_sheet_tabs: untyped
|
|
127
73
|
|
|
128
|
-
#
|
|
129
|
-
#
|
|
130
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_ratio=} instead.
|
|
131
|
-
# @param ratio [Integer, nil]
|
|
132
|
-
# @return [Integer, nil]
|
|
74
|
+
# Returns whether sheet tabs are visible in the workbook window.
|
|
75
|
+
# @return [Boolean]
|
|
133
76
|
# @api public
|
|
134
|
-
# : (
|
|
135
|
-
def
|
|
77
|
+
# : () -> bool
|
|
78
|
+
def show_sheet_tabs?: () -> bool
|
|
136
79
|
|
|
137
|
-
#
|
|
138
|
-
#
|
|
139
|
-
# @param ratio [Integer, nil]
|
|
80
|
+
# Ratio between the sheet tabs bar and the horizontal scroll bar (0-1000).
|
|
140
81
|
# @return [Integer, nil]
|
|
141
82
|
# @api public
|
|
142
|
-
|
|
83
|
+
attr_accessor tab_ratio: Integer?
|
|
143
84
|
|
|
144
|
-
#
|
|
145
|
-
#
|
|
146
|
-
# @note **SECURITY WARNING:** If you set `:update_links` to anything other than `"never"`,
|
|
147
|
-
# you may expose end-users to malicious external reference vulnerabilities (e.g., CSV/DDE Injection)
|
|
148
|
-
# when they open the generated Excel file. Ensure you fully trust the exported data.
|
|
85
|
+
# Configures or queries workbook-level properties.
|
|
149
86
|
#
|
|
150
|
-
#
|
|
151
|
-
#
|
|
152
|
-
# @return [void]
|
|
153
|
-
# : (Symbol name, String | Integer | bool value) -> void
|
|
154
|
-
def workbook_property: (Symbol name, String | Integer | bool value) -> void
|
|
155
|
-
|
|
156
|
-
# Returns workbook-level properties.
|
|
87
|
+
# When called with no arguments, returns the {Elements::WorkbookProperties} value object.
|
|
88
|
+
# When called with keyword options, configures properties and returns nil.
|
|
157
89
|
#
|
|
158
|
-
# @
|
|
90
|
+
# @param opts [Hash] Workbook properties map.
|
|
91
|
+
# @return [Elements::WorkbookProperties, void]
|
|
159
92
|
# @api public
|
|
160
93
|
# : () -> Elements::WorkbookProperties
|
|
94
|
+
# : (**untyped opts) -> void
|
|
161
95
|
def workbook_properties: () -> Elements::WorkbookProperties
|
|
96
|
+
| (**untyped opts) -> void
|
|
162
97
|
|
|
163
98
|
# Sets workbook-level properties.
|
|
164
99
|
#
|
|
@@ -175,6 +110,8 @@ module Xlsxrb
|
|
|
175
110
|
# @yield [style_builder]
|
|
176
111
|
# @yieldparam style_builder [Xlsxrb::StyleBuilder]
|
|
177
112
|
# @return [StyleBuilder]
|
|
113
|
+
# Using the returned value is deprecated and warns; in version 0.3.0, this method
|
|
114
|
+
# will return nil. Configure the style with options or in the block.
|
|
178
115
|
# : (String | Symbol name, **untyped opts) ?{ (StyleBuilder) -> void } -> StyleBuilder
|
|
179
116
|
def style: (String | Symbol name, **untyped opts) ?{ (StyleBuilder) -> void } -> StyleBuilder
|
|
180
117
|
|
|
@@ -188,9 +125,6 @@ module Xlsxrb
|
|
|
188
125
|
# : (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
189
126
|
def default_font: (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
190
127
|
|
|
191
|
-
# @deprecated Use {#default_font} instead. Will be removed in 0.2.0.
|
|
192
|
-
alias set_default_font default_font
|
|
193
|
-
|
|
194
128
|
# Creates an {Elements::Formula} object.
|
|
195
129
|
# @api public
|
|
196
130
|
# : (String expression, ?cached_value: (String | Numeric | bool | Elements::CellError | nil), ?type: (Symbol | String)?, ?ref: String?, ?shared_index: Integer?) -> Elements::Formula
|
|
@@ -224,18 +158,12 @@ module Xlsxrb
|
|
|
224
158
|
# @param sheet_name [String]
|
|
225
159
|
def initialize: (untyped writer, untyped sheet_name) -> untyped
|
|
226
160
|
|
|
227
|
-
#
|
|
161
|
+
# Returns the worksheet name.
|
|
228
162
|
#
|
|
229
|
-
# @
|
|
230
|
-
# @param size [Float, Integer, nil] Font size in points.
|
|
231
|
-
# @param opts [Hash] Additional font options.
|
|
232
|
-
# @return [void]
|
|
163
|
+
# @return [String]
|
|
233
164
|
# @api public
|
|
234
|
-
# : (
|
|
235
|
-
def
|
|
236
|
-
|
|
237
|
-
# @deprecated Use {#default_font} instead. Will be removed in 0.2.0.
|
|
238
|
-
alias set_default_font default_font
|
|
165
|
+
# : () -> String
|
|
166
|
+
def name: () -> String
|
|
239
167
|
|
|
240
168
|
# Creates an {Elements::Formula} object.
|
|
241
169
|
# @api public
|
|
@@ -262,46 +190,6 @@ module Xlsxrb
|
|
|
262
190
|
# : (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
263
191
|
def cell_error: (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
264
192
|
|
|
265
|
-
# Returns the worksheet name.
|
|
266
|
-
#
|
|
267
|
-
# @return [String]
|
|
268
|
-
# @api public
|
|
269
|
-
# : () -> String
|
|
270
|
-
def name: () -> String
|
|
271
|
-
|
|
272
|
-
# Returns column configurations defined for this worksheet.
|
|
273
|
-
#
|
|
274
|
-
# @return [Array<Elements::Column>]
|
|
275
|
-
# @api public
|
|
276
|
-
# : () -> Array[Elements::Column]
|
|
277
|
-
def columns: () -> Array[Elements::Column]
|
|
278
|
-
|
|
279
|
-
# Returns the list of worksheet names created in this workbook so far.
|
|
280
|
-
#
|
|
281
|
-
# @return [Array<String>] Worksheet names.
|
|
282
|
-
# @api public
|
|
283
|
-
# : () -> Array[String]
|
|
284
|
-
def sheet_names: () -> Array[String]
|
|
285
|
-
|
|
286
|
-
# Returns whether formula escaping is enabled.
|
|
287
|
-
#
|
|
288
|
-
# @return [Boolean]
|
|
289
|
-
# @api public
|
|
290
|
-
# : () -> bool
|
|
291
|
-
def escape_formulas?: () -> bool
|
|
292
|
-
|
|
293
|
-
# @return [Boolean] Whether to treat strings starting with formula prefixes as plain text.
|
|
294
|
-
# : bool
|
|
295
|
-
def escape_formulas: () -> untyped
|
|
296
|
-
|
|
297
|
-
# Sets whether to treat strings starting with formula prefixes as plain text.
|
|
298
|
-
#
|
|
299
|
-
# @param val [Boolean]
|
|
300
|
-
# @return [Boolean]
|
|
301
|
-
# @api public
|
|
302
|
-
# : (bool val) -> bool
|
|
303
|
-
def escape_formulas=: (bool val) -> bool
|
|
304
|
-
|
|
305
193
|
# Defines or configures a named cell style on the active sheet.
|
|
306
194
|
#
|
|
307
195
|
# @example
|
|
@@ -321,42 +209,28 @@ module Xlsxrb
|
|
|
321
209
|
# @example Merge with cell reference string
|
|
322
210
|
# s.merge("A1:C1")
|
|
323
211
|
#
|
|
324
|
-
# @
|
|
325
|
-
# @param range [String, Hash, nil] The cell range (e.g. "A1:B2").
|
|
326
|
-
# @param row [Integer, nil] 0-based row index.
|
|
327
|
-
# @param col_start [Integer, String, nil] 0-based start column index or letter.
|
|
328
|
-
# @param col_end [Integer, String, nil] 0-based end column index or letter.
|
|
329
|
-
# @param row_start [Integer, nil] 0-based start row index.
|
|
330
|
-
# @param row_end [Integer, nil] 0-based end row index.
|
|
212
|
+
# @param range [String] The cell range (e.g. "A1:B2").
|
|
331
213
|
# @return [void]
|
|
332
214
|
# @api public
|
|
333
|
-
# : (
|
|
334
|
-
def merge: (
|
|
215
|
+
# : (String range) -> void
|
|
216
|
+
def merge: (String range) -> void
|
|
335
217
|
|
|
336
218
|
# Adds a drawing shape to the sheet.
|
|
337
219
|
#
|
|
338
220
|
# @example
|
|
339
|
-
# s.shape(preset: "ellipse", text: "Circle",
|
|
221
|
+
# s.shape(preset: "ellipse", text: "Circle", from_column: 1, from_row: 1, to_column: 4, to_row: 5)
|
|
340
222
|
#
|
|
341
223
|
# @param preset [String] Preset shape type (e.g. "rect", "ellipse").
|
|
342
224
|
# @param text [String, nil] Shape label text.
|
|
343
225
|
# @param from_column [Integer, nil] Starting column index (0-based).
|
|
344
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
345
226
|
# @param from_row [Integer] Starting row index (0-based).
|
|
346
227
|
# @param to_column [Integer, nil] Ending column index (0-based).
|
|
347
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
348
228
|
# @param to_row [Integer] Ending row index (0-based).
|
|
349
229
|
# @param opts [Hash] Additional shape formatting options.
|
|
350
230
|
# @return [void]
|
|
351
231
|
# @api public
|
|
352
|
-
# : (?preset: String, ?text: String?, ?from_column: Integer?, ?
|
|
353
|
-
def shape: (?preset: String, ?text: String?, ?from_column: Integer?, ?
|
|
354
|
-
|
|
355
|
-
# simplecov:disable
|
|
356
|
-
# Edge case / untested delegation block
|
|
357
|
-
# @api private
|
|
358
|
-
# : (*untyped args, **untyped kwargs) ?{ (*untyped) -> untyped } -> untyped
|
|
359
|
-
def internal_sheet_setup: (*untyped args, **untyped kwargs) ?{ (*untyped) -> untyped } -> untyped
|
|
232
|
+
# : (?preset: String, ?text: String?, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
233
|
+
def shape: (?preset: String, ?text: String?, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
360
234
|
|
|
361
235
|
# Appends a row of cells to the active sheet.
|
|
362
236
|
#
|
|
@@ -374,15 +248,10 @@ module Xlsxrb
|
|
|
374
248
|
# @param custom_height [Boolean] Whether to flag as custom height.
|
|
375
249
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
376
250
|
# @param collapsed [Boolean] Whether the row is collapsed.
|
|
377
|
-
# @param styles [String, Symbol, Array, Hash, nil] Deprecated. Use cell_styles: instead.
|
|
378
|
-
# @param style [Integer, Symbol, String, Hash, nil] Deprecated. Use row_style: instead.
|
|
379
251
|
# @return [void]
|
|
380
252
|
# @api public
|
|
381
|
-
# : (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?
|
|
382
|
-
def row: (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?
|
|
383
|
-
|
|
384
|
-
# @deprecated Use {#row} instead. Will be removed in 0.2.0.
|
|
385
|
-
alias add_row row
|
|
253
|
+
# : (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
254
|
+
def row: (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
386
255
|
|
|
387
256
|
# Appends a row to the worksheet and returns self for chaining.
|
|
388
257
|
#
|
|
@@ -397,9 +266,6 @@ module Xlsxrb
|
|
|
397
266
|
|
|
398
267
|
# Advances the row cursor by count without writing empty row elements.
|
|
399
268
|
#
|
|
400
|
-
# @example Skip one row
|
|
401
|
-
# s.skip_row
|
|
402
|
-
#
|
|
403
269
|
# @example Skip multiple rows
|
|
404
270
|
# s.skip_rows(3)
|
|
405
271
|
#
|
|
@@ -409,9 +275,6 @@ module Xlsxrb
|
|
|
409
275
|
# : (?Integer count) -> void
|
|
410
276
|
def skip_rows: (?Integer count) -> void
|
|
411
277
|
|
|
412
|
-
# @deprecated Use {#skip_rows} instead. Will be removed in 0.2.0.
|
|
413
|
-
alias skip_row skip_rows
|
|
414
|
-
|
|
415
278
|
# Configures column width and properties.
|
|
416
279
|
#
|
|
417
280
|
# @example Set column A width
|
|
@@ -443,15 +306,6 @@ module Xlsxrb
|
|
|
443
306
|
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
444
307
|
def group_columns: (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
445
308
|
|
|
446
|
-
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
447
|
-
alias group_column group_columns
|
|
448
|
-
|
|
449
|
-
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
450
|
-
alias group_cols group_columns
|
|
451
|
-
|
|
452
|
-
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
453
|
-
alias group_col group_columns
|
|
454
|
-
|
|
455
309
|
# Groups multiple rows with outline hierarchy with a block.
|
|
456
310
|
#
|
|
457
311
|
# @param rows [Range, Array, Integer, nil] Unused in streaming write.
|
|
@@ -464,26 +318,21 @@ module Xlsxrb
|
|
|
464
318
|
# : (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
465
319
|
def group_rows: (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
466
320
|
|
|
467
|
-
#
|
|
468
|
-
alias group_row group_rows
|
|
469
|
-
|
|
470
|
-
# Configures worksheet-level outline and grouping view properties.
|
|
321
|
+
# Configures or queries worksheet-level outline and grouping view properties.
|
|
471
322
|
#
|
|
472
323
|
# @param summary_below [Boolean, nil] Summary rows below detail rows.
|
|
473
324
|
# @param summary_right [Boolean, nil] Summary columns to the right of detail columns.
|
|
474
325
|
# @param show_outline_symbols [Boolean, nil] Outline symbols visible.
|
|
475
|
-
# @param show_symbols [Boolean, nil] Deprecated alias for show_outline_symbols.
|
|
476
326
|
# @param apply_styles [Boolean, nil] Automatic styles applied.
|
|
477
327
|
# @param opts [Hash] Additional options.
|
|
478
|
-
# @return [void]
|
|
328
|
+
# @return [Hash<Symbol, untyped>, void]
|
|
479
329
|
# @api public
|
|
480
|
-
# : (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
alias outline_pr outline_properties
|
|
330
|
+
# : () -> Hash[Symbol, untyped]
|
|
331
|
+
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
332
|
+
def outline_properties: () -> Hash[Symbol, untyped]
|
|
333
|
+
| (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
485
334
|
|
|
486
|
-
# Sets worksheet outline and grouping view properties.
|
|
335
|
+
# Sets worksheet-level outline and grouping view properties.
|
|
487
336
|
#
|
|
488
337
|
# @param opts [Hash] Outline properties.
|
|
489
338
|
# @return [void]
|
|
@@ -491,13 +340,11 @@ module Xlsxrb
|
|
|
491
340
|
# : (Hash[Symbol, untyped] opts) -> void
|
|
492
341
|
def outline_properties=: (Hash[Symbol, untyped] opts) -> void
|
|
493
342
|
|
|
494
|
-
alias outline_pr= outline_properties=
|
|
495
|
-
|
|
496
343
|
# Adds a chart to the active sheet.
|
|
497
344
|
#
|
|
498
345
|
# @example
|
|
499
346
|
# s.chart(:bar) do |chart_builder|
|
|
500
|
-
# chart_builder.title
|
|
347
|
+
# chart_builder.title = "Quarterly Sales"
|
|
501
348
|
# chart_builder.series(values: "Sheet1!$B$2:$B$5", categories: "Sheet1!$A$2:$A$5", name: "Revenue")
|
|
502
349
|
# end
|
|
503
350
|
#
|
|
@@ -528,16 +375,12 @@ module Xlsxrb
|
|
|
528
375
|
# : (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
529
376
|
def hyperlink: (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
530
377
|
|
|
531
|
-
#
|
|
378
|
+
# Returns the auto-filter range on the active sheet, or nil if none.
|
|
532
379
|
#
|
|
533
|
-
# @
|
|
534
|
-
# s.auto_filter("A1:D100")
|
|
535
|
-
#
|
|
536
|
-
# @param range [String, nil] The cell range (e.g. "A1:D10").
|
|
537
|
-
# @return [void]
|
|
380
|
+
# @return [String, nil]
|
|
538
381
|
# @api public
|
|
539
|
-
# : (
|
|
540
|
-
def auto_filter: (
|
|
382
|
+
# : () -> String?
|
|
383
|
+
def auto_filter: () -> String?
|
|
541
384
|
|
|
542
385
|
# Sets the auto-filter range on the active sheet.
|
|
543
386
|
#
|
|
@@ -556,29 +399,31 @@ module Xlsxrb
|
|
|
556
399
|
# @param filter [Hash] Values or filter specification hash.
|
|
557
400
|
# @return [void]
|
|
558
401
|
# @api public
|
|
559
|
-
# : (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
560
|
-
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
402
|
+
# : (Integer | String | Symbol col_id, (Hash[untyped, untyped] | Array[untyped]) filter) -> void
|
|
403
|
+
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] | Array[untyped] filter) -> void
|
|
561
404
|
|
|
562
|
-
# Configures sort state on a range.
|
|
405
|
+
# Configures or queries sort state on a range.
|
|
563
406
|
#
|
|
564
|
-
#
|
|
565
|
-
#
|
|
407
|
+
# When called with no arguments, returns the {Elements::SortState} value object.
|
|
408
|
+
# When called with arguments, updates sort state and returns nil.
|
|
566
409
|
#
|
|
567
|
-
# @param ref [String] The range to sort.
|
|
568
|
-
# @param sort_conditions [Array<Hash
|
|
410
|
+
# @param ref [String, nil] The range to sort.
|
|
411
|
+
# @param sort_conditions [Array<Hash>, nil] Sort conditions array.
|
|
569
412
|
# @param opts [Hash] Additional sort options.
|
|
570
|
-
# @return [void]
|
|
413
|
+
# @return [Elements::SortState, nil, void]
|
|
571
414
|
# @api public
|
|
572
|
-
# : (
|
|
573
|
-
|
|
415
|
+
# : () -> Elements::SortState?
|
|
416
|
+
# : (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, **untyped opts) -> void
|
|
417
|
+
def sort_state: () -> Elements::SortState?
|
|
418
|
+
| (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, **untyped opts) -> void
|
|
574
419
|
|
|
575
|
-
# Sets
|
|
420
|
+
# Sets sort state configuration for the active sheet.
|
|
576
421
|
#
|
|
577
422
|
# @param opts [Elements::SortState, Hash, nil] Sort state options.
|
|
578
423
|
# @return [void]
|
|
579
424
|
# @api public
|
|
580
|
-
# : (untyped opts) -> void
|
|
581
|
-
def sort_state=: (untyped opts) -> void
|
|
425
|
+
# : (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
426
|
+
def sort_state=: (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
582
427
|
|
|
583
428
|
# Adds data validation rules to a range.
|
|
584
429
|
#
|
|
@@ -587,8 +432,8 @@ module Xlsxrb
|
|
|
587
432
|
#
|
|
588
433
|
# @example Block syntax
|
|
589
434
|
# s.data_validation("B2:B100") do |dv|
|
|
590
|
-
# dv.type :list
|
|
591
|
-
# dv.formula1 '"High,Medium,Low"'
|
|
435
|
+
# dv.type = :list
|
|
436
|
+
# dv.formula1 = '"High,Medium,Low"'
|
|
592
437
|
# end
|
|
593
438
|
#
|
|
594
439
|
# @param range [String, nil] The cell range (e.g. "B2:B10").
|
|
@@ -600,10 +445,6 @@ module Xlsxrb
|
|
|
600
445
|
# : (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
601
446
|
def data_validation: (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
602
447
|
|
|
603
|
-
# @deprecated Use {#data_validation} instead.
|
|
604
|
-
# : (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
605
|
-
def validate_data: (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
606
|
-
|
|
607
448
|
# Adds conditional formatting to a range.
|
|
608
449
|
#
|
|
609
450
|
# @example Highlight values greater than 100
|
|
@@ -631,8 +472,8 @@ module Xlsxrb
|
|
|
631
472
|
#
|
|
632
473
|
# @example Block syntax
|
|
633
474
|
# s.table("A1:C10") do |t|
|
|
634
|
-
# t.columns ["ID", "Name", "Total"]
|
|
635
|
-
# t.style "TableStyleMedium9"
|
|
475
|
+
# t.columns = ["ID", "Name", "Total"]
|
|
476
|
+
# t.style = "TableStyleMedium9"
|
|
636
477
|
# end
|
|
637
478
|
#
|
|
638
479
|
# @param ref [String, nil] The cell range for the table (e.g. "A1:D10").
|
|
@@ -647,12 +488,6 @@ module Xlsxrb
|
|
|
647
488
|
# : (?String? ref, ?columns: untyped, ?name: String?, ?display_name: String?, ?style: String?, **untyped opts) ?{ (TableBuilder) -> void } -> void
|
|
648
489
|
def table: (?String? ref, ?columns: untyped, ?name: String?, ?display_name: String?, ?style: String?, **untyped opts) ?{ (TableBuilder) -> void } -> void
|
|
649
490
|
|
|
650
|
-
# simplecov:disable
|
|
651
|
-
# Edge case / untested delegation block
|
|
652
|
-
# @api private
|
|
653
|
-
# : () -> void
|
|
654
|
-
def cleanup!: () -> void
|
|
655
|
-
|
|
656
491
|
# Adds a comment to a cell.
|
|
657
492
|
#
|
|
658
493
|
# @example
|
|
@@ -661,42 +496,38 @@ module Xlsxrb
|
|
|
661
496
|
# @param cell [String, Integer] The cell reference (e.g. "A1").
|
|
662
497
|
# @param text [String] The comment text.
|
|
663
498
|
# @param author [String] The author name.
|
|
499
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover.
|
|
664
500
|
# @return [void]
|
|
665
501
|
# @api public
|
|
666
|
-
# : (String | Integer cell, String text, ?author: String) -> void
|
|
667
|
-
def comment: (String | Integer cell, String text, ?author: String) -> void
|
|
502
|
+
# : (String | Integer cell, String text, ?author: String, ?visible: bool) -> void
|
|
503
|
+
def comment: (String | Integer cell, String text, ?author: String, ?visible: bool) -> void
|
|
668
504
|
|
|
669
505
|
# Adds a threaded comment to a cell.
|
|
670
506
|
#
|
|
671
507
|
# @param cell [String, Integer] The cell reference (e.g. "A1").
|
|
672
508
|
# @param text [String] The comment text.
|
|
673
509
|
# @param author [String] The author name.
|
|
674
|
-
# @param opts [Hash] Options: timestamp, id, parent_id, done, user_id, provider_id.
|
|
510
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover. # @param opts [Hash] Options: timestamp, id, parent_id, done, user_id, provider_id.
|
|
675
511
|
# @return [void]
|
|
676
512
|
# @api public
|
|
677
513
|
# : (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
678
514
|
def threaded_comment: (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
679
515
|
|
|
680
|
-
# @deprecated Use {#threaded_comment} instead. Will be removed in 0.2.0.
|
|
681
|
-
alias add_threaded_comment threaded_comment
|
|
682
|
-
|
|
683
516
|
# Adds a Pivot Table to the sheet.
|
|
684
517
|
#
|
|
685
518
|
# @param source_ref [String] Source data range reference (e.g. "Sheet1!A1:D100").
|
|
686
519
|
# @param row_fields [Array<String>] Field names for rows.
|
|
687
520
|
# @param data_fields [Array<String>] Field names for data values.
|
|
688
|
-
# @param column_fields [Array<String
|
|
689
|
-
# @param
|
|
690
|
-
# @param ref [String] Target top-left cell reference (default: "E1").
|
|
691
|
-
# @param dest_ref [String] Deprecated alias for ref.
|
|
521
|
+
# @param column_fields [Array<String>, nil] Field names for columns.
|
|
522
|
+
# @param ref [String, nil] Target top-left cell reference (default: "E1").
|
|
692
523
|
# @param name [String, nil] Pivot table name.
|
|
693
524
|
# @param field_names [Array<String>, nil] Override field names.
|
|
694
|
-
# @param items [Array, nil] Items
|
|
525
|
+
# @param items [Hash{Integer => Array}, nil] Items of each field, by 0-based field index.
|
|
695
526
|
# @param opts [Hash] Additional options.
|
|
696
527
|
# @return [void]
|
|
697
528
|
# @api public
|
|
698
|
-
# : (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?
|
|
699
|
-
def pivot_table: (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?
|
|
529
|
+
# : (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?ref: String?, ?name: String?, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
530
|
+
def pivot_table: (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?ref: String?, ?name: String?, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
700
531
|
|
|
701
532
|
# Adds sparklines to the sheet.
|
|
702
533
|
#
|
|
@@ -711,119 +542,14 @@ module Xlsxrb
|
|
|
711
542
|
# : (sparklines: Array[Hash[Symbol, untyped]], ?type: (String | Symbol)?, **untyped opts) -> void
|
|
712
543
|
def sparkline_group: (sparklines: Array[Hash[Symbol, untyped]], ?type: (String | Symbol)?, **untyped opts) -> void
|
|
713
544
|
|
|
714
|
-
# Adds a single sparkline to the sheet.
|
|
715
|
-
#
|
|
716
|
-
# @example Add a line sparkline
|
|
717
|
-
# s.add_sparkline(location: "F1", range: "A1:E1")
|
|
718
|
-
#
|
|
719
|
-
# @example Add a column sparkline with high/low markers
|
|
720
|
-
# s.add_sparkline(location: "F2", range: "A2:E2", type: :column, high: true, low: true)
|
|
721
|
-
#
|
|
722
|
-
# @example Add a win/loss sparkline
|
|
723
|
-
# s.add_sparkline(location: "F3", range: "A3:E3", type: :win_loss)
|
|
724
|
-
#
|
|
725
|
-
# @param location [String, nil] Target cell for the sparkline (e.g. "F1").
|
|
726
|
-
# @param range [String, nil] Data range for the sparkline (e.g. "A1:E1").
|
|
727
|
-
# @param type [Symbol, String, nil] Sparkline type (:line, :column, :win_loss / :stacked).
|
|
728
|
-
# @param opts [Hash] Additional sparkline options.
|
|
729
|
-
# @deprecated Use {#sparkline_group} instead. Will be removed in 0.2.0.
|
|
730
|
-
# @return [void]
|
|
731
|
-
# @api public
|
|
732
|
-
# : (?location: String?, ?range: String?, ?type: (String | Symbol)?, **untyped opts) -> void
|
|
733
|
-
def add_sparkline: (?location: String?, ?range: String?, ?type: (String | Symbol)?, **untyped opts) -> void
|
|
734
|
-
|
|
735
545
|
# Sets workbook-level properties.
|
|
736
546
|
#
|
|
737
|
-
#
|
|
738
|
-
# @param value [String, Integer, Boolean] Property value.
|
|
739
|
-
# @return [void]
|
|
740
|
-
# @api public
|
|
741
|
-
# : (Symbol name, String | Integer | bool value) -> void
|
|
742
|
-
def workbook_property: (Symbol name, String | Integer | bool value) -> void
|
|
743
|
-
|
|
744
|
-
# Sets or gets the active sheet in the workbook window.
|
|
745
|
-
# If called without arguments on the proxy, marks this sheet as the active sheet.
|
|
547
|
+
# Gets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
746
548
|
#
|
|
747
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#active_sheet=} instead.
|
|
748
|
-
# @param name_or_index [String, Symbol, Integer, nil]
|
|
749
|
-
# @return [String, Symbol, Integer, nil]
|
|
750
|
-
# @api public
|
|
751
|
-
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
752
|
-
def active_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
753
|
-
|
|
754
|
-
# @deprecated Use {#active_sheet} instead. Will be removed in 0.2.0.
|
|
755
|
-
alias active_tab active_sheet
|
|
756
|
-
|
|
757
|
-
# Sets the active worksheet tab in the workbook window.
|
|
758
|
-
#
|
|
759
|
-
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
760
|
-
# @return [String, Symbol, Integer, nil]
|
|
761
|
-
# @api public
|
|
762
|
-
# : (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
763
|
-
def active_sheet=: (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
764
|
-
|
|
765
|
-
# @deprecated Use {#active_sheet=} instead. Will be removed in 0.2.0.
|
|
766
|
-
alias active_tab= active_sheet=
|
|
767
|
-
|
|
768
|
-
# Sets or gets the first visible sheet in the tab bar.
|
|
769
|
-
#
|
|
770
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#first_sheet=} instead.
|
|
771
|
-
# @param name_or_index [String, Symbol, Integer, nil]
|
|
772
|
-
# @return [String, Symbol, Integer, nil]
|
|
773
|
-
# @api public
|
|
774
|
-
# : (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
775
|
-
def first_sheet: (?String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
776
|
-
|
|
777
|
-
# Sets the first visible sheet in the tab bar.
|
|
778
|
-
#
|
|
779
|
-
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
780
|
-
# @return [String, Symbol, Integer, nil]
|
|
781
|
-
# @api public
|
|
782
|
-
# : (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
783
|
-
def first_sheet=: (String | Symbol | Integer | nil name_or_index) -> (String | Symbol | Integer | nil)
|
|
784
|
-
|
|
785
|
-
# Sets or gets whether sheet tabs are visible in the workbook window.
|
|
786
|
-
#
|
|
787
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#show_sheet_tabs=} instead.
|
|
788
|
-
# @param visible [Boolean, nil]
|
|
789
|
-
# @return [Boolean, nil]
|
|
790
|
-
# @api public
|
|
791
|
-
# : (?bool? visible) -> bool?
|
|
792
|
-
def show_sheet_tabs: (?bool? visible) -> bool?
|
|
793
|
-
|
|
794
|
-
# Sets whether sheet tabs are visible in the workbook window.
|
|
795
|
-
#
|
|
796
|
-
# @param visible [Boolean, nil]
|
|
797
|
-
# @return [Boolean, nil]
|
|
798
|
-
# @api public
|
|
799
|
-
# : (bool? visible) -> bool?
|
|
800
|
-
def show_sheet_tabs=: (bool? visible) -> bool?
|
|
801
|
-
|
|
802
|
-
# Sets or gets the tab ratio between tab bar and horizontal scrollbar (0-1000).
|
|
803
|
-
#
|
|
804
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_ratio=} instead.
|
|
805
|
-
# @param ratio [Integer, nil]
|
|
806
|
-
# @return [Integer, nil]
|
|
807
|
-
# @api public
|
|
808
|
-
# : (?Integer? ratio) -> Integer?
|
|
809
|
-
def tab_ratio: (?Integer? ratio) -> Integer?
|
|
810
|
-
|
|
811
|
-
# Sets the tab ratio between tab bar and horizontal scrollbar (0-1000).
|
|
812
|
-
#
|
|
813
|
-
# @param ratio [Integer, nil]
|
|
814
|
-
# @return [Integer, nil]
|
|
815
|
-
# @api public
|
|
816
|
-
# : (Integer? ratio) -> Integer?
|
|
817
|
-
def tab_ratio=: (Integer? ratio) -> Integer?
|
|
818
|
-
|
|
819
|
-
# Gets or sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
820
|
-
#
|
|
821
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#state=} instead.
|
|
822
|
-
# @param new_state [Symbol, nil] The new state.
|
|
823
549
|
# @return [Symbol]
|
|
824
550
|
# @api public
|
|
825
|
-
# : (
|
|
826
|
-
def state: (
|
|
551
|
+
# : () -> Symbol
|
|
552
|
+
def state: () -> Symbol
|
|
827
553
|
|
|
828
554
|
# Sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
829
555
|
#
|
|
@@ -833,15 +559,12 @@ module Xlsxrb
|
|
|
833
559
|
# : (Symbol | String new_state) -> Symbol
|
|
834
560
|
def state=: (Symbol | String new_state) -> Symbol
|
|
835
561
|
|
|
836
|
-
# Gets
|
|
562
|
+
# Gets the tab color of this worksheet.
|
|
837
563
|
#
|
|
838
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_color=} instead.
|
|
839
|
-
# @param spec [String, Hash, Symbol, nil] Tab color hex string or hash options.
|
|
840
|
-
# @param opts [Hash] Color keyword arguments (e.g. theme: 1, tint: 0.5).
|
|
841
564
|
# @return [String, Hash, nil]
|
|
842
565
|
# @api public
|
|
843
|
-
# : (
|
|
844
|
-
def tab_color: (
|
|
566
|
+
# : () -> (String | Hash[Symbol, untyped] | nil)
|
|
567
|
+
def tab_color: () -> (String | Hash[Symbol, untyped] | nil)
|
|
845
568
|
|
|
846
569
|
# Sets the tab color of this worksheet.
|
|
847
570
|
#
|
|
@@ -851,27 +574,15 @@ module Xlsxrb
|
|
|
851
574
|
# : (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
852
575
|
def tab_color=: (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
853
576
|
|
|
854
|
-
#
|
|
577
|
+
# Configures or queries sheet properties.
|
|
855
578
|
#
|
|
856
|
-
# @param
|
|
857
|
-
# @
|
|
858
|
-
# @return [void]
|
|
579
|
+
# @param opts [Hash] Keyword options for sheet properties.
|
|
580
|
+
# @return [Elements::SheetProperties, void]
|
|
859
581
|
# @api public
|
|
860
|
-
# : (
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
#
|
|
865
|
-
# @example
|
|
866
|
-
# s.sheet_properties(tab_color: "FF0000")
|
|
867
|
-
#
|
|
868
|
-
# @param name [Symbol, String, Hash, nil] Property name or hash.
|
|
869
|
-
# @param value [Object, nil] Property value.
|
|
870
|
-
# @param opts [Hash] Additional options.
|
|
871
|
-
# @return [void]
|
|
872
|
-
# @api public
|
|
873
|
-
# : (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
874
|
-
def sheet_properties: (?Symbol | String | Hash[Symbol, untyped] | nil name, ?untyped value, **untyped opts) -> void
|
|
582
|
+
# : () -> Elements::SheetProperties
|
|
583
|
+
# : (**untyped opts) -> void
|
|
584
|
+
def sheet_properties: () -> Elements::SheetProperties
|
|
585
|
+
| (**untyped opts) -> void
|
|
875
586
|
|
|
876
587
|
# Replaces worksheet properties.
|
|
877
588
|
# @param opts [Hash, Elements::SheetProperties]
|
|
@@ -886,21 +597,20 @@ module Xlsxrb
|
|
|
886
597
|
# @param name [String] Defined name identifier.
|
|
887
598
|
# @param value [Object, nil] Value or formula expression.
|
|
888
599
|
# @param hidden [Boolean] Whether the defined name is hidden.
|
|
889
|
-
# @param column [Integer, String, nil] Deprecated alias for columns.
|
|
890
600
|
# @param columns [Integer, String, nil] Column index or letter for coordinate-based reference.
|
|
891
|
-
# @param
|
|
892
|
-
# @param row [Integer, Range, nil] Deprecated alias for rows.
|
|
893
|
-
# @param rows [Integer, Range, nil] Row or row range (1-based) for coordinate-based reference.
|
|
601
|
+
# @param rows [Integer, Range, nil] Row or row range (0-based) for coordinate-based reference.
|
|
894
602
|
# @param range [String, nil] Cell range reference.
|
|
895
603
|
# @param sheet [String, nil] Reference sheet name (defaults to current sheet).
|
|
896
604
|
# @param scope [String, Symbol, nil] Scope identifier (:workbook or sheet name).
|
|
897
|
-
# @param local [Boolean] Deprecated alias for scope: :current.
|
|
898
605
|
# @return [void]
|
|
899
606
|
# @api public
|
|
900
|
-
# : (String name, ?untyped value, ?hidden: bool, ?
|
|
901
|
-
def defined_name: (String name, ?untyped value, ?hidden: bool, ?
|
|
607
|
+
# : (String name, ?untyped value, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?scope: (String | Symbol)?) -> void
|
|
608
|
+
def defined_name: (String name, ?untyped value, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?scope: (String | Symbol)?) -> void
|
|
902
609
|
|
|
903
|
-
#
|
|
610
|
+
# Configures or queries freeze panes (<pane state="frozen">).
|
|
611
|
+
#
|
|
612
|
+
# When called with no arguments, returns the {Elements::FreezePane} value object or nil.
|
|
613
|
+
# When called with arguments, configures the freeze pane and returns nil.
|
|
904
614
|
#
|
|
905
615
|
# @example Freeze top row
|
|
906
616
|
# s.freeze_pane(row: 1)
|
|
@@ -910,27 +620,27 @@ module Xlsxrb
|
|
|
910
620
|
#
|
|
911
621
|
# @param row [Integer, nil] Number of rows to freeze.
|
|
912
622
|
# @param column [Integer, String, nil] Number of columns to freeze.
|
|
913
|
-
# @
|
|
914
|
-
# @return [void]
|
|
623
|
+
# @return [Elements::FreezePane, nil, void]
|
|
915
624
|
# @api public
|
|
916
|
-
# : (
|
|
917
|
-
|
|
625
|
+
# : () -> Elements::FreezePane?
|
|
626
|
+
# : (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
627
|
+
def freeze_pane: () -> Elements::FreezePane?
|
|
628
|
+
| (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
918
629
|
|
|
919
630
|
# Sets or clears freeze pane configuration.
|
|
920
631
|
#
|
|
921
632
|
# @param opts [Elements::FreezePane, Hash, nil] Freeze pane options.
|
|
922
633
|
# @return [void]
|
|
923
634
|
# @api public
|
|
924
|
-
# : (untyped opts) -> void
|
|
925
|
-
def freeze_pane=: (untyped opts) -> void
|
|
635
|
+
# : (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
636
|
+
def freeze_pane=: (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
926
637
|
|
|
927
|
-
#
|
|
638
|
+
# Returns the print area range for this worksheet, or nil if none.
|
|
928
639
|
#
|
|
929
|
-
# @
|
|
930
|
-
# @return [String, nil, void]
|
|
640
|
+
# @return [String, nil]
|
|
931
641
|
# @api public
|
|
932
|
-
# : (
|
|
933
|
-
def print_area: (
|
|
642
|
+
# : () -> String?
|
|
643
|
+
def print_area: () -> String?
|
|
934
644
|
|
|
935
645
|
# Sets the print area for this worksheet.
|
|
936
646
|
#
|
|
@@ -940,15 +650,19 @@ module Xlsxrb
|
|
|
940
650
|
# : (String? range) -> String?
|
|
941
651
|
def print_area=: (String? range) -> String?
|
|
942
652
|
|
|
943
|
-
#
|
|
653
|
+
# Sets or gets repeating print titles (rows and/or columns) for pagination.
|
|
944
654
|
#
|
|
945
|
-
#
|
|
946
|
-
#
|
|
947
|
-
#
|
|
655
|
+
# When called with no arguments, returns the {Elements::PrintTitles} value object or nil.
|
|
656
|
+
# When called with arguments, updates print titles and returns nil.
|
|
657
|
+
#
|
|
658
|
+
# @param rows [String, Integer, Range, nil] Repeating row range (e.g. "1:2").
|
|
659
|
+
# @param columns [String, Integer, Symbol, Range, nil] Repeating column range (e.g. "A:B").
|
|
948
660
|
# @return [Elements::PrintTitles, nil, void]
|
|
949
661
|
# @api public
|
|
950
|
-
# : (
|
|
951
|
-
|
|
662
|
+
# : () -> Elements::PrintTitles?
|
|
663
|
+
# : (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?) -> void
|
|
664
|
+
def print_titles: () -> Elements::PrintTitles?
|
|
665
|
+
| (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?) -> void
|
|
952
666
|
|
|
953
667
|
# Sets repeating print titles for this worksheet.
|
|
954
668
|
#
|
|
@@ -976,74 +690,58 @@ module Xlsxrb
|
|
|
976
690
|
# : (Integer | String first, ?(Integer | String)? last) -> void
|
|
977
691
|
def repeat_columns: (Integer | String first, ?(Integer | String)? last) -> void
|
|
978
692
|
|
|
979
|
-
# Splits sheet view into panes.
|
|
693
|
+
# Splits sheet view into panes or queries split pane settings (<pane>).
|
|
694
|
+
#
|
|
695
|
+
# When called with no arguments, returns the {Elements::SplitPane} value object or nil.
|
|
696
|
+
# When called with arguments, configures the split pane and returns nil.
|
|
980
697
|
#
|
|
981
|
-
# @param x_split [Integer] Horizontal split position.
|
|
982
|
-
# @param y_split [Integer] Vertical split position.
|
|
698
|
+
# @param x_split [Integer, nil] Horizontal split position.
|
|
699
|
+
# @param y_split [Integer, nil] Vertical split position.
|
|
983
700
|
# @param top_left_cell [String, nil] Top-left visible cell in bottom-right pane.
|
|
984
701
|
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
985
702
|
# @param state [String, Symbol, nil] Split state.
|
|
986
|
-
# @return [void]
|
|
703
|
+
# @return [Elements::SplitPane, nil, void]
|
|
987
704
|
# @api public
|
|
988
|
-
# : (
|
|
989
|
-
|
|
705
|
+
# : () -> Elements::SplitPane?
|
|
706
|
+
# : (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
707
|
+
def split_pane: () -> Elements::SplitPane?
|
|
708
|
+
| (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
990
709
|
|
|
991
710
|
# Sets or clears split pane configuration.
|
|
992
711
|
#
|
|
993
712
|
# @param opts [Elements::SplitPane, Hash, nil] Split pane options.
|
|
994
713
|
# @return [void]
|
|
995
714
|
# @api public
|
|
996
|
-
# : (untyped opts) -> void
|
|
997
|
-
def split_pane=: (untyped opts) -> void
|
|
998
|
-
|
|
999
|
-
# simplecov:disable
|
|
1000
|
-
# Edge case / untested delegation block
|
|
1001
|
-
# Sets workbook structure and window protection.
|
|
1002
|
-
#
|
|
1003
|
-
# @param opts [Hash] Protection options.
|
|
1004
|
-
# @return [void]
|
|
1005
|
-
# @api public
|
|
1006
|
-
# : (**untyped opts) -> void
|
|
1007
|
-
def workbook_protection: (**untyped opts) -> void
|
|
1008
|
-
|
|
1009
|
-
# @deprecated Use {#workbook_protection} instead.
|
|
1010
|
-
# : (**untyped opts) -> void
|
|
1011
|
-
def protect_workbook: (**untyped opts) -> void
|
|
715
|
+
# : (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
716
|
+
def split_pane=: (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1012
717
|
|
|
1013
|
-
#
|
|
1014
|
-
# Edge case / untested delegation block
|
|
1015
|
-
# Sets core metadata property.
|
|
718
|
+
# Sets or queries the active/selected cell on the sheet (<selection>).
|
|
1016
719
|
#
|
|
1017
|
-
#
|
|
1018
|
-
#
|
|
1019
|
-
# @return [void]
|
|
1020
|
-
# @api public
|
|
1021
|
-
# : (Symbol name, String | Integer | Time value) -> void
|
|
1022
|
-
def core_property: (Symbol name, String | Integer | Time value) -> void
|
|
1023
|
-
|
|
1024
|
-
# Sets the active/selected cell on the sheet.
|
|
720
|
+
# When called with no arguments, returns the selection ({Elements::Selection}, Array, or nil).
|
|
721
|
+
# When called with arguments, updates the selection and returns nil.
|
|
1025
722
|
#
|
|
1026
|
-
# @param active_cell [String] Cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
723
|
+
# @param active_cell [String, nil] Cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
1027
724
|
# @param sqref [String, nil] Selection range.
|
|
1028
725
|
# @param pane [String, Symbol, nil] Pane identifier.
|
|
1029
|
-
# @return [void]
|
|
726
|
+
# @return [Elements::Selection, Array<Elements::Selection>, nil, void]
|
|
1030
727
|
# @api public
|
|
1031
|
-
# : (
|
|
1032
|
-
|
|
728
|
+
# : () -> (Elements::Selection | Array[Elements::Selection])?
|
|
729
|
+
# : (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
730
|
+
def selection: () -> (Elements::Selection | Array[Elements::Selection])?
|
|
731
|
+
| (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1033
732
|
|
|
1034
733
|
# Sets or clears the selection configuration.
|
|
1035
734
|
#
|
|
1036
735
|
# @param opts [Elements::Selection, Array<Elements::Selection, Hash>, Hash, nil]
|
|
1037
736
|
# @return [void]
|
|
1038
737
|
# @api public
|
|
1039
|
-
# : (untyped opts) -> void
|
|
1040
|
-
def selection=: (untyped opts) -> void
|
|
1041
|
-
|
|
1042
|
-
# @deprecated Use {#selection} instead.
|
|
1043
|
-
# : (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1044
|
-
def select_cell: (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
738
|
+
# : (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
739
|
+
def selection=: (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
1045
740
|
|
|
1046
|
-
# Configures page margins for printing.
|
|
741
|
+
# Configures or queries page margins for printing (<pageMargins>).
|
|
742
|
+
#
|
|
743
|
+
# When called with no arguments, returns the {Elements::PageMargins} value object or nil.
|
|
744
|
+
# When called with arguments, configures page margins and returns nil.
|
|
1047
745
|
#
|
|
1048
746
|
# @param left [Float, nil] Left margin in inches.
|
|
1049
747
|
# @param right [Float, nil] Right margin in inches.
|
|
@@ -1051,62 +749,75 @@ module Xlsxrb
|
|
|
1051
749
|
# @param bottom [Float, nil] Bottom margin in inches.
|
|
1052
750
|
# @param header [Float, nil] Header margin in inches.
|
|
1053
751
|
# @param footer [Float, nil] Footer margin in inches.
|
|
1054
|
-
# @return [void]
|
|
752
|
+
# @return [Elements::PageMargins, nil, void]
|
|
1055
753
|
# @api public
|
|
754
|
+
# : () -> Elements::PageMargins?
|
|
1056
755
|
# : (?left: Float | nil, ?right: Float | nil, ?top: Float | nil, ?bottom: Float | nil, ?header: Float | nil, ?footer: Float | nil) -> void
|
|
1057
|
-
def page_margins: (
|
|
756
|
+
def page_margins: () -> Elements::PageMargins?
|
|
757
|
+
| (?left: Float | nil, ?right: Float | nil, ?top: Float | nil, ?bottom: Float | nil, ?header: Float | nil, ?footer: Float | nil) -> void
|
|
1058
758
|
|
|
1059
|
-
# Sets page margins configuration.
|
|
759
|
+
# Sets or clears page margins configuration.
|
|
1060
760
|
#
|
|
1061
761
|
# @param opts [Hash, Elements::PageMargins, nil]
|
|
1062
762
|
# @return [void]
|
|
1063
763
|
# @api public
|
|
1064
|
-
# : (untyped opts) -> void
|
|
1065
|
-
def page_margins=: (untyped opts) -> void
|
|
764
|
+
# : (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
765
|
+
def page_margins=: (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
1066
766
|
|
|
1067
|
-
# Configures page orientation, paper size, and print setup.
|
|
767
|
+
# Configures or queries page orientation, paper size, and print setup (<pageSetup>).
|
|
768
|
+
#
|
|
769
|
+
# When called with no arguments, returns the {Elements::PageSetup} value object.
|
|
770
|
+
# When called with keyword arguments, updates page setup and returns nil.
|
|
1068
771
|
#
|
|
1069
772
|
# @param orientation [String, Symbol, nil] "portrait" or "landscape" (or :portrait, :landscape).
|
|
1070
773
|
# @param paper_size [Integer, nil] Paper size index (e.g. 9 for A4, 1 for Letter).
|
|
1071
774
|
# @param opts [Hash] Additional options (scale, fit_to_width, fit_to_height).
|
|
1072
|
-
# @return [void]
|
|
775
|
+
# @return [Elements::PageSetup, void]
|
|
1073
776
|
# @api public
|
|
1074
|
-
# : (
|
|
1075
|
-
|
|
777
|
+
# : () -> Elements::PageSetup
|
|
778
|
+
# : (**untyped opts) -> void
|
|
779
|
+
def page_setup: () -> Elements::PageSetup
|
|
780
|
+
| (**untyped opts) -> void
|
|
1076
781
|
|
|
1077
782
|
# Sets page setup configuration.
|
|
1078
783
|
#
|
|
1079
784
|
# @param opts [Hash, Elements::PageSetup]
|
|
1080
785
|
# @return [void]
|
|
1081
786
|
# @api public
|
|
1082
|
-
# : (untyped opts) -> void
|
|
1083
|
-
def page_setup=: (untyped opts) -> void
|
|
787
|
+
# : (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
788
|
+
def page_setup=: (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
1084
789
|
|
|
1085
|
-
# Configures header and footer text for printing.
|
|
790
|
+
# Configures or queries header and footer text for printing (<headerFooter>).
|
|
791
|
+
#
|
|
792
|
+
# When called with no arguments, returns the {Elements::HeaderFooter} value object.
|
|
793
|
+
# When called with keyword arguments, updates headers and footers and returns nil.
|
|
1086
794
|
#
|
|
1087
795
|
# @param opts [Hash] Header and footer specifications.
|
|
1088
|
-
# @return [void]
|
|
796
|
+
# @return [Elements::HeaderFooter, void]
|
|
1089
797
|
# @api public
|
|
798
|
+
# : () -> Elements::HeaderFooter
|
|
1090
799
|
# : (**untyped opts) -> void
|
|
1091
|
-
def header_footer: (
|
|
800
|
+
def header_footer: () -> Elements::HeaderFooter
|
|
801
|
+
| (**untyped opts) -> void
|
|
1092
802
|
|
|
1093
803
|
# Sets header and footer configuration.
|
|
1094
804
|
#
|
|
1095
805
|
# @param opts [Hash, Elements::HeaderFooter]
|
|
1096
806
|
# @return [void]
|
|
1097
807
|
# @api public
|
|
1098
|
-
# : (untyped opts) -> void
|
|
1099
|
-
def header_footer=: (untyped opts) -> void
|
|
808
|
+
# : (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
809
|
+
def header_footer=: (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
1100
810
|
|
|
1101
|
-
# Configures print options (e.g. gridlines, headings).
|
|
811
|
+
# Configures or gets print options (e.g. gridlines, headings).
|
|
812
|
+
# Configures or queries print options.
|
|
1102
813
|
#
|
|
1103
|
-
# @param name [Symbol, String, Hash, nil] Print option name or hash.
|
|
1104
|
-
# @param value [Object, nil] Print option value.
|
|
1105
814
|
# @param opts [Hash] Additional options.
|
|
1106
|
-
# @return [void]
|
|
815
|
+
# @return [Elements::PrintOptions, void]
|
|
1107
816
|
# @api public
|
|
1108
|
-
# : (
|
|
1109
|
-
|
|
817
|
+
# : () -> Elements::PrintOptions
|
|
818
|
+
# : (**untyped opts) -> void
|
|
819
|
+
def print_options: () -> Elements::PrintOptions
|
|
820
|
+
| (**untyped opts) -> void
|
|
1110
821
|
|
|
1111
822
|
# Replaces print options.
|
|
1112
823
|
# @param opts [Hash, Elements::PrintOptions]
|
|
@@ -1115,115 +826,72 @@ module Xlsxrb
|
|
|
1115
826
|
# : (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1116
827
|
def print_options=: (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1117
828
|
|
|
1118
|
-
#
|
|
1119
|
-
# Edge case / untested delegation block
|
|
1120
|
-
# Sets document metadata properties (core, app, custom).
|
|
1121
|
-
#
|
|
1122
|
-
# @param core [Hash, nil] Core properties (title, creator, subject, etc.).
|
|
1123
|
-
# @param app [Hash, nil] App properties (company, manager).
|
|
1124
|
-
# @param custom [Hash, nil] Custom properties.
|
|
1125
|
-
# @return [void]
|
|
1126
|
-
# @api public
|
|
1127
|
-
# : (?core: Hash[untyped, untyped]?, ?app: Hash[untyped, untyped]?, ?custom: Hash[untyped, untyped]?) -> void
|
|
1128
|
-
def properties: (?core: Hash[untyped, untyped]?, ?app: Hash[untyped, untyped]?, ?custom: Hash[untyped, untyped]?) -> void
|
|
1129
|
-
|
|
1130
|
-
# simplecov:disable
|
|
1131
|
-
# Edge case / untested delegation block
|
|
1132
|
-
# Sets app metadata property.
|
|
829
|
+
# Sets or queries sheet-level protection with optional password hashing (<sheetProtection>).
|
|
1133
830
|
#
|
|
1134
|
-
#
|
|
1135
|
-
#
|
|
1136
|
-
# @return [void]
|
|
1137
|
-
# @api public
|
|
1138
|
-
# : (Symbol name, String | Integer | Time value) -> void
|
|
1139
|
-
def app_property: (Symbol name, String | Integer | Time value) -> void
|
|
1140
|
-
|
|
1141
|
-
# Sets sheet-level protection with optional password hashing.
|
|
831
|
+
# When called with no arguments, returns the {Elements::SheetProtection} value object or nil.
|
|
832
|
+
# When called with keyword arguments, sets sheet protection and returns nil.
|
|
1142
833
|
#
|
|
1143
834
|
# @param opts [Hash] Protection options.
|
|
1144
|
-
# @return [void]
|
|
835
|
+
# @return [Elements::SheetProtection, nil, void]
|
|
1145
836
|
# @api public
|
|
837
|
+
# : () -> Elements::SheetProtection?
|
|
1146
838
|
# : (**untyped opts) -> void
|
|
1147
|
-
def sheet_protection: (
|
|
839
|
+
def sheet_protection: () -> Elements::SheetProtection?
|
|
840
|
+
| (**untyped opts) -> void
|
|
1148
841
|
|
|
1149
842
|
# Sets or clears sheet protection configuration.
|
|
1150
843
|
#
|
|
1151
844
|
# @param opts [Elements::SheetProtection, Hash, Boolean, nil]
|
|
1152
845
|
# @return [void]
|
|
1153
846
|
# @api public
|
|
1154
|
-
# : (untyped opts) -> void
|
|
1155
|
-
def sheet_protection=: (untyped opts) -> void
|
|
847
|
+
# : (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
848
|
+
def sheet_protection=: (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
1156
849
|
|
|
1157
|
-
#
|
|
1158
|
-
# : (**untyped opts) -> void
|
|
1159
|
-
def protect_sheet: (**untyped opts) -> void
|
|
1160
|
-
|
|
1161
|
-
# simplecov:disable
|
|
1162
|
-
# Edge case / untested delegation block
|
|
1163
|
-
# Sets custom metadata property.
|
|
850
|
+
# Returns column configurations defined for this worksheet.
|
|
1164
851
|
#
|
|
1165
|
-
# @
|
|
1166
|
-
# @param value [String, Integer, Float, Boolean, Time] Property value.
|
|
1167
|
-
# @param type [Symbol] Value type.
|
|
1168
|
-
# @return [void]
|
|
852
|
+
# @return [Array<Elements::Column>]
|
|
1169
853
|
# @api public
|
|
1170
|
-
# : (
|
|
1171
|
-
def
|
|
854
|
+
# : () -> Array[Elements::Column]
|
|
855
|
+
def columns: () -> Array[Elements::Column]
|
|
1172
856
|
|
|
1173
857
|
# Inserts an image into the sheet.
|
|
1174
858
|
#
|
|
1175
859
|
# @param file_data [String] Binary image data or file content.
|
|
1176
860
|
# @param ext [String] Image extension ("png", "jpeg", etc.).
|
|
1177
861
|
# @param from_column [Integer, nil] Starting column index (0-based).
|
|
1178
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
1179
862
|
# @param from_row [Integer] Starting row index (0-based).
|
|
1180
863
|
# @param to_column [Integer, nil] Ending column index (0-based).
|
|
1181
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
1182
864
|
# @param to_row [Integer] Ending row index (0-based).
|
|
1183
865
|
# @param opts [Hash] Additional anchor and sizing options.
|
|
1184
866
|
# @return [void]
|
|
1185
867
|
# @api public
|
|
1186
|
-
# : (String file_data, ?ext: String, ?from_column: Integer?, ?
|
|
1187
|
-
def image: (String file_data, ?ext: String, ?from_column: Integer?, ?
|
|
868
|
+
# : (String file_data, ?ext: String, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
869
|
+
def image: (String file_data, ?ext: String, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
1188
870
|
|
|
1189
|
-
#
|
|
871
|
+
# Gets the worksheet background image (<picture>).
|
|
1190
872
|
#
|
|
1191
|
-
# @
|
|
1192
|
-
# sheet.background_image(png_bytes, ext: "png")
|
|
1193
|
-
#
|
|
1194
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#background_image=} instead.
|
|
1195
|
-
# @param file_data [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
1196
|
-
# @param ext [String, nil] Image extension.
|
|
1197
|
-
# @param opts [Hash] Additional options.
|
|
1198
|
-
# @return [Hash, nil]
|
|
873
|
+
# @return [Elements::BackgroundImage, nil]
|
|
1199
874
|
# @api public
|
|
1200
|
-
# : (
|
|
1201
|
-
def background_image: (
|
|
1202
|
-
|
|
1203
|
-
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
1204
|
-
alias background_picture background_image
|
|
1205
|
-
|
|
1206
|
-
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
1207
|
-
alias picture background_image
|
|
875
|
+
# : () -> Elements::BackgroundImage?
|
|
876
|
+
def background_image: () -> Elements::BackgroundImage?
|
|
1208
877
|
|
|
878
|
+
# Sets the worksheet background image (<picture>).
|
|
879
|
+
#
|
|
880
|
+
# @param val [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
881
|
+
# @return [untyped]
|
|
882
|
+
# @api public
|
|
1209
883
|
# : (untyped val) -> untyped
|
|
1210
884
|
def background_image=: (untyped val) -> untyped
|
|
1211
885
|
|
|
1212
|
-
#
|
|
1213
|
-
alias background_picture= background_image=
|
|
1214
|
-
|
|
1215
|
-
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
1216
|
-
alias picture= background_image=
|
|
1217
|
-
|
|
1218
|
-
# Configures sheet view settings (zoom scale, grid lines visibility).
|
|
886
|
+
# Configures or gets sheet view settings (zoom scale, grid lines visibility).
|
|
1219
887
|
#
|
|
1220
|
-
# @param name [Symbol, String, Hash, nil] View setting name or hash.
|
|
1221
|
-
# @param value [Object, nil] View setting value.
|
|
1222
888
|
# @param opts [Hash] Additional options.
|
|
1223
|
-
# @return [void]
|
|
889
|
+
# @return [Elements::SheetView, void]
|
|
1224
890
|
# @api public
|
|
1225
|
-
# : (
|
|
1226
|
-
|
|
891
|
+
# : () -> Elements::SheetView
|
|
892
|
+
# : (**untyped opts) -> void
|
|
893
|
+
def sheet_view: () -> Elements::SheetView
|
|
894
|
+
| (**untyped opts) -> void
|
|
1227
895
|
|
|
1228
896
|
# Replaces sheet view properties.
|
|
1229
897
|
# @param opts [Hash, Elements::SheetView]
|
|
@@ -1232,15 +900,15 @@ module Xlsxrb
|
|
|
1232
900
|
# : (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
1233
901
|
def sheet_view=: (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
1234
902
|
|
|
1235
|
-
# Configures sheet format properties (e.g. default_row_height,
|
|
903
|
+
# Configures or gets sheet format properties (e.g. default_row_height, default_column_width).
|
|
1236
904
|
#
|
|
1237
|
-
# @param name [Symbol, String, Hash, nil] Property name or hash of properties.
|
|
1238
|
-
# @param value [Object, nil] Property value when name is provided.
|
|
1239
905
|
# @param opts [Hash] Keyword arguments for sheet format properties.
|
|
1240
|
-
# @return [
|
|
906
|
+
# @return [Elements::SheetFormat, void]
|
|
1241
907
|
# @api public
|
|
1242
|
-
# : (
|
|
1243
|
-
|
|
908
|
+
# : () -> Elements::SheetFormat
|
|
909
|
+
# : (**untyped opts) -> void
|
|
910
|
+
def sheet_format: () -> Elements::SheetFormat
|
|
911
|
+
| (**untyped opts) -> void
|
|
1244
912
|
|
|
1245
913
|
# Replaces sheet format properties.
|
|
1246
914
|
# @param opts [Hash, Elements::SheetFormat]
|
|
@@ -1259,10 +927,6 @@ module Xlsxrb
|
|
|
1259
927
|
# : (Integer row_index) -> void
|
|
1260
928
|
def row_break: (Integer row_index) -> void
|
|
1261
929
|
|
|
1262
|
-
# @deprecated Use {#row_break} instead.
|
|
1263
|
-
# : (Integer row_num) -> void
|
|
1264
|
-
def page_break_row: (Integer row_num) -> void
|
|
1265
|
-
|
|
1266
930
|
# simplecov:disable
|
|
1267
931
|
# Edge case / untested delegation block
|
|
1268
932
|
# Adds a vertical page break after the given column.
|
|
@@ -1273,10 +937,6 @@ module Xlsxrb
|
|
|
1273
937
|
# : (Integer | String | Symbol col) -> void
|
|
1274
938
|
def column_break: (Integer | String | Symbol col) -> void
|
|
1275
939
|
|
|
1276
|
-
# @deprecated Use {#column_break} instead.
|
|
1277
|
-
# : (Integer | String | Symbol col_index) -> void
|
|
1278
|
-
def page_break_col: (Integer | String | Symbol col_index) -> void
|
|
1279
|
-
|
|
1280
940
|
# Adds a protected range to the sheet.
|
|
1281
941
|
#
|
|
1282
942
|
# @param name [String] Name of the protected range.
|
|
@@ -1288,9 +948,6 @@ module Xlsxrb
|
|
|
1288
948
|
# : (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
1289
949
|
def protected_range: (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
1290
950
|
|
|
1291
|
-
# @deprecated Use {#protected_range} instead. Will be removed in 0.2.0.
|
|
1292
|
-
alias add_protected_range protected_range
|
|
1293
|
-
|
|
1294
951
|
# Adds a cell watch to the sheet.
|
|
1295
952
|
#
|
|
1296
953
|
# @param ref [String] Cell reference (e.g. "A1").
|
|
@@ -1299,9 +956,6 @@ module Xlsxrb
|
|
|
1299
956
|
# : (String ref) -> void
|
|
1300
957
|
def cell_watch: (String ref) -> void
|
|
1301
958
|
|
|
1302
|
-
# @deprecated Use {#cell_watch} instead. Will be removed in 0.2.0.
|
|
1303
|
-
alias add_cell_watch cell_watch
|
|
1304
|
-
|
|
1305
959
|
# Adds an ignored error entry to the sheet.
|
|
1306
960
|
#
|
|
1307
961
|
# @param sqref [String] Cell range reference (e.g. "A1" or "A1:B10").
|
|
@@ -1311,30 +965,19 @@ module Xlsxrb
|
|
|
1311
965
|
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1312
966
|
def ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1313
967
|
|
|
1314
|
-
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
1315
|
-
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1316
|
-
def ignore_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1317
|
-
|
|
1318
|
-
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
1319
|
-
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1320
|
-
def add_ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
1321
|
-
|
|
1322
968
|
# Returns the ignored error entries configured for this sheet.
|
|
1323
969
|
#
|
|
1324
|
-
# @return [Array<
|
|
970
|
+
# @return [Array<Elements::IgnoredError>]
|
|
1325
971
|
# @api public
|
|
1326
|
-
# : () -> Array[
|
|
1327
|
-
def ignored_errors: () -> Array[
|
|
972
|
+
# : () -> Array[Elements::IgnoredError]
|
|
973
|
+
def ignored_errors: () -> Array[Elements::IgnoredError]
|
|
1328
974
|
|
|
1329
|
-
# Gets
|
|
975
|
+
# Gets phonetic (furigana) guide properties for the sheet.
|
|
1330
976
|
#
|
|
1331
|
-
# @
|
|
977
|
+
# @return [Elements::PhoneticProperties, nil]
|
|
1332
978
|
# @api public
|
|
1333
|
-
# : (
|
|
1334
|
-
def phonetic_properties: (
|
|
1335
|
-
|
|
1336
|
-
# @deprecated Use {#phonetic_properties} instead. Will be removed in 0.2.0.
|
|
1337
|
-
alias phonetic_pr phonetic_properties
|
|
979
|
+
# : () -> Elements::PhoneticProperties?
|
|
980
|
+
def phonetic_properties: () -> Elements::PhoneticProperties?
|
|
1338
981
|
|
|
1339
982
|
# Sets phonetic (furigana) guide properties for the sheet.
|
|
1340
983
|
#
|
|
@@ -1344,17 +987,12 @@ module Xlsxrb
|
|
|
1344
987
|
# : (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
1345
988
|
def phonetic_properties=: (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
1346
989
|
|
|
1347
|
-
#
|
|
1348
|
-
alias phonetic_pr= phonetic_properties=
|
|
1349
|
-
|
|
1350
|
-
# Sets or gets the internal code name of the worksheet.
|
|
990
|
+
# Gets the internal code name of the worksheet.
|
|
1351
991
|
#
|
|
1352
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#code_name=} instead.
|
|
1353
|
-
# @param val [String, Symbol, nil] The code name.
|
|
1354
992
|
# @return [String, nil]
|
|
1355
993
|
# @api public
|
|
1356
|
-
# : (
|
|
1357
|
-
def code_name: (
|
|
994
|
+
# : () -> String?
|
|
995
|
+
def code_name: () -> String?
|
|
1358
996
|
|
|
1359
997
|
# Sets the internal code name of the worksheet.
|
|
1360
998
|
#
|
|
@@ -1364,19 +1002,8 @@ module Xlsxrb
|
|
|
1364
1002
|
# : (String | Symbol | nil val) -> String?
|
|
1365
1003
|
def code_name=: (String | Symbol | nil val) -> String?
|
|
1366
1004
|
|
|
1367
|
-
#
|
|
1368
|
-
# When enabled, optionally sets fit_to_width and/or fit_to_height on page_setup.
|
|
1005
|
+
# Returns whether page setup fits content to page width/height.
|
|
1369
1006
|
#
|
|
1370
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#fit_to_page=} or {#page_setup} with :fit_to_width/:fit_to_height instead.
|
|
1371
|
-
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
1372
|
-
# @param width [Integer, nil] Pages wide to fit to.
|
|
1373
|
-
# @param height [Integer, nil] Pages tall to fit to.
|
|
1374
|
-
# @return [Boolean, void]
|
|
1375
|
-
# @api public
|
|
1376
|
-
# : (?bool? enabled, ?width: Integer?, ?height: Integer?) -> (bool | void)
|
|
1377
|
-
def fit_to_page: (?untyped enabled, ?width: untyped, ?height: untyped) -> untyped
|
|
1378
|
-
|
|
1379
|
-
# @deprecated Use {#fit_to_page} instead. Will be removed in 0.2.0.
|
|
1380
1007
|
# @return [Boolean]
|
|
1381
1008
|
# @api public
|
|
1382
1009
|
# : () -> bool
|
|
@@ -1387,18 +1014,15 @@ module Xlsxrb
|
|
|
1387
1014
|
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
1388
1015
|
# @return [Boolean]
|
|
1389
1016
|
# @api public
|
|
1390
|
-
# : (bool? enabled) -> bool
|
|
1017
|
+
# : (bool? enabled) -> bool??
|
|
1391
1018
|
def fit_to_page=: (bool? enabled) -> bool?
|
|
1392
1019
|
|
|
1393
|
-
#
|
|
1020
|
+
# Gets worksheet calculation properties (<sheetCalcPr>).
|
|
1394
1021
|
#
|
|
1395
|
-
# @
|
|
1396
|
-
# @param spec [Hash, nil] Calculation properties hash.
|
|
1397
|
-
# @param full_calc_on_load [Boolean, nil] Whether to recalculate when loading.
|
|
1398
|
-
# @return [Hash, nil]
|
|
1022
|
+
# @return [Elements::SheetCalcProperties, nil]
|
|
1399
1023
|
# @api public
|
|
1400
|
-
# : (
|
|
1401
|
-
def sheet_calc_properties: (
|
|
1024
|
+
# : () -> Elements::SheetCalcProperties?
|
|
1025
|
+
def sheet_calc_properties: () -> Elements::SheetCalcProperties?
|
|
1402
1026
|
|
|
1403
1027
|
# Sets worksheet calculation properties (<sheetCalcPr>).
|
|
1404
1028
|
#
|
|
@@ -1408,21 +1032,12 @@ module Xlsxrb
|
|
|
1408
1032
|
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1409
1033
|
def sheet_calc_properties=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1410
1034
|
|
|
1411
|
-
|
|
1412
|
-
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1413
|
-
def sheet_calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1035
|
+
private
|
|
1414
1036
|
|
|
1415
|
-
#
|
|
1416
|
-
#
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
1420
|
-
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1421
|
-
def sheet_calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1422
|
-
|
|
1423
|
-
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
1424
|
-
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1425
|
-
def calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1037
|
+
# The error for writing through a proxy whose sheet is not the current sheet: an
|
|
1038
|
+
# earlier sheet, or a sheet that was never created.
|
|
1039
|
+
# : () -> Error
|
|
1040
|
+
def inactive_sheet_error: () -> Error
|
|
1426
1041
|
end
|
|
1427
1042
|
|
|
1428
1043
|
# Returns the list of worksheet names created in this workbook so far.
|
|
@@ -1436,19 +1051,23 @@ module Xlsxrb
|
|
|
1436
1051
|
#
|
|
1437
1052
|
# @param name [String, nil] Sheet name (max 31 characters).
|
|
1438
1053
|
# @param state [Symbol, String, nil] Sheet visibility state (:visible, :hidden, :very_hidden).
|
|
1439
|
-
# @param tab_color [String, Hash, nil] Tab color hex string or
|
|
1440
|
-
# @param code_name [String, nil] VBA code name.
|
|
1441
|
-
# @param hidden [Boolean, nil] Deprecated alias for state: :hidden.
|
|
1054
|
+
# @param tab_color [String, Hash, Symbol, nil] Tab color hex string (e.g. "FF0000") or hash options.
|
|
1055
|
+
# @param code_name [String, Symbol, nil] Internal VBA code name of the sheet.
|
|
1442
1056
|
# @param opts [Hash] Sheet-level configuration.
|
|
1443
1057
|
# @yield [sheet_proxy]
|
|
1444
1058
|
# @yieldparam sheet_proxy [WorksheetProxy] The streaming sheet proxy.
|
|
1445
1059
|
# @return [String] The sheet name.
|
|
1446
1060
|
# @api public
|
|
1447
|
-
# : (?String? name, ?state:
|
|
1448
|
-
def sheet: (?String? name, ?state:
|
|
1061
|
+
# : (?String? name, ?state: Symbol | String | nil, ?tab_color: String | Hash[Symbol, untyped] | Symbol | nil, ?code_name: String | Symbol | nil, **untyped opts) ?{ (WorksheetProxy) -> void } -> String
|
|
1062
|
+
def sheet: (?String? name, ?state: Symbol | String | nil, ?tab_color: String | Hash[Symbol, untyped] | Symbol | nil, ?code_name: String | Symbol | nil, **untyped opts) ?{ (WorksheetProxy) -> void } -> String
|
|
1063
|
+
|
|
1064
|
+
UNKNOWN_SHEET_MESSAGE: ::String
|
|
1449
1065
|
|
|
1450
1066
|
# Returns a WorksheetProxy for the current or named sheet.
|
|
1451
1067
|
#
|
|
1068
|
+
# Looking up a sheet that does not exist is deprecated and warns; in version 0.3.0 it
|
|
1069
|
+
# will raise ArgumentError.
|
|
1070
|
+
#
|
|
1452
1071
|
# @param name_or_index [String, Symbol, Integer, nil] Sheet name or 0-based sheet index.
|
|
1453
1072
|
# @yield [proxy]
|
|
1454
1073
|
# @yieldparam proxy [WorksheetProxy]
|
|
@@ -1476,15 +1095,10 @@ module Xlsxrb
|
|
|
1476
1095
|
# @param custom_height [Boolean] Whether custom row height is set.
|
|
1477
1096
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
1478
1097
|
# @param collapsed [Boolean] Whether the row is collapsed.
|
|
1479
|
-
# @param styles [String, Symbol, Array, Hash, nil] Deprecated. Use cell_styles: instead.
|
|
1480
|
-
# @param style [Integer, Symbol, String, Hash, nil] Deprecated. Use row_style: instead.
|
|
1481
1098
|
# @return [void]
|
|
1482
1099
|
# @api public
|
|
1483
|
-
# : (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?
|
|
1484
|
-
def row: (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?
|
|
1485
|
-
|
|
1486
|
-
# @deprecated Use {#row} instead. Will be removed in 0.2.0.
|
|
1487
|
-
alias add_row row
|
|
1100
|
+
# : (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
1101
|
+
def row: (Array[untyped] | Hash[untyped, untyped] values, ?cell_styles: untyped, ?row_style: untyped, ?height: Float | Integer | nil, ?hidden: bool, ?custom_height: bool, ?collapsed: bool, ?outline_level: Integer | nil) -> void
|
|
1488
1102
|
|
|
1489
1103
|
# Appends a row to the worksheet and returns self for chaining.
|
|
1490
1104
|
#
|
|
@@ -1499,9 +1113,6 @@ module Xlsxrb
|
|
|
1499
1113
|
|
|
1500
1114
|
# Advances the row cursor by count without writing empty row elements.
|
|
1501
1115
|
#
|
|
1502
|
-
# @example Skip one row
|
|
1503
|
-
# w.skip_row
|
|
1504
|
-
#
|
|
1505
1116
|
# @example Skip multiple rows
|
|
1506
1117
|
# w.skip_rows(3)
|
|
1507
1118
|
#
|
|
@@ -1511,9 +1122,6 @@ module Xlsxrb
|
|
|
1511
1122
|
# : (?Integer count) -> void
|
|
1512
1123
|
def skip_rows: (?Integer count) -> void
|
|
1513
1124
|
|
|
1514
|
-
# @deprecated Use {#skip_rows} instead. Will be removed in 0.2.0.
|
|
1515
|
-
alias skip_row skip_rows
|
|
1516
|
-
|
|
1517
1125
|
# Sets column formatting and properties for one or multiple columns.
|
|
1518
1126
|
#
|
|
1519
1127
|
# @param index [Integer, String, Symbol, Range, Array] Column index (0-based), letter ("A", :A), range, or array.
|
|
@@ -1529,7 +1137,7 @@ module Xlsxrb
|
|
|
1529
1137
|
# : (Integer | String | Symbol | Range[Integer | String | Symbol] | Array[Integer | String | Symbol] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?, ?best_fit: bool) -> void
|
|
1530
1138
|
def column: (Integer | String | Symbol | Range[Integer | String | Symbol] | Array[Integer | String | Symbol] index, ?width: Float | Integer | nil, ?hidden: bool, ?custom_width: bool, ?outline_level: Integer | nil, ?collapsed: bool, ?style: (Integer | Symbol | String | Hash[Symbol, untyped])?, ?best_fit: bool) -> void
|
|
1531
1139
|
|
|
1532
|
-
# Returns column configurations defined for the
|
|
1140
|
+
# Returns column configurations defined for the active worksheet.
|
|
1533
1141
|
#
|
|
1534
1142
|
# @return [Array<Elements::Column>]
|
|
1535
1143
|
# @api public
|
|
@@ -1555,15 +1163,6 @@ module Xlsxrb
|
|
|
1555
1163
|
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
1556
1164
|
def group_columns: (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
1557
1165
|
|
|
1558
|
-
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
1559
|
-
alias group_column group_columns
|
|
1560
|
-
|
|
1561
|
-
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
1562
|
-
alias group_cols group_columns
|
|
1563
|
-
|
|
1564
|
-
# @deprecated Use {#group_columns} instead. Will be removed in 0.2.0.
|
|
1565
|
-
alias group_col group_columns
|
|
1566
|
-
|
|
1567
1166
|
# Groups multiple rows with outline hierarchy with a block.
|
|
1568
1167
|
#
|
|
1569
1168
|
# @example Group rows with a block
|
|
@@ -1582,10 +1181,10 @@ module Xlsxrb
|
|
|
1582
1181
|
# : (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
1583
1182
|
def group_rows: (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
1584
1183
|
|
|
1585
|
-
#
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
#
|
|
1184
|
+
# Configures or queries worksheet-level outline and grouping view properties.
|
|
1185
|
+
#
|
|
1186
|
+
# When called with no arguments, returns the outline properties Hash.
|
|
1187
|
+
# When called with arguments, updates outline properties and returns nil.
|
|
1589
1188
|
#
|
|
1590
1189
|
# @example Show summary row below detail rows
|
|
1591
1190
|
# sheet.outline_properties(summary_below: true, summary_right: true)
|
|
@@ -1593,16 +1192,14 @@ module Xlsxrb
|
|
|
1593
1192
|
# @param summary_below [Boolean, nil] Flag indicating if summary rows appear below detail rows.
|
|
1594
1193
|
# @param summary_right [Boolean, nil] Flag indicating if summary columns appear to the right of detail columns.
|
|
1595
1194
|
# @param show_outline_symbols [Boolean, nil] Flag indicating whether outline symbols are visible.
|
|
1596
|
-
# @param show_symbols [Boolean, nil] Deprecated alias for show_outline_symbols.
|
|
1597
1195
|
# @param apply_styles [Boolean, nil] Flag indicating whether automatic styles apply to outlines.
|
|
1598
1196
|
# @param opts [Hash] Additional options.
|
|
1599
1197
|
# @return [Hash<Symbol, untyped>, void]
|
|
1600
1198
|
# @api public
|
|
1601
|
-
# : (
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
alias outline_pr outline_properties
|
|
1199
|
+
# : () -> Hash[Symbol, untyped]
|
|
1200
|
+
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
1201
|
+
def outline_properties: () -> Hash[Symbol, untyped]
|
|
1202
|
+
| (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
1606
1203
|
|
|
1607
1204
|
# Sets worksheet outline and grouping view properties.
|
|
1608
1205
|
#
|
|
@@ -1612,8 +1209,6 @@ module Xlsxrb
|
|
|
1612
1209
|
# : (Hash[Symbol, untyped] opts) -> void
|
|
1613
1210
|
def outline_properties=: (Hash[Symbol, untyped] opts) -> void
|
|
1614
1211
|
|
|
1615
|
-
alias outline_pr= outline_properties=
|
|
1616
|
-
|
|
1617
1212
|
# Adds a chart to the current worksheet.
|
|
1618
1213
|
#
|
|
1619
1214
|
# @param type [Symbol, String, nil] Optional chart type (e.g. :bar, :line).
|
|
@@ -1637,13 +1232,12 @@ module Xlsxrb
|
|
|
1637
1232
|
# : (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
1638
1233
|
def hyperlink: (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
1639
1234
|
|
|
1640
|
-
#
|
|
1235
|
+
# Returns the auto-filter range on the active sheet, or nil if none.
|
|
1641
1236
|
#
|
|
1642
|
-
# @
|
|
1643
|
-
# @return [void]
|
|
1237
|
+
# @return [String, nil]
|
|
1644
1238
|
# @api public
|
|
1645
|
-
# : (
|
|
1646
|
-
def auto_filter: (
|
|
1239
|
+
# : () -> String?
|
|
1240
|
+
def auto_filter: () -> String?
|
|
1647
1241
|
|
|
1648
1242
|
# Sets the auto-filter range for the current worksheet.
|
|
1649
1243
|
#
|
|
@@ -1665,26 +1259,33 @@ module Xlsxrb
|
|
|
1665
1259
|
# @param filter [Hash] Filter definition.
|
|
1666
1260
|
# @return [void]
|
|
1667
1261
|
# @api public
|
|
1668
|
-
# : (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
1669
|
-
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] filter) -> void
|
|
1262
|
+
# : (Integer | String | Symbol col_id, (Hash[untyped, untyped] | Array[untyped]) filter) -> void
|
|
1263
|
+
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] | Array[untyped] filter) -> void
|
|
1670
1264
|
|
|
1671
|
-
# Configures column sort state on the active sheet.
|
|
1265
|
+
# Configures or queries column sort state on the active sheet.
|
|
1266
|
+
#
|
|
1267
|
+
# When called with no arguments, returns the {Elements::SortState} value object.
|
|
1268
|
+
# When called with arguments, updates sort state and returns nil.
|
|
1672
1269
|
#
|
|
1673
|
-
# @param ref [String] The sorted range.
|
|
1674
|
-
# @param sort_conditions [Array<Hash
|
|
1270
|
+
# @param ref [String, nil] The sorted range.
|
|
1271
|
+
# @param sort_conditions [Array<Hash>, nil] Sort conditions.
|
|
1272
|
+
# @param case_sensitive [Boolean] Whether sorting is case sensitive.
|
|
1273
|
+
# @param sort_method [String, nil] Sort method.
|
|
1675
1274
|
# @param opts [Hash] Additional options.
|
|
1676
|
-
# @return [Elements::SortState,
|
|
1275
|
+
# @return [Elements::SortState, nil, void]
|
|
1677
1276
|
# @api public
|
|
1678
|
-
# : (
|
|
1679
|
-
|
|
1277
|
+
# : () -> Elements::SortState?
|
|
1278
|
+
# : (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, ?case_sensitive: bool, ?sort_method: String?, **untyped opts) -> void
|
|
1279
|
+
def sort_state: () -> Elements::SortState?
|
|
1280
|
+
| (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, ?case_sensitive: bool, ?sort_method: String?, **untyped opts) -> void
|
|
1680
1281
|
|
|
1681
|
-
# Sets column sort state
|
|
1282
|
+
# Sets column sort state on the active sheet.
|
|
1682
1283
|
#
|
|
1683
1284
|
# @param opts [Elements::SortState, Hash, nil] Sort state options.
|
|
1684
1285
|
# @return [void]
|
|
1685
1286
|
# @api public
|
|
1686
|
-
# : (untyped opts) -> void
|
|
1687
|
-
def sort_state=: (untyped opts) -> void
|
|
1287
|
+
# : (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
1288
|
+
def sort_state=: (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
1688
1289
|
|
|
1689
1290
|
# Adds a data validation rule.
|
|
1690
1291
|
#
|
|
@@ -1696,10 +1297,6 @@ module Xlsxrb
|
|
|
1696
1297
|
# : (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1697
1298
|
def data_validation: (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1698
1299
|
|
|
1699
|
-
# @deprecated Use {#data_validation} instead.
|
|
1700
|
-
# : (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1701
|
-
def validate_data: (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1702
|
-
|
|
1703
1300
|
# Adds a conditional formatting rule.
|
|
1704
1301
|
# Supports block configuration via {ConditionalFormatBuilder} and coordinate targeting (:columns, :rows).
|
|
1705
1302
|
#
|
|
@@ -1732,35 +1329,34 @@ module Xlsxrb
|
|
|
1732
1329
|
# @param source_ref [String] Source data range.
|
|
1733
1330
|
# @param row_fields [Array<Integer>] 0-based field indices for rows.
|
|
1734
1331
|
# @param data_fields [Array<Hash>] Data fields.
|
|
1735
|
-
# @param column_fields [Array<Integer
|
|
1736
|
-
# @param
|
|
1737
|
-
# @param ref [String] Top-left destination cell (default: "E1").
|
|
1738
|
-
# @param dest_ref [String] Deprecated alias for ref.
|
|
1332
|
+
# @param column_fields [Array<Integer>, nil] 0-based field indices for columns.
|
|
1333
|
+
# @param ref [String, nil] Top-left destination cell (default: "E1").
|
|
1739
1334
|
# @param name [String, nil] Pivot table name.
|
|
1740
1335
|
# @param field_names [Array<String>, nil] Override field names.
|
|
1741
|
-
# @param items [Array, nil] Items
|
|
1336
|
+
# @param items [Hash{Integer => Array}, nil] Items of each field, by 0-based field index.
|
|
1742
1337
|
# @param opts [Hash] Additional options.
|
|
1743
1338
|
# @return [void]
|
|
1744
1339
|
# @api public
|
|
1745
|
-
# : (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?
|
|
1746
|
-
def pivot_table: (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?
|
|
1340
|
+
# : (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1341
|
+
def pivot_table: (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1747
1342
|
|
|
1748
1343
|
# Adds a comment to a cell.
|
|
1749
1344
|
#
|
|
1750
1345
|
# @param cell [String, Integer] Cell coordinate (e.g. "A1").
|
|
1751
1346
|
# @param text [String] Comment text.
|
|
1752
1347
|
# @param author [String] Author name.
|
|
1348
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover.
|
|
1753
1349
|
# @return [void]
|
|
1754
1350
|
# @api public
|
|
1755
|
-
# : (String | Integer cell, String text, ?author: ::String) -> void
|
|
1756
|
-
def comment: (String | Integer cell, String text, ?author: ::String) -> void
|
|
1351
|
+
# : (String | Integer cell, String text, ?author: ::String, ?visible: bool) -> void
|
|
1352
|
+
def comment: (String | Integer cell, String text, ?author: ::String, ?visible: bool) -> void
|
|
1757
1353
|
|
|
1758
1354
|
# Adds a threaded comment to a cell.
|
|
1759
1355
|
#
|
|
1760
1356
|
# @param cell [String, Integer] Cell coordinate (e.g. "A1").
|
|
1761
1357
|
# @param text [String] Comment text.
|
|
1762
1358
|
# @param author [String] Author name.
|
|
1763
|
-
# @param timestamp [String, Time, nil] Optional ISO 8601 timestamp.
|
|
1359
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover. # @param timestamp [String, Time, nil] Optional ISO 8601 timestamp.
|
|
1764
1360
|
# @param id [String, nil] Optional GUID for this comment.
|
|
1765
1361
|
# @param parent_id [String, nil] Optional parent comment GUID for replies.
|
|
1766
1362
|
# @param done [Boolean, nil] Optional resolved flag.
|
|
@@ -1771,9 +1367,6 @@ module Xlsxrb
|
|
|
1771
1367
|
# : (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
1772
1368
|
def threaded_comment: (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
1773
1369
|
|
|
1774
|
-
# @deprecated Use {#threaded_comment} instead. Will be removed in 0.2.0.
|
|
1775
|
-
alias add_threaded_comment threaded_comment
|
|
1776
|
-
|
|
1777
1370
|
# Adds a sparkline group.
|
|
1778
1371
|
#
|
|
1779
1372
|
# @param sparklines [Array<Hash>] Sparkline definitions.
|
|
@@ -1784,107 +1377,92 @@ module Xlsxrb
|
|
|
1784
1377
|
# : (sparklines: untyped, ?type: untyped, **untyped opts) -> void
|
|
1785
1378
|
def sparkline_group: (sparklines: untyped, ?type: untyped, **untyped opts) -> void
|
|
1786
1379
|
|
|
1787
|
-
# Adds a single sparkline to the sheet.
|
|
1788
|
-
#
|
|
1789
|
-
# @example Add a line sparkline
|
|
1790
|
-
# writer.add_sparkline(location: "F1", range: "A1:E1")
|
|
1791
|
-
#
|
|
1792
|
-
# @example Add a column sparkline with high/low markers
|
|
1793
|
-
# writer.add_sparkline(location: "F2", range: "A2:E2", type: :column, high: true, low: true)
|
|
1794
|
-
#
|
|
1795
|
-
# @example Add a win/loss sparkline
|
|
1796
|
-
# writer.add_sparkline(location: "F3", range: "A3:E3", type: :win_loss)
|
|
1797
|
-
#
|
|
1798
|
-
# @param location [String, nil] Target cell for the sparkline (e.g. "F1").
|
|
1799
|
-
# @param range [String, nil] Data range for the sparkline (e.g. "A1:E1").
|
|
1800
|
-
# @param type [Symbol, String, nil] Sparkline type (:line, :column, :win_loss / :stacked).
|
|
1801
|
-
# @param opts [Hash] Additional sparkline options.
|
|
1802
|
-
# @deprecated Use {#sparkline_group} instead. Will be removed in 0.2.0.
|
|
1803
|
-
# @return [void]
|
|
1804
|
-
# @api public
|
|
1805
|
-
# : (?location: String?, ?range: String?, ?type: (String | Symbol)?, **untyped opts) -> void
|
|
1806
|
-
def add_sparkline: (?location: String?, ?range: String?, ?type: (String | Symbol)?, **untyped opts) -> void
|
|
1807
|
-
|
|
1808
1380
|
# Merges a range of cells into a single cell.
|
|
1809
1381
|
#
|
|
1810
1382
|
# @example
|
|
1811
1383
|
# sheet.merge("A1:C1")
|
|
1812
1384
|
#
|
|
1813
|
-
# @
|
|
1814
|
-
# @param range [String, Hash, nil] Cell range (e.g. "A1:B2") or hash of coordinates.
|
|
1815
|
-
# @param row [Integer, nil] Single row index.
|
|
1816
|
-
# @param col_start [Integer, String, nil] Starting column.
|
|
1817
|
-
# @param col_end [Integer, String, nil] Ending column.
|
|
1818
|
-
# @param row_start [Integer, nil] Starting row index.
|
|
1819
|
-
# @param row_end [Integer, nil] Ending row index.
|
|
1385
|
+
# @param range [String] Cell range (e.g. "A1:B2").
|
|
1820
1386
|
# @return [void]
|
|
1821
1387
|
# @api public
|
|
1822
|
-
# : (
|
|
1823
|
-
def merge: (
|
|
1388
|
+
# : (String range) -> void
|
|
1389
|
+
def merge: (String range) -> void
|
|
1824
1390
|
|
|
1825
|
-
#
|
|
1391
|
+
# Configures or queries freeze panes (<pane state="frozen">).
|
|
1392
|
+
#
|
|
1393
|
+
# When called with no arguments, returns the {Elements::FreezePane} value object or nil.
|
|
1394
|
+
# When called with arguments, configures the freeze pane and returns nil.
|
|
1826
1395
|
#
|
|
1827
1396
|
# @param row [Integer, nil] Number of rows to freeze.
|
|
1828
1397
|
# @param column [Integer, String, nil] Number of columns to freeze.
|
|
1829
|
-
# @param
|
|
1830
|
-
# @
|
|
1398
|
+
# @param top_left_cell [String, nil] Top-left cell reference in bottom-right pane.
|
|
1399
|
+
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
1400
|
+
# @return [Elements::FreezePane, nil, void]
|
|
1831
1401
|
# @api public
|
|
1832
|
-
# : (
|
|
1833
|
-
|
|
1402
|
+
# : () -> Elements::FreezePane?
|
|
1403
|
+
# : (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1404
|
+
def freeze_pane: () -> Elements::FreezePane?
|
|
1405
|
+
| (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1834
1406
|
|
|
1835
1407
|
# Sets or clears freeze pane configuration.
|
|
1836
1408
|
#
|
|
1837
1409
|
# @param opts [Elements::FreezePane, Hash, nil] Freeze pane options.
|
|
1838
1410
|
# @return [void]
|
|
1839
1411
|
# @api public
|
|
1840
|
-
# : (untyped opts) -> void
|
|
1841
|
-
def freeze_pane=: (untyped opts) -> void
|
|
1412
|
+
# : (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1413
|
+
def freeze_pane=: (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1842
1414
|
|
|
1843
|
-
# Splits window panes without freezing or queries split pane settings.
|
|
1415
|
+
# Splits window panes without freezing or queries split pane settings (<pane>).
|
|
1416
|
+
#
|
|
1417
|
+
# When called with no arguments, returns the {Elements::SplitPane} value object or nil.
|
|
1418
|
+
# When called with arguments, configures the split pane and returns nil.
|
|
1844
1419
|
#
|
|
1845
1420
|
# @param x_split [Integer, nil] Horizontal split in points.
|
|
1846
1421
|
# @param y_split [Integer, nil] Vertical split in points.
|
|
1847
1422
|
# @param top_left_cell [String, nil] Top-left cell reference in bottom-right pane.
|
|
1848
1423
|
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
1849
1424
|
# @param state [String, Symbol, nil] Split state.
|
|
1850
|
-
# @return [Elements::SplitPane,
|
|
1425
|
+
# @return [Elements::SplitPane, nil, void]
|
|
1851
1426
|
# @api public
|
|
1852
|
-
# : (
|
|
1853
|
-
|
|
1427
|
+
# : () -> Elements::SplitPane?
|
|
1428
|
+
# : (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1429
|
+
def split_pane: () -> Elements::SplitPane?
|
|
1430
|
+
| (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1854
1431
|
|
|
1855
1432
|
# Sets or clears split pane configuration.
|
|
1856
1433
|
#
|
|
1857
1434
|
# @param opts [Elements::SplitPane, Hash, nil] Split pane options.
|
|
1858
1435
|
# @return [void]
|
|
1859
1436
|
# @api public
|
|
1860
|
-
# : (untyped opts) -> void
|
|
1861
|
-
def split_pane=: (untyped opts) -> void
|
|
1437
|
+
# : (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1438
|
+
def split_pane=: (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1862
1439
|
|
|
1863
|
-
# Sets or queries the active cell selection on the current sheet.
|
|
1440
|
+
# Sets or queries the active cell selection on the current sheet (<selection>).
|
|
1441
|
+
#
|
|
1442
|
+
# When called with no arguments, returns the selection ({Elements::Selection}, Array, or nil).
|
|
1443
|
+
# When called with arguments, updates the selection and returns nil.
|
|
1864
1444
|
#
|
|
1865
1445
|
# @param active_cell [String, nil] Active cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
1866
1446
|
# @param sqref [String, nil] Selection range.
|
|
1867
1447
|
# @param pane [String, Symbol, nil] Target pane.
|
|
1868
|
-
# @return [Elements::Selection, Array<Elements::Selection>,
|
|
1448
|
+
# @return [Elements::Selection, Array<Elements::Selection>, nil, void]
|
|
1869
1449
|
# @api public
|
|
1870
|
-
# : (
|
|
1871
|
-
|
|
1450
|
+
# : () -> (Elements::Selection | Array[Elements::Selection])?
|
|
1451
|
+
# : (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1452
|
+
def selection: () -> (Elements::Selection | Array[Elements::Selection])?
|
|
1453
|
+
| (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1872
1454
|
|
|
1873
1455
|
# Sets or clears the selection configuration.
|
|
1874
1456
|
#
|
|
1875
1457
|
# @param opts [Elements::Selection, Array<Elements::Selection, Hash>, Hash, nil]
|
|
1876
1458
|
# @return [void]
|
|
1877
1459
|
# @api public
|
|
1878
|
-
# : (untyped opts) -> void
|
|
1879
|
-
def selection=: (untyped opts) -> void
|
|
1460
|
+
# : (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
1461
|
+
def selection=: (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
1880
1462
|
|
|
1881
|
-
#
|
|
1882
|
-
# : (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1883
|
-
def select_cell: (String active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1884
|
-
|
|
1885
|
-
# Configures page margins for printing (<pageMargins>).
|
|
1463
|
+
# Configures or queries page margins in inches for printing (<pageMargins>).
|
|
1886
1464
|
#
|
|
1887
|
-
# When called with no arguments, returns the
|
|
1465
|
+
# When called with no arguments, returns the {Elements::PageMargins} value object or nil.
|
|
1888
1466
|
# When called with arguments, configures page margins and returns nil.
|
|
1889
1467
|
#
|
|
1890
1468
|
# @param left [Float, nil] Left margin.
|
|
@@ -1893,69 +1471,75 @@ module Xlsxrb
|
|
|
1893
1471
|
# @param bottom [Float, nil] Bottom margin.
|
|
1894
1472
|
# @param header [Float, nil] Header margin.
|
|
1895
1473
|
# @param footer [Float, nil] Footer margin.
|
|
1896
|
-
# @return [Elements::PageMargins,
|
|
1474
|
+
# @return [Elements::PageMargins, nil, void]
|
|
1897
1475
|
# @api public
|
|
1898
|
-
# : (
|
|
1899
|
-
|
|
1476
|
+
# : () -> Elements::PageMargins?
|
|
1477
|
+
# : (?left: Float?, ?right: Float?, ?top: Float?, ?bottom: Float?, ?header: Float?, ?footer: Float?) -> void
|
|
1478
|
+
def page_margins: () -> Elements::PageMargins?
|
|
1479
|
+
| (?left: Float?, ?right: Float?, ?top: Float?, ?bottom: Float?, ?header: Float?, ?footer: Float?) -> void
|
|
1900
1480
|
|
|
1901
1481
|
# Sets or clears page margins configuration.
|
|
1902
1482
|
#
|
|
1903
1483
|
# @param opts [Hash, Elements::PageMargins, nil]
|
|
1904
1484
|
# @return [void]
|
|
1905
1485
|
# @api public
|
|
1906
|
-
# : (untyped opts) -> void
|
|
1907
|
-
def page_margins=: (untyped opts) -> void
|
|
1486
|
+
# : (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
1487
|
+
def page_margins=: (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
1908
1488
|
|
|
1909
1489
|
# Configures or queries page setup configuration (<pageSetup>).
|
|
1910
1490
|
#
|
|
1911
|
-
# When called with no arguments, returns the
|
|
1491
|
+
# When called with no arguments, returns the {Elements::PageSetup} value object.
|
|
1912
1492
|
# When called with keyword arguments, updates page setup and returns nil.
|
|
1913
1493
|
#
|
|
1914
1494
|
# @param opts [Hash] Page setup options (e.g. orientation: :landscape).
|
|
1915
|
-
# @return [Elements::PageSetup,
|
|
1495
|
+
# @return [Elements::PageSetup, void]
|
|
1916
1496
|
# @api public
|
|
1917
|
-
# : (
|
|
1918
|
-
|
|
1497
|
+
# : () -> Elements::PageSetup
|
|
1498
|
+
# : (**untyped opts) -> void
|
|
1499
|
+
def page_setup: () -> Elements::PageSetup
|
|
1500
|
+
| (**untyped opts) -> void
|
|
1919
1501
|
|
|
1920
1502
|
# Sets page setup configuration.
|
|
1921
1503
|
#
|
|
1922
1504
|
# @param opts [Hash, Elements::PageSetup]
|
|
1923
1505
|
# @return [void]
|
|
1924
1506
|
# @api public
|
|
1925
|
-
# : (untyped opts) -> void
|
|
1926
|
-
def page_setup=: (untyped opts) -> void
|
|
1507
|
+
# : (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
1508
|
+
def page_setup=: (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
1927
1509
|
|
|
1928
1510
|
# Configures or queries headers and footers for printing (<headerFooter>).
|
|
1929
1511
|
#
|
|
1930
|
-
# When called with no arguments, returns the
|
|
1512
|
+
# When called with no arguments, returns the {Elements::HeaderFooter} value object.
|
|
1931
1513
|
# When called with keyword arguments, updates headers and footers and returns nil.
|
|
1932
1514
|
#
|
|
1933
1515
|
# @param opts [Hash] Header/footer options.
|
|
1934
|
-
# @return [Elements::HeaderFooter,
|
|
1516
|
+
# @return [Elements::HeaderFooter, void]
|
|
1935
1517
|
# @api public
|
|
1936
|
-
# : (
|
|
1937
|
-
|
|
1518
|
+
# : () -> Elements::HeaderFooter
|
|
1519
|
+
# : (**untyped opts) -> void
|
|
1520
|
+
def header_footer: () -> Elements::HeaderFooter
|
|
1521
|
+
| (**untyped opts) -> void
|
|
1938
1522
|
|
|
1939
1523
|
# Sets header and footer configuration.
|
|
1940
1524
|
#
|
|
1941
1525
|
# @param opts [Hash, Elements::HeaderFooter]
|
|
1942
1526
|
# @return [void]
|
|
1943
1527
|
# @api public
|
|
1944
|
-
# : (untyped opts) -> void
|
|
1945
|
-
def header_footer=: (untyped opts) -> void
|
|
1528
|
+
# : (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
1529
|
+
def header_footer=: (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
1946
1530
|
|
|
1947
1531
|
# Configures or queries print options (<printOptions>).
|
|
1948
1532
|
#
|
|
1949
1533
|
# When called with no arguments, returns the {Elements::PrintOptions} value object.
|
|
1950
|
-
# When called with
|
|
1534
|
+
# When called with keyword options, configures print options and returns nil.
|
|
1951
1535
|
#
|
|
1952
|
-
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Option name or hash/record of options.
|
|
1953
|
-
# @param value [Object, nil] Option value.
|
|
1954
1536
|
# @param opts [Hash] Additional print options.
|
|
1955
1537
|
# @return [Elements::PrintOptions, void]
|
|
1956
1538
|
# @api public
|
|
1957
|
-
# : (
|
|
1958
|
-
|
|
1539
|
+
# : () -> Elements::PrintOptions
|
|
1540
|
+
# : (**untyped opts) -> void
|
|
1541
|
+
def print_options: () -> Elements::PrintOptions
|
|
1542
|
+
| (**untyped opts) -> void
|
|
1959
1543
|
|
|
1960
1544
|
# Replaces print options with the given hash or {Elements::PrintOptions} object.
|
|
1961
1545
|
#
|
|
@@ -1965,86 +1549,63 @@ module Xlsxrb
|
|
|
1965
1549
|
# : (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1966
1550
|
def print_options=: (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1967
1551
|
|
|
1968
|
-
#
|
|
1552
|
+
# Sets or queries sheet-level protection with optional password hashing (<sheetProtection>).
|
|
1969
1553
|
#
|
|
1970
|
-
# When called with no arguments, returns the
|
|
1554
|
+
# When called with no arguments, returns the {Elements::SheetProtection} value object or nil.
|
|
1971
1555
|
# When called with keyword arguments, sets sheet protection and returns nil.
|
|
1972
1556
|
#
|
|
1973
1557
|
# @param opts [Hash] Protection options.
|
|
1974
|
-
# @return [Elements::SheetProtection,
|
|
1558
|
+
# @return [Elements::SheetProtection, nil, void]
|
|
1975
1559
|
# @api public
|
|
1976
|
-
# : (
|
|
1977
|
-
|
|
1560
|
+
# : () -> Elements::SheetProtection?
|
|
1561
|
+
# : (**untyped opts) -> void
|
|
1562
|
+
def sheet_protection: () -> Elements::SheetProtection?
|
|
1563
|
+
| (**untyped opts) -> void
|
|
1978
1564
|
|
|
1979
1565
|
# Sets or clears sheet protection configuration.
|
|
1980
1566
|
#
|
|
1981
1567
|
# @param opts [Elements::SheetProtection, Hash, Boolean, nil]
|
|
1982
1568
|
# @return [void]
|
|
1983
1569
|
# @api public
|
|
1984
|
-
# : (untyped opts) -> void
|
|
1985
|
-
def sheet_protection=: (untyped opts) -> void
|
|
1986
|
-
|
|
1987
|
-
# @deprecated Use {#sheet_protection} instead.
|
|
1988
|
-
# : (**untyped opts) -> void
|
|
1989
|
-
def protect_sheet: (**untyped opts) -> void
|
|
1570
|
+
# : (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
1571
|
+
def sheet_protection=: (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
1990
1572
|
|
|
1991
1573
|
# Inserts an embedded image into the active sheet.
|
|
1992
1574
|
#
|
|
1993
1575
|
# @param file_data [String] Binary image data.
|
|
1994
1576
|
# @param ext [String] File extension ("png", "jpeg", etc.).
|
|
1995
1577
|
# @param from_column [Integer, nil] Top-left starting column.
|
|
1996
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
1997
1578
|
# @param from_row [Integer] Top-left starting row.
|
|
1998
1579
|
# @param to_column [Integer, nil] Bottom-right ending column.
|
|
1999
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
2000
1580
|
# @param to_row [Integer] Bottom-right ending row.
|
|
2001
1581
|
# @param opts [Hash] Additional options.
|
|
2002
1582
|
# @return [void]
|
|
2003
1583
|
# @api public
|
|
2004
|
-
# : (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?
|
|
2005
|
-
def image: (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?
|
|
1584
|
+
# : (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?from_row: ::Integer, ?to_column: ::Integer?, ?to_row: ::Integer, **untyped opts) -> void
|
|
1585
|
+
def image: (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?from_row: ::Integer, ?to_column: ::Integer?, ?to_row: ::Integer, **untyped opts) -> void
|
|
2006
1586
|
|
|
2007
|
-
#
|
|
2008
|
-
#
|
|
2009
|
-
# @example Set background image from binary data
|
|
2010
|
-
# sheet.background_image(png_bytes, ext: "png")
|
|
2011
|
-
#
|
|
2012
|
-
# @example Set background image from file path
|
|
2013
|
-
# sheet.background_image("path/to/background.png")
|
|
1587
|
+
# Worksheet background image (<picture>).
|
|
2014
1588
|
#
|
|
2015
|
-
# @
|
|
2016
|
-
# @param file_data [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
2017
|
-
# @param ext [String, nil] Image extension ("png", "jpeg", "jpg", "gif", etc.).
|
|
2018
|
-
# @param opts [Hash] Additional image options.
|
|
2019
|
-
# @return [Hash, nil]
|
|
1589
|
+
# @return [Elements::BackgroundImage, nil]
|
|
2020
1590
|
# @api public
|
|
2021
|
-
# : (
|
|
2022
|
-
def background_image: (
|
|
2023
|
-
|
|
2024
|
-
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
2025
|
-
alias background_picture background_image
|
|
2026
|
-
|
|
2027
|
-
# @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
|
|
2028
|
-
alias picture background_image
|
|
1591
|
+
# : () -> Elements::BackgroundImage?
|
|
1592
|
+
def background_image: () -> Elements::BackgroundImage?
|
|
2029
1593
|
|
|
1594
|
+
# Sets the worksheet background image (<picture>).
|
|
1595
|
+
#
|
|
1596
|
+
# @param val [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
1597
|
+
# @return [untyped]
|
|
1598
|
+
# @api public
|
|
2030
1599
|
# : (untyped val) -> untyped
|
|
2031
1600
|
def background_image=: (untyped val) -> untyped
|
|
2032
1601
|
|
|
2033
|
-
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
2034
|
-
alias background_picture= background_image=
|
|
2035
|
-
|
|
2036
|
-
# @deprecated Use {#background_image=} instead. Will be removed in 0.2.0.
|
|
2037
|
-
alias picture= background_image=
|
|
2038
|
-
|
|
2039
1602
|
# Inserts a drawing shape.
|
|
2040
1603
|
#
|
|
2041
1604
|
# @param preset [String] Preset shape name.
|
|
2042
1605
|
# @param text [String, nil] Label text.
|
|
2043
1606
|
# @param from_column [Integer, nil] Top-left column.
|
|
2044
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
2045
1607
|
# @param from_row [Integer] Top-left row.
|
|
2046
1608
|
# @param to_column [Integer, nil] Bottom-right column.
|
|
2047
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
2048
1609
|
# @param to_row [Integer] Bottom-right row.
|
|
2049
1610
|
# @param opts [Hash] Additional options.
|
|
2050
1611
|
# @return [void]
|
|
@@ -2052,14 +1613,12 @@ module Xlsxrb
|
|
|
2052
1613
|
# : (**untyped opts) -> void
|
|
2053
1614
|
def shape: (**untyped opts) -> void
|
|
2054
1615
|
|
|
2055
|
-
# Gets
|
|
1616
|
+
# Gets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
2056
1617
|
#
|
|
2057
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#state=} instead.
|
|
2058
|
-
# @param new_state [Symbol, nil] The new state.
|
|
2059
1618
|
# @return [Symbol]
|
|
2060
1619
|
# @api public
|
|
2061
|
-
# : (
|
|
2062
|
-
def state: (
|
|
1620
|
+
# : () -> Symbol
|
|
1621
|
+
def state: () -> Symbol
|
|
2063
1622
|
|
|
2064
1623
|
# Sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
2065
1624
|
#
|
|
@@ -2069,15 +1628,12 @@ module Xlsxrb
|
|
|
2069
1628
|
# : (Symbol | String new_state) -> Symbol
|
|
2070
1629
|
def state=: (Symbol | String new_state) -> Symbol
|
|
2071
1630
|
|
|
2072
|
-
# Gets
|
|
1631
|
+
# Gets the tab color of the current worksheet.
|
|
2073
1632
|
#
|
|
2074
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#tab_color=} instead.
|
|
2075
|
-
# @param spec [String, Hash, Symbol, nil] Tab color hex string or hash options.
|
|
2076
|
-
# @param opts [Hash] Color keyword arguments (e.g. theme: 1, tint: 0.5).
|
|
2077
1633
|
# @return [String, Hash, nil]
|
|
2078
1634
|
# @api public
|
|
2079
|
-
# : (
|
|
2080
|
-
def tab_color: (
|
|
1635
|
+
# : () -> (String | Hash[Symbol, untyped] | nil)
|
|
1636
|
+
def tab_color: () -> (String | Hash[Symbol, untyped] | nil)
|
|
2081
1637
|
|
|
2082
1638
|
# Sets the tab color of the current worksheet.
|
|
2083
1639
|
#
|
|
@@ -2087,27 +1643,18 @@ module Xlsxrb
|
|
|
2087
1643
|
# : (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
2088
1644
|
def tab_color=: (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
2089
1645
|
|
|
2090
|
-
# Sets a single sheet property.
|
|
2091
|
-
#
|
|
2092
|
-
# @param name [Symbol, String] Property name.
|
|
2093
|
-
# @param value [Object] Property value.
|
|
2094
|
-
# @return [void]
|
|
2095
|
-
# @api public
|
|
2096
|
-
# : (Symbol | String name, untyped value) -> void
|
|
2097
|
-
def sheet_property: (Symbol | String name, untyped value) -> void
|
|
2098
|
-
|
|
2099
1646
|
# Configures or queries sheet properties (<sheetPr>).
|
|
2100
1647
|
#
|
|
2101
1648
|
# When called with no arguments, returns the {Elements::SheetProperties} value object.
|
|
2102
|
-
# When called with
|
|
1649
|
+
# When called with keyword options, configures properties and returns nil.
|
|
2103
1650
|
#
|
|
2104
|
-
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Property name or hash/record of properties.
|
|
2105
|
-
# @param value [Object, nil] Property value when name is provided.
|
|
2106
1651
|
# @param opts [Hash] Additional sheet properties.
|
|
2107
1652
|
# @return [Elements::SheetProperties, void]
|
|
2108
1653
|
# @api public
|
|
2109
|
-
# : (
|
|
2110
|
-
|
|
1654
|
+
# : () -> Elements::SheetProperties
|
|
1655
|
+
# : (**untyped opts) -> void
|
|
1656
|
+
def sheet_properties: () -> Elements::SheetProperties
|
|
1657
|
+
| (**untyped opts) -> void
|
|
2111
1658
|
|
|
2112
1659
|
# Replaces worksheet properties with the given hash or {Elements::SheetProperties} object.
|
|
2113
1660
|
#
|
|
@@ -2120,15 +1667,15 @@ module Xlsxrb
|
|
|
2120
1667
|
# Configures or queries sheet view display properties (<sheetView>).
|
|
2121
1668
|
#
|
|
2122
1669
|
# When called with no arguments, returns the {Elements::SheetView} value object.
|
|
2123
|
-
# When called with
|
|
1670
|
+
# When called with keyword options, configures view properties and returns nil.
|
|
2124
1671
|
#
|
|
2125
|
-
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] View property name or hash/record of properties.
|
|
2126
|
-
# @param value [Object, nil] View property value when name is provided.
|
|
2127
1672
|
# @param opts [Hash] Additional view properties.
|
|
2128
1673
|
# @return [Elements::SheetView, void]
|
|
2129
1674
|
# @api public
|
|
2130
|
-
# : (
|
|
2131
|
-
|
|
1675
|
+
# : () -> Elements::SheetView
|
|
1676
|
+
# : (**untyped opts) -> void
|
|
1677
|
+
def sheet_view: () -> Elements::SheetView
|
|
1678
|
+
| (**untyped opts) -> void
|
|
2132
1679
|
|
|
2133
1680
|
# Replaces sheet view properties with the given hash or {Elements::SheetView} object.
|
|
2134
1681
|
#
|
|
@@ -2141,15 +1688,15 @@ module Xlsxrb
|
|
|
2141
1688
|
# Configures or queries sheet format properties (<sheetFormatPr>).
|
|
2142
1689
|
#
|
|
2143
1690
|
# When called with no arguments, returns the {Elements::SheetFormat} value object.
|
|
2144
|
-
# When called with
|
|
1691
|
+
# When called with keyword options, configures format properties and returns nil.
|
|
2145
1692
|
#
|
|
2146
|
-
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Property name or hash/record of properties.
|
|
2147
|
-
# @param value [Object, nil] Property value when name is provided.
|
|
2148
1693
|
# @param opts [Hash] Keyword arguments for sheet format properties.
|
|
2149
1694
|
# @return [Elements::SheetFormat, void]
|
|
2150
1695
|
# @api public
|
|
2151
|
-
# : (
|
|
2152
|
-
|
|
1696
|
+
# : () -> Elements::SheetFormat
|
|
1697
|
+
# : (**untyped opts) -> void
|
|
1698
|
+
def sheet_format: () -> Elements::SheetFormat
|
|
1699
|
+
| (**untyped opts) -> void
|
|
2153
1700
|
|
|
2154
1701
|
# Replaces sheet format properties with the given hash or {Elements::SheetFormat} object.
|
|
2155
1702
|
#
|
|
@@ -2167,10 +1714,6 @@ module Xlsxrb
|
|
|
2167
1714
|
# : (Integer row_index) -> void
|
|
2168
1715
|
def row_break: (Integer row_index) -> void
|
|
2169
1716
|
|
|
2170
|
-
# @deprecated Use {#row_break} instead.
|
|
2171
|
-
# : (Integer row_num) -> void
|
|
2172
|
-
def page_break_row: (Integer row_num) -> void
|
|
2173
|
-
|
|
2174
1717
|
# Inserts a vertical page break after the given column.
|
|
2175
1718
|
#
|
|
2176
1719
|
# @param col [Integer, String, Symbol] 0-based column index or letter ("B", :B).
|
|
@@ -2179,10 +1722,6 @@ module Xlsxrb
|
|
|
2179
1722
|
# : (Integer | String | Symbol col) -> void
|
|
2180
1723
|
def column_break: (Integer | String | Symbol col) -> void
|
|
2181
1724
|
|
|
2182
|
-
# @deprecated Use {#column_break} instead.
|
|
2183
|
-
# : (Integer | String | Symbol col_index) -> void
|
|
2184
|
-
def page_break_col: (Integer | String | Symbol col_index) -> void
|
|
2185
|
-
|
|
2186
1725
|
# Adds a protected range to the current sheet.
|
|
2187
1726
|
#
|
|
2188
1727
|
# @param name [String] Name of the protected range.
|
|
@@ -2194,9 +1733,6 @@ module Xlsxrb
|
|
|
2194
1733
|
# : (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
2195
1734
|
def protected_range: (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
2196
1735
|
|
|
2197
|
-
# @deprecated Use {#protected_range} instead. Will be removed in 0.2.0.
|
|
2198
|
-
alias add_protected_range protected_range
|
|
2199
|
-
|
|
2200
1736
|
# Adds a cell watch to the current sheet.
|
|
2201
1737
|
#
|
|
2202
1738
|
# @param ref [String] Cell reference (e.g. "A1").
|
|
@@ -2205,9 +1741,6 @@ module Xlsxrb
|
|
|
2205
1741
|
# : (String ref) -> void
|
|
2206
1742
|
def cell_watch: (String ref) -> void
|
|
2207
1743
|
|
|
2208
|
-
# @deprecated Use {#cell_watch} instead. Will be removed in 0.2.0.
|
|
2209
|
-
alias add_cell_watch cell_watch
|
|
2210
|
-
|
|
2211
1744
|
# Adds an ignored error entry to the current sheet.
|
|
2212
1745
|
#
|
|
2213
1746
|
# @param sqref [String] Cell range reference (e.g. "A1" or "A1:B10").
|
|
@@ -2217,40 +1750,19 @@ module Xlsxrb
|
|
|
2217
1750
|
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2218
1751
|
def ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2219
1752
|
|
|
2220
|
-
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
2221
|
-
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2222
|
-
def ignore_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2223
|
-
|
|
2224
|
-
# @deprecated Use {#ignored_error} instead. Will be removed in 0.2.0.
|
|
2225
|
-
# : (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2226
|
-
def add_ignored_error: (String sqref, ?eval_error: bool, ?two_digit_text_year: bool, ?number_stored_as_text: bool, ?formula: bool, ?formula_range: bool, ?unlocked_formula: bool, ?empty_cell_reference: bool, ?list_data_validation: bool, ?calculated_column: bool) -> void
|
|
2227
|
-
|
|
2228
1753
|
# Returns the ignored error entries configured for the current sheet.
|
|
2229
1754
|
#
|
|
2230
|
-
# @return [Array<
|
|
1755
|
+
# @return [Array<Elements::IgnoredError>]
|
|
2231
1756
|
# @api public
|
|
2232
|
-
# : () -> Array[
|
|
2233
|
-
def ignored_errors: () -> Array[
|
|
1757
|
+
# : () -> Array[Elements::IgnoredError]
|
|
1758
|
+
def ignored_errors: () -> Array[Elements::IgnoredError]
|
|
2234
1759
|
|
|
2235
|
-
#
|
|
1760
|
+
# Phonetic (furigana) guide properties for the current sheet.
|
|
2236
1761
|
#
|
|
2237
|
-
# @
|
|
2238
|
-
# @overload phonetic_properties()
|
|
2239
|
-
# Returns the current phonetic properties.
|
|
2240
|
-
# @return [Hash, nil]
|
|
2241
|
-
# @overload phonetic_properties(spec = nil, font_id: nil, type: nil, alignment: nil)
|
|
2242
|
-
# Sets phonetic properties for the current sheet.
|
|
2243
|
-
# @param spec [Hash, Integer, nil]
|
|
2244
|
-
# @param font_id [Integer, nil]
|
|
2245
|
-
# @param type [Symbol, String, nil]
|
|
2246
|
-
# @param alignment [Symbol, String, nil]
|
|
2247
|
-
# @return [Hash, nil]
|
|
1762
|
+
# @return [Elements::PhoneticProperties, nil]
|
|
2248
1763
|
# @api public
|
|
2249
|
-
# : (
|
|
2250
|
-
def phonetic_properties: (
|
|
2251
|
-
|
|
2252
|
-
# @deprecated Use {#phonetic_properties} instead. Will be removed in 0.2.0.
|
|
2253
|
-
alias phonetic_pr phonetic_properties
|
|
1764
|
+
# : () -> Elements::PhoneticProperties?
|
|
1765
|
+
def phonetic_properties: () -> Elements::PhoneticProperties?
|
|
2254
1766
|
|
|
2255
1767
|
# Sets phonetic (furigana) guide properties for the current sheet.
|
|
2256
1768
|
#
|
|
@@ -2260,17 +1772,12 @@ module Xlsxrb
|
|
|
2260
1772
|
# : (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
2261
1773
|
def phonetic_properties=: (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
2262
1774
|
|
|
2263
|
-
#
|
|
2264
|
-
alias phonetic_pr= phonetic_properties=
|
|
2265
|
-
|
|
2266
|
-
# Sets or gets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
1775
|
+
# Gets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
2267
1776
|
#
|
|
2268
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#code_name=} instead.
|
|
2269
|
-
# @param val [String, Symbol, nil] The code name.
|
|
2270
1777
|
# @return [String, nil]
|
|
2271
1778
|
# @api public
|
|
2272
|
-
# : (
|
|
2273
|
-
def code_name: (
|
|
1779
|
+
# : () -> String?
|
|
1780
|
+
def code_name: () -> String?
|
|
2274
1781
|
|
|
2275
1782
|
# Sets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
2276
1783
|
#
|
|
@@ -2280,19 +1787,8 @@ module Xlsxrb
|
|
|
2280
1787
|
# : (String | Symbol | nil val) -> String?
|
|
2281
1788
|
def code_name=: (String | Symbol | nil val) -> String?
|
|
2282
1789
|
|
|
2283
|
-
#
|
|
2284
|
-
# When enabled, optionally sets fit_to_width and/or fit_to_height on page_setup.
|
|
1790
|
+
# Returns whether page setup fits content to page width/height for the current sheet.
|
|
2285
1791
|
#
|
|
2286
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#fit_to_page=} or {#page_setup} with :fit_to_width/:fit_to_height instead.
|
|
2287
|
-
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
2288
|
-
# @param width [Integer, nil] Pages wide to fit to.
|
|
2289
|
-
# @param height [Integer, nil] Pages tall to fit to.
|
|
2290
|
-
# @return [Boolean, void]
|
|
2291
|
-
# @api public
|
|
2292
|
-
# : (?bool? enabled, ?width: Integer?, ?height: Integer?) -> (bool | void)
|
|
2293
|
-
def fit_to_page: (?untyped enabled, ?width: untyped, ?height: untyped) -> untyped
|
|
2294
|
-
|
|
2295
|
-
# @deprecated Use {#fit_to_page} instead. Will be removed in 0.2.0.
|
|
2296
1792
|
# @return [Boolean]
|
|
2297
1793
|
# @api public
|
|
2298
1794
|
# : () -> bool
|
|
@@ -2306,18 +1802,15 @@ module Xlsxrb
|
|
|
2306
1802
|
# : (bool? enabled) -> bool?
|
|
2307
1803
|
def fit_to_page=: (bool? enabled) -> bool?
|
|
2308
1804
|
|
|
2309
|
-
#
|
|
1805
|
+
# Worksheet calculation properties (<sheetCalcPr>) for the current sheet.
|
|
2310
1806
|
#
|
|
2311
1807
|
# @example Instruct Excel to recalculate formulas when loading sheet
|
|
2312
1808
|
# w.sheet_calc_properties = { full_calc_on_load: true }
|
|
2313
1809
|
#
|
|
2314
|
-
# @
|
|
2315
|
-
# @param spec [Hash, nil] Calculation properties hash.
|
|
2316
|
-
# @param full_calc_on_load [Boolean, nil] Whether to recalculate when loading.
|
|
2317
|
-
# @return [Hash, nil]
|
|
1810
|
+
# @return [Elements::SheetCalcProperties, nil]
|
|
2318
1811
|
# @api public
|
|
2319
|
-
# : (
|
|
2320
|
-
def sheet_calc_properties: (
|
|
1812
|
+
# : () -> Elements::SheetCalcProperties?
|
|
1813
|
+
def sheet_calc_properties: () -> Elements::SheetCalcProperties?
|
|
2321
1814
|
|
|
2322
1815
|
# Sets worksheet calculation properties (<sheetCalcPr>) for the current sheet.
|
|
2323
1816
|
#
|
|
@@ -2327,22 +1820,6 @@ module Xlsxrb
|
|
|
2327
1820
|
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2328
1821
|
def sheet_calc_properties=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2329
1822
|
|
|
2330
|
-
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
2331
|
-
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2332
|
-
def sheet_calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2333
|
-
|
|
2334
|
-
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
2335
|
-
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2336
|
-
def calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
2337
|
-
|
|
2338
|
-
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
2339
|
-
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2340
|
-
def sheet_calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2341
|
-
|
|
2342
|
-
# @deprecated Use {#sheet_calc_properties=} instead. Will be removed in 0.2.0.
|
|
2343
|
-
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2344
|
-
def calc_pr=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2345
|
-
|
|
2346
1823
|
# Adds a defined name.
|
|
2347
1824
|
#
|
|
2348
1825
|
# @param name [String] The defined name.
|
|
@@ -2350,18 +1827,13 @@ module Xlsxrb
|
|
|
2350
1827
|
# @param sheet [String, nil] Reference sheet name.
|
|
2351
1828
|
# @param scope [String, Symbol, nil] Local scope sheet name or :workbook.
|
|
2352
1829
|
# @param hidden [Boolean] Whether the defined name is hidden.
|
|
2353
|
-
# @param column [Integer, String, nil] Deprecated alias for columns.
|
|
2354
1830
|
# @param columns [Integer, String, nil] Column index or letter for coordinate-based reference.
|
|
2355
|
-
# @param
|
|
2356
|
-
# @param row [Integer, Range, nil] Deprecated alias for rows.
|
|
2357
|
-
# @param rows [Integer, Range, nil] Row or row range (1-based) for coordinate-based reference.
|
|
1831
|
+
# @param rows [Integer, Range, nil] Row or row range (0-based) for coordinate-based reference.
|
|
2358
1832
|
# @param range [String, nil] Cell range reference.
|
|
2359
|
-
# @param ref_sheet [String, nil] Deprecated alias for sheet.
|
|
2360
|
-
# @param local [Boolean] Deprecated alias for scope.
|
|
2361
1833
|
# @return [void]
|
|
2362
1834
|
# @api public
|
|
2363
|
-
# : (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?
|
|
2364
|
-
def defined_name: (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?
|
|
1835
|
+
# : (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped) -> void
|
|
1836
|
+
def defined_name: (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped) -> void
|
|
2365
1837
|
|
|
2366
1838
|
# Returns workbook-level defined names.
|
|
2367
1839
|
#
|
|
@@ -2370,14 +1842,13 @@ module Xlsxrb
|
|
|
2370
1842
|
# : () -> Array[Elements::DefinedName]
|
|
2371
1843
|
def defined_names: () -> Array[Elements::DefinedName]
|
|
2372
1844
|
|
|
2373
|
-
#
|
|
1845
|
+
# Returns the print area range for the current or named sheet, or nil if none.
|
|
2374
1846
|
#
|
|
2375
|
-
# @param range [String, Object, nil] Cell range (e.g. "A1:G50").
|
|
2376
1847
|
# @param sheet [String, nil] Target sheet name.
|
|
2377
|
-
# @return [String, nil
|
|
1848
|
+
# @return [String, nil]
|
|
2378
1849
|
# @api public
|
|
2379
|
-
# : (?
|
|
2380
|
-
def print_area: (?
|
|
1850
|
+
# : (?sheet: String?) -> String?
|
|
1851
|
+
def print_area: (?sheet: String?) -> String?
|
|
2381
1852
|
|
|
2382
1853
|
# Sets the print area for the current worksheet.
|
|
2383
1854
|
#
|
|
@@ -2387,16 +1858,20 @@ module Xlsxrb
|
|
|
2387
1858
|
# : (String? range) -> String?
|
|
2388
1859
|
def print_area=: (String? range) -> String?
|
|
2389
1860
|
|
|
2390
|
-
# Sets or gets print titles
|
|
1861
|
+
# Sets or gets repeating print titles (rows and/or columns) for pagination.
|
|
1862
|
+
#
|
|
1863
|
+
# When called with no row/column arguments, returns the {Elements::PrintTitles} value object or nil.
|
|
1864
|
+
# When called with row/column arguments, sets repeating print titles and returns nil.
|
|
2391
1865
|
#
|
|
2392
1866
|
# @param rows [String, Integer, Range, Object, nil] Repeating row range (e.g. "1:2" or 0-based 0..1).
|
|
2393
1867
|
# @param columns [String, Integer, Symbol, Range, Object, nil] Repeating column range (e.g. "A:B" or 0..1).
|
|
2394
|
-
# @param cols [String, Integer, Symbol, Range, Object, nil] Deprecated alias for columns.
|
|
2395
1868
|
# @param sheet [String, nil] Target sheet name.
|
|
2396
1869
|
# @return [Elements::PrintTitles, nil, void]
|
|
2397
1870
|
# @api public
|
|
2398
|
-
# : (
|
|
2399
|
-
|
|
1871
|
+
# : () -> Elements::PrintTitles?
|
|
1872
|
+
# : (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?, ?sheet: String?) -> void
|
|
1873
|
+
def print_titles: () -> Elements::PrintTitles?
|
|
1874
|
+
| (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?, ?sheet: String?) -> void
|
|
2400
1875
|
|
|
2401
1876
|
# Sets repeating print titles for the current worksheet.
|
|
2402
1877
|
#
|
|
@@ -2448,41 +1923,47 @@ module Xlsxrb
|
|
|
2448
1923
|
# : (untyped opts) -> void
|
|
2449
1924
|
def workbook_protection=: (untyped opts) -> void
|
|
2450
1925
|
|
|
2451
|
-
#
|
|
2452
|
-
# : (**String | Integer | bool | nil opts) -> void
|
|
2453
|
-
def protect_workbook: (**String | Integer | bool | nil opts) -> void
|
|
2454
|
-
|
|
2455
|
-
# Sets a core document metadata property.
|
|
1926
|
+
# Configures or queries core document properties.
|
|
2456
1927
|
#
|
|
2457
|
-
#
|
|
2458
|
-
#
|
|
2459
|
-
# @return [void]
|
|
2460
|
-
# @api public
|
|
2461
|
-
# : (Symbol name, String | Integer | Time value) -> void
|
|
2462
|
-
def core_property: (Symbol name, String | Integer | Time value) -> void
|
|
2463
|
-
|
|
2464
|
-
# Returns core document properties.
|
|
1928
|
+
# When called with no arguments, returns the {Elements::CoreProperties} value object.
|
|
1929
|
+
# When called with keyword options, configures properties and returns nil.
|
|
2465
1930
|
#
|
|
2466
|
-
# @
|
|
1931
|
+
# @param opts [Hash] Core properties map.
|
|
1932
|
+
# @return [Elements::CoreProperties, void]
|
|
2467
1933
|
# @api public
|
|
2468
1934
|
# : () -> Elements::CoreProperties
|
|
1935
|
+
# : (**untyped opts) -> void
|
|
2469
1936
|
def core_properties: () -> Elements::CoreProperties
|
|
1937
|
+
| (**untyped opts) -> void
|
|
2470
1938
|
|
|
2471
|
-
#
|
|
1939
|
+
# Replaces core document properties.
|
|
2472
1940
|
#
|
|
2473
|
-
# @param
|
|
2474
|
-
# @param value [String, Integer, Time] Property value.
|
|
1941
|
+
# @param props [Hash, Elements::CoreProperties]
|
|
2475
1942
|
# @return [void]
|
|
2476
1943
|
# @api public
|
|
2477
|
-
# : (Symbol
|
|
2478
|
-
def
|
|
1944
|
+
# : (Hash[Symbol, untyped] | Elements::CoreProperties props) -> void
|
|
1945
|
+
def core_properties=: (Hash[Symbol, untyped] | Elements::CoreProperties props) -> void
|
|
2479
1946
|
|
|
2480
|
-
#
|
|
1947
|
+
# Configures or queries application document properties.
|
|
2481
1948
|
#
|
|
2482
|
-
#
|
|
1949
|
+
# When called with no arguments, returns the {Elements::AppProperties} value object.
|
|
1950
|
+
# When called with keyword options, configures properties and returns nil.
|
|
1951
|
+
#
|
|
1952
|
+
# @param opts [Hash] Application properties map.
|
|
1953
|
+
# @return [Elements::AppProperties, void]
|
|
2483
1954
|
# @api public
|
|
2484
1955
|
# : () -> Elements::AppProperties
|
|
1956
|
+
# : (**untyped opts) -> void
|
|
2485
1957
|
def app_properties: () -> Elements::AppProperties
|
|
1958
|
+
| (**untyped opts) -> void
|
|
1959
|
+
|
|
1960
|
+
# Replaces application document properties.
|
|
1961
|
+
#
|
|
1962
|
+
# @param props [Hash, Elements::AppProperties]
|
|
1963
|
+
# @return [void]
|
|
1964
|
+
# @api public
|
|
1965
|
+
# : (Hash[Symbol, untyped] | Elements::AppProperties props) -> void
|
|
1966
|
+
def app_properties=: (Hash[Symbol, untyped] | Elements::AppProperties props) -> void
|
|
2486
1967
|
|
|
2487
1968
|
# Sets multiple core and/or app properties.
|
|
2488
1969
|
#
|
|
@@ -2527,6 +2008,42 @@ module Xlsxrb
|
|
|
2527
2008
|
|
|
2528
2009
|
private
|
|
2529
2010
|
|
|
2011
|
+
# Raises ArgumentError for any cell style name that has not been defined.
|
|
2012
|
+
# : (untyped cell_styles) -> void
|
|
2013
|
+
def check_style_names!: (untyped cell_styles) -> void
|
|
2014
|
+
|
|
2015
|
+
# Raises ArgumentError if +name+ is a style name that has not been defined. Defined
|
|
2016
|
+
# names return before DslHelpers.check_style_name!, whose Symbol#to_s allocates a
|
|
2017
|
+
# String for every styled cell.
|
|
2018
|
+
# : (untyped name) -> void
|
|
2019
|
+
def check_style_name!: (untyped name) -> void
|
|
2020
|
+
|
|
2021
|
+
LATE_SHEET_SETTING_MESSAGE: ::String
|
|
2022
|
+
|
|
2023
|
+
# Warns when a setting that StreamWriter writes at the start of the sheet comes after
|
|
2024
|
+
# rows (or skipped rows) of the sheet. ADR 0010 makes it an error in 0.3.0.
|
|
2025
|
+
# : (String name) -> void
|
|
2026
|
+
def warn_late_sheet_setting: (String name) -> void
|
|
2027
|
+
|
|
2028
|
+
# The style id for a Time-like value (see Ooxml::WorksheetWriter::TimeLike) in a cell
|
|
2029
|
+
# whose style id is style_id: the date-time variant of that style when the style has no
|
|
2030
|
+
# number format, as a Time in the same cell gets from with_date_style_variants, and
|
|
2031
|
+
# style_id otherwise. Called by the worksheet writer only for such values.
|
|
2032
|
+
# : (Integer style_id) -> Integer
|
|
2033
|
+
def time_like_style_id: (Integer style_id) -> Integer
|
|
2034
|
+
|
|
2035
|
+
# Gives Date and Time values whose named style has no number format a variant of that
|
|
2036
|
+
# style with the default date or time format, registered on first use. A value without
|
|
2037
|
+
# a cell style gets a variant of the style it inherits: the row style, or the column
|
|
2038
|
+
# style in a row without one.
|
|
2039
|
+
# : (Array[untyped] values, untyped cell_styles, untyped row_style) -> untyped
|
|
2040
|
+
def with_date_style_variants: (Array[untyped] values, untyped cell_styles, untyped row_style) -> untyped
|
|
2041
|
+
|
|
2042
|
+
def ensure_sheet_started!: () -> untyped
|
|
2043
|
+
|
|
2044
|
+
# : (String? range, ?sheet: String?) -> String?
|
|
2045
|
+
def set_print_area: (String? range, ?sheet: String?) -> String?
|
|
2046
|
+
|
|
2530
2047
|
# : (untyped range) -> untyped
|
|
2531
2048
|
def absolute_range: (untyped range) -> untyped
|
|
2532
2049
|
|