xlsxrb 0.1.18 → 0.2.0
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 +163 -0
- data/README.md +34 -11
- data/lib/ruby_lsp/xlsxrb/completion_listener.rb +410 -80
- data/lib/xlsxrb/chart_builder.rb +251 -386
- data/lib/xlsxrb/dsl_helpers.rb +120 -67
- 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 +43 -314
- 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 +2 -2
- data/lib/xlsxrb/ooxml/workbook_parser.rb +0 -1
- data/lib/xlsxrb/ooxml/workbook_writer.rb +172 -93
- data/lib/xlsxrb/ooxml/worksheet_parser.rb +61 -29
- data/lib/xlsxrb/ooxml/worksheet_writer.rb +65 -47
- data/lib/xlsxrb/ooxml/writer/drawing_xml.rb +28 -11
- data/lib/xlsxrb/ooxml/writer/features_xml.rb +53 -14
- data/lib/xlsxrb/ooxml/writer/styles_xml.rb +1 -1
- data/lib/xlsxrb/ooxml/writer.rb +105 -41
- 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 +12 -116
- data/lib/xlsxrb/stream_sheet.rb +14 -261
- data/lib/xlsxrb/stream_writer.rb +623 -1476
- data/lib/xlsxrb/style_builder.rb +376 -593
- data/lib/xlsxrb/version.rb +1 -1
- data/lib/xlsxrb/workbook_builder.rb +192 -226
- data/lib/xlsxrb/worksheet_builder.rb +456 -1324
- data/lib/xlsxrb.rb +266 -1083
- data/sig/generated/xlsxrb/chart_builder.rbs +202 -205
- data/sig/generated/xlsxrb/dsl_helpers.rbs +64 -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 +3 -3
- data/sig/generated/xlsxrb/ooxml/workbook_writer.rbs +12 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +16 -0
- data/sig/generated/xlsxrb/ooxml/worksheet_writer.rbs +5 -3
- data/sig/generated/xlsxrb/ooxml/writer/features_xml.rbs +7 -0
- data/sig/generated/xlsxrb/ooxml/writer.rbs +20 -14
- 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 +7 -42
- data/sig/generated/xlsxrb/stream_sheet.rbs +1 -158
- data/sig/generated/xlsxrb/stream_writer.rbs +457 -976
- data/sig/generated/xlsxrb/style_builder.rbs +206 -242
- data/sig/generated/xlsxrb/workbook_builder.rbs +84 -132
- data/sig/generated/xlsxrb/worksheet_builder.rbs +309 -685
- data/sig/generated/xlsxrb.rbs +43 -190
- 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
|
#
|
|
@@ -188,9 +123,6 @@ module Xlsxrb
|
|
|
188
123
|
# : (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
189
124
|
def default_font: (?String | Hash[Symbol, untyped]? name, ?Float | Integer | nil size, **untyped opts) -> void
|
|
190
125
|
|
|
191
|
-
# @deprecated Use {#default_font} instead. Will be removed in 0.2.0.
|
|
192
|
-
alias set_default_font default_font
|
|
193
|
-
|
|
194
126
|
# Creates an {Elements::Formula} object.
|
|
195
127
|
# @api public
|
|
196
128
|
# : (String expression, ?cached_value: (String | Numeric | bool | Elements::CellError | nil), ?type: (Symbol | String)?, ?ref: String?, ?shared_index: Integer?) -> Elements::Formula
|
|
@@ -224,18 +156,12 @@ module Xlsxrb
|
|
|
224
156
|
# @param sheet_name [String]
|
|
225
157
|
def initialize: (untyped writer, untyped sheet_name) -> untyped
|
|
226
158
|
|
|
227
|
-
#
|
|
159
|
+
# Returns the worksheet name.
|
|
228
160
|
#
|
|
229
|
-
# @
|
|
230
|
-
# @param size [Float, Integer, nil] Font size in points.
|
|
231
|
-
# @param opts [Hash] Additional font options.
|
|
232
|
-
# @return [void]
|
|
161
|
+
# @return [String]
|
|
233
162
|
# @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
|
|
163
|
+
# : () -> String
|
|
164
|
+
def name: () -> String
|
|
239
165
|
|
|
240
166
|
# Creates an {Elements::Formula} object.
|
|
241
167
|
# @api public
|
|
@@ -262,46 +188,6 @@ module Xlsxrb
|
|
|
262
188
|
# : (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
263
189
|
def cell_error: (String | Symbol | Elements::CellError code) -> Elements::CellError
|
|
264
190
|
|
|
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
191
|
# Defines or configures a named cell style on the active sheet.
|
|
306
192
|
#
|
|
307
193
|
# @example
|
|
@@ -321,42 +207,28 @@ module Xlsxrb
|
|
|
321
207
|
# @example Merge with cell reference string
|
|
322
208
|
# s.merge("A1:C1")
|
|
323
209
|
#
|
|
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.
|
|
210
|
+
# @param range [String] The cell range (e.g. "A1:B2").
|
|
331
211
|
# @return [void]
|
|
332
212
|
# @api public
|
|
333
|
-
# : (
|
|
334
|
-
def merge: (
|
|
213
|
+
# : (String range) -> void
|
|
214
|
+
def merge: (String range) -> void
|
|
335
215
|
|
|
336
216
|
# Adds a drawing shape to the sheet.
|
|
337
217
|
#
|
|
338
218
|
# @example
|
|
339
|
-
# s.shape(preset: "ellipse", text: "Circle",
|
|
219
|
+
# s.shape(preset: "ellipse", text: "Circle", from_column: 1, from_row: 1, to_column: 4, to_row: 5)
|
|
340
220
|
#
|
|
341
221
|
# @param preset [String] Preset shape type (e.g. "rect", "ellipse").
|
|
342
222
|
# @param text [String, nil] Shape label text.
|
|
343
223
|
# @param from_column [Integer, nil] Starting column index (0-based).
|
|
344
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
345
224
|
# @param from_row [Integer] Starting row index (0-based).
|
|
346
225
|
# @param to_column [Integer, nil] Ending column index (0-based).
|
|
347
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
348
226
|
# @param to_row [Integer] Ending row index (0-based).
|
|
349
227
|
# @param opts [Hash] Additional shape formatting options.
|
|
350
228
|
# @return [void]
|
|
351
229
|
# @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
|
|
230
|
+
# : (?preset: String, ?text: String?, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
231
|
+
def shape: (?preset: String, ?text: String?, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
360
232
|
|
|
361
233
|
# Appends a row of cells to the active sheet.
|
|
362
234
|
#
|
|
@@ -374,15 +246,10 @@ module Xlsxrb
|
|
|
374
246
|
# @param custom_height [Boolean] Whether to flag as custom height.
|
|
375
247
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
376
248
|
# @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
249
|
# @return [void]
|
|
380
250
|
# @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
|
|
251
|
+
# : (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
|
|
252
|
+
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
253
|
|
|
387
254
|
# Appends a row to the worksheet and returns self for chaining.
|
|
388
255
|
#
|
|
@@ -397,9 +264,6 @@ module Xlsxrb
|
|
|
397
264
|
|
|
398
265
|
# Advances the row cursor by count without writing empty row elements.
|
|
399
266
|
#
|
|
400
|
-
# @example Skip one row
|
|
401
|
-
# s.skip_row
|
|
402
|
-
#
|
|
403
267
|
# @example Skip multiple rows
|
|
404
268
|
# s.skip_rows(3)
|
|
405
269
|
#
|
|
@@ -409,9 +273,6 @@ module Xlsxrb
|
|
|
409
273
|
# : (?Integer count) -> void
|
|
410
274
|
def skip_rows: (?Integer count) -> void
|
|
411
275
|
|
|
412
|
-
# @deprecated Use {#skip_rows} instead. Will be removed in 0.2.0.
|
|
413
|
-
alias skip_row skip_rows
|
|
414
|
-
|
|
415
276
|
# Configures column width and properties.
|
|
416
277
|
#
|
|
417
278
|
# @example Set column A width
|
|
@@ -443,15 +304,6 @@ module Xlsxrb
|
|
|
443
304
|
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
444
305
|
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
306
|
|
|
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
307
|
# Groups multiple rows with outline hierarchy with a block.
|
|
456
308
|
#
|
|
457
309
|
# @param rows [Range, Array, Integer, nil] Unused in streaming write.
|
|
@@ -464,26 +316,21 @@ module Xlsxrb
|
|
|
464
316
|
# : (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
465
317
|
def group_rows: (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
466
318
|
|
|
467
|
-
#
|
|
468
|
-
alias group_row group_rows
|
|
469
|
-
|
|
470
|
-
# Configures worksheet-level outline and grouping view properties.
|
|
319
|
+
# Configures or queries worksheet-level outline and grouping view properties.
|
|
471
320
|
#
|
|
472
321
|
# @param summary_below [Boolean, nil] Summary rows below detail rows.
|
|
473
322
|
# @param summary_right [Boolean, nil] Summary columns to the right of detail columns.
|
|
474
323
|
# @param show_outline_symbols [Boolean, nil] Outline symbols visible.
|
|
475
|
-
# @param show_symbols [Boolean, nil] Deprecated alias for show_outline_symbols.
|
|
476
324
|
# @param apply_styles [Boolean, nil] Automatic styles applied.
|
|
477
325
|
# @param opts [Hash] Additional options.
|
|
478
|
-
# @return [void]
|
|
326
|
+
# @return [Hash<Symbol, untyped>, void]
|
|
479
327
|
# @api public
|
|
480
|
-
# : (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
alias outline_pr outline_properties
|
|
328
|
+
# : () -> Hash[Symbol, untyped]
|
|
329
|
+
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
330
|
+
def outline_properties: () -> Hash[Symbol, untyped]
|
|
331
|
+
| (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
485
332
|
|
|
486
|
-
# Sets worksheet outline and grouping view properties.
|
|
333
|
+
# Sets worksheet-level outline and grouping view properties.
|
|
487
334
|
#
|
|
488
335
|
# @param opts [Hash] Outline properties.
|
|
489
336
|
# @return [void]
|
|
@@ -491,13 +338,11 @@ module Xlsxrb
|
|
|
491
338
|
# : (Hash[Symbol, untyped] opts) -> void
|
|
492
339
|
def outline_properties=: (Hash[Symbol, untyped] opts) -> void
|
|
493
340
|
|
|
494
|
-
alias outline_pr= outline_properties=
|
|
495
|
-
|
|
496
341
|
# Adds a chart to the active sheet.
|
|
497
342
|
#
|
|
498
343
|
# @example
|
|
499
344
|
# s.chart(:bar) do |chart_builder|
|
|
500
|
-
# chart_builder.title
|
|
345
|
+
# chart_builder.title = "Quarterly Sales"
|
|
501
346
|
# chart_builder.series(values: "Sheet1!$B$2:$B$5", categories: "Sheet1!$A$2:$A$5", name: "Revenue")
|
|
502
347
|
# end
|
|
503
348
|
#
|
|
@@ -528,16 +373,12 @@ module Xlsxrb
|
|
|
528
373
|
# : (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
529
374
|
def hyperlink: (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
530
375
|
|
|
531
|
-
#
|
|
532
|
-
#
|
|
533
|
-
# @example
|
|
534
|
-
# s.auto_filter("A1:D100")
|
|
376
|
+
# Returns the auto-filter range on the active sheet, or nil if none.
|
|
535
377
|
#
|
|
536
|
-
# @
|
|
537
|
-
# @return [void]
|
|
378
|
+
# @return [String, nil]
|
|
538
379
|
# @api public
|
|
539
|
-
# : (
|
|
540
|
-
def auto_filter: (
|
|
380
|
+
# : () -> String?
|
|
381
|
+
def auto_filter: () -> String?
|
|
541
382
|
|
|
542
383
|
# Sets the auto-filter range on the active sheet.
|
|
543
384
|
#
|
|
@@ -556,29 +397,31 @@ module Xlsxrb
|
|
|
556
397
|
# @param filter [Hash] Values or filter specification hash.
|
|
557
398
|
# @return [void]
|
|
558
399
|
# @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
|
|
400
|
+
# : (Integer | String | Symbol col_id, (Hash[untyped, untyped] | Array[untyped]) filter) -> void
|
|
401
|
+
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] | Array[untyped] filter) -> void
|
|
561
402
|
|
|
562
|
-
# Configures sort state on a range.
|
|
403
|
+
# Configures or queries sort state on a range.
|
|
563
404
|
#
|
|
564
|
-
#
|
|
565
|
-
#
|
|
405
|
+
# When called with no arguments, returns the {Elements::SortState} value object.
|
|
406
|
+
# When called with arguments, updates sort state and returns nil.
|
|
566
407
|
#
|
|
567
|
-
# @param ref [String] The range to sort.
|
|
568
|
-
# @param sort_conditions [Array<Hash
|
|
408
|
+
# @param ref [String, nil] The range to sort.
|
|
409
|
+
# @param sort_conditions [Array<Hash>, nil] Sort conditions array.
|
|
569
410
|
# @param opts [Hash] Additional sort options.
|
|
570
|
-
# @return [void]
|
|
411
|
+
# @return [Elements::SortState, nil, void]
|
|
571
412
|
# @api public
|
|
572
|
-
# : (
|
|
573
|
-
|
|
413
|
+
# : () -> Elements::SortState?
|
|
414
|
+
# : (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, **untyped opts) -> void
|
|
415
|
+
def sort_state: () -> Elements::SortState?
|
|
416
|
+
| (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, **untyped opts) -> void
|
|
574
417
|
|
|
575
|
-
# Sets
|
|
418
|
+
# Sets sort state configuration for the active sheet.
|
|
576
419
|
#
|
|
577
420
|
# @param opts [Elements::SortState, Hash, nil] Sort state options.
|
|
578
421
|
# @return [void]
|
|
579
422
|
# @api public
|
|
580
|
-
# : (untyped opts) -> void
|
|
581
|
-
def sort_state=: (untyped opts) -> void
|
|
423
|
+
# : (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
424
|
+
def sort_state=: (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
582
425
|
|
|
583
426
|
# Adds data validation rules to a range.
|
|
584
427
|
#
|
|
@@ -587,8 +430,8 @@ module Xlsxrb
|
|
|
587
430
|
#
|
|
588
431
|
# @example Block syntax
|
|
589
432
|
# s.data_validation("B2:B100") do |dv|
|
|
590
|
-
# dv.type :list
|
|
591
|
-
# dv.formula1 '"High,Medium,Low"'
|
|
433
|
+
# dv.type = :list
|
|
434
|
+
# dv.formula1 = '"High,Medium,Low"'
|
|
592
435
|
# end
|
|
593
436
|
#
|
|
594
437
|
# @param range [String, nil] The cell range (e.g. "B2:B10").
|
|
@@ -600,10 +443,6 @@ module Xlsxrb
|
|
|
600
443
|
# : (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
601
444
|
def data_validation: (?String? range, ?type: (String | Symbol)?, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
602
445
|
|
|
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
446
|
# Adds conditional formatting to a range.
|
|
608
447
|
#
|
|
609
448
|
# @example Highlight values greater than 100
|
|
@@ -631,8 +470,8 @@ module Xlsxrb
|
|
|
631
470
|
#
|
|
632
471
|
# @example Block syntax
|
|
633
472
|
# s.table("A1:C10") do |t|
|
|
634
|
-
# t.columns ["ID", "Name", "Total"]
|
|
635
|
-
# t.style "TableStyleMedium9"
|
|
473
|
+
# t.columns = ["ID", "Name", "Total"]
|
|
474
|
+
# t.style = "TableStyleMedium9"
|
|
636
475
|
# end
|
|
637
476
|
#
|
|
638
477
|
# @param ref [String, nil] The cell range for the table (e.g. "A1:D10").
|
|
@@ -647,12 +486,6 @@ module Xlsxrb
|
|
|
647
486
|
# : (?String? ref, ?columns: untyped, ?name: String?, ?display_name: String?, ?style: String?, **untyped opts) ?{ (TableBuilder) -> void } -> void
|
|
648
487
|
def table: (?String? ref, ?columns: untyped, ?name: String?, ?display_name: String?, ?style: String?, **untyped opts) ?{ (TableBuilder) -> void } -> void
|
|
649
488
|
|
|
650
|
-
# simplecov:disable
|
|
651
|
-
# Edge case / untested delegation block
|
|
652
|
-
# @api private
|
|
653
|
-
# : () -> void
|
|
654
|
-
def cleanup!: () -> void
|
|
655
|
-
|
|
656
489
|
# Adds a comment to a cell.
|
|
657
490
|
#
|
|
658
491
|
# @example
|
|
@@ -661,42 +494,38 @@ module Xlsxrb
|
|
|
661
494
|
# @param cell [String, Integer] The cell reference (e.g. "A1").
|
|
662
495
|
# @param text [String] The comment text.
|
|
663
496
|
# @param author [String] The author name.
|
|
497
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover.
|
|
664
498
|
# @return [void]
|
|
665
499
|
# @api public
|
|
666
|
-
# : (String | Integer cell, String text, ?author: String) -> void
|
|
667
|
-
def comment: (String | Integer cell, String text, ?author: String) -> void
|
|
500
|
+
# : (String | Integer cell, String text, ?author: String, ?visible: bool) -> void
|
|
501
|
+
def comment: (String | Integer cell, String text, ?author: String, ?visible: bool) -> void
|
|
668
502
|
|
|
669
503
|
# Adds a threaded comment to a cell.
|
|
670
504
|
#
|
|
671
505
|
# @param cell [String, Integer] The cell reference (e.g. "A1").
|
|
672
506
|
# @param text [String] The comment text.
|
|
673
507
|
# @param author [String] The author name.
|
|
674
|
-
# @param opts [Hash] Options: timestamp, id, parent_id, done, user_id, provider_id.
|
|
508
|
+
# @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
509
|
# @return [void]
|
|
676
510
|
# @api public
|
|
677
511
|
# : (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
678
512
|
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
513
|
|
|
680
|
-
# @deprecated Use {#threaded_comment} instead. Will be removed in 0.2.0.
|
|
681
|
-
alias add_threaded_comment threaded_comment
|
|
682
|
-
|
|
683
514
|
# Adds a Pivot Table to the sheet.
|
|
684
515
|
#
|
|
685
516
|
# @param source_ref [String] Source data range reference (e.g. "Sheet1!A1:D100").
|
|
686
517
|
# @param row_fields [Array<String>] Field names for rows.
|
|
687
518
|
# @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.
|
|
519
|
+
# @param column_fields [Array<String>, nil] Field names for columns.
|
|
520
|
+
# @param ref [String, nil] Target top-left cell reference (default: "E1").
|
|
692
521
|
# @param name [String, nil] Pivot table name.
|
|
693
522
|
# @param field_names [Array<String>, nil] Override field names.
|
|
694
|
-
# @param items [Array, nil] Items
|
|
523
|
+
# @param items [Hash{Integer => Array}, nil] Items of each field, by 0-based field index.
|
|
695
524
|
# @param opts [Hash] Additional options.
|
|
696
525
|
# @return [void]
|
|
697
526
|
# @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, ?
|
|
527
|
+
# : (String source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?ref: String?, ?name: String?, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
528
|
+
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
529
|
|
|
701
530
|
# Adds sparklines to the sheet.
|
|
702
531
|
#
|
|
@@ -711,119 +540,14 @@ module Xlsxrb
|
|
|
711
540
|
# : (sparklines: Array[Hash[Symbol, untyped]], ?type: (String | Symbol)?, **untyped opts) -> void
|
|
712
541
|
def sparkline_group: (sparklines: Array[Hash[Symbol, untyped]], ?type: (String | Symbol)?, **untyped opts) -> void
|
|
713
542
|
|
|
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
543
|
# Sets workbook-level properties.
|
|
736
544
|
#
|
|
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.
|
|
746
|
-
#
|
|
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).
|
|
545
|
+
# Gets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
803
546
|
#
|
|
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
547
|
# @return [Symbol]
|
|
824
548
|
# @api public
|
|
825
|
-
# : (
|
|
826
|
-
def state: (
|
|
549
|
+
# : () -> Symbol
|
|
550
|
+
def state: () -> Symbol
|
|
827
551
|
|
|
828
552
|
# Sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
829
553
|
#
|
|
@@ -833,15 +557,12 @@ module Xlsxrb
|
|
|
833
557
|
# : (Symbol | String new_state) -> Symbol
|
|
834
558
|
def state=: (Symbol | String new_state) -> Symbol
|
|
835
559
|
|
|
836
|
-
# Gets
|
|
560
|
+
# Gets the tab color of this worksheet.
|
|
837
561
|
#
|
|
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
562
|
# @return [String, Hash, nil]
|
|
842
563
|
# @api public
|
|
843
|
-
# : (
|
|
844
|
-
def tab_color: (
|
|
564
|
+
# : () -> (String | Hash[Symbol, untyped] | nil)
|
|
565
|
+
def tab_color: () -> (String | Hash[Symbol, untyped] | nil)
|
|
845
566
|
|
|
846
567
|
# Sets the tab color of this worksheet.
|
|
847
568
|
#
|
|
@@ -851,27 +572,15 @@ module Xlsxrb
|
|
|
851
572
|
# : (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
852
573
|
def tab_color=: (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
853
574
|
|
|
854
|
-
#
|
|
855
|
-
#
|
|
856
|
-
# @param name [Symbol, String] Property name.
|
|
857
|
-
# @param value [Object] Property value.
|
|
858
|
-
# @return [void]
|
|
859
|
-
# @api public
|
|
860
|
-
# : (Symbol | String name, untyped value) -> void
|
|
861
|
-
def sheet_property: (Symbol | String name, untyped value) -> void
|
|
862
|
-
|
|
863
|
-
# Sets sheet properties (e.g. tab color, page setup flags). Accepts kwargs or name/value pair.
|
|
864
|
-
#
|
|
865
|
-
# @example
|
|
866
|
-
# s.sheet_properties(tab_color: "FF0000")
|
|
575
|
+
# Configures or queries sheet properties.
|
|
867
576
|
#
|
|
868
|
-
# @param
|
|
869
|
-
# @
|
|
870
|
-
# @param opts [Hash] Additional options.
|
|
871
|
-
# @return [void]
|
|
577
|
+
# @param opts [Hash] Keyword options for sheet properties.
|
|
578
|
+
# @return [Elements::SheetProperties, void]
|
|
872
579
|
# @api public
|
|
873
|
-
# : (
|
|
874
|
-
|
|
580
|
+
# : () -> Elements::SheetProperties
|
|
581
|
+
# : (**untyped opts) -> void
|
|
582
|
+
def sheet_properties: () -> Elements::SheetProperties
|
|
583
|
+
| (**untyped opts) -> void
|
|
875
584
|
|
|
876
585
|
# Replaces worksheet properties.
|
|
877
586
|
# @param opts [Hash, Elements::SheetProperties]
|
|
@@ -886,21 +595,20 @@ module Xlsxrb
|
|
|
886
595
|
# @param name [String] Defined name identifier.
|
|
887
596
|
# @param value [Object, nil] Value or formula expression.
|
|
888
597
|
# @param hidden [Boolean] Whether the defined name is hidden.
|
|
889
|
-
# @param column [Integer, String, nil] Deprecated alias for columns.
|
|
890
598
|
# @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.
|
|
599
|
+
# @param rows [Integer, Range, nil] Row or row range (0-based) for coordinate-based reference.
|
|
894
600
|
# @param range [String, nil] Cell range reference.
|
|
895
601
|
# @param sheet [String, nil] Reference sheet name (defaults to current sheet).
|
|
896
602
|
# @param scope [String, Symbol, nil] Scope identifier (:workbook or sheet name).
|
|
897
|
-
# @param local [Boolean] Deprecated alias for scope: :current.
|
|
898
603
|
# @return [void]
|
|
899
604
|
# @api public
|
|
900
|
-
# : (String name, ?untyped value, ?hidden: bool, ?
|
|
901
|
-
def defined_name: (String name, ?untyped value, ?hidden: bool, ?
|
|
605
|
+
# : (String name, ?untyped value, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?scope: (String | Symbol)?) -> void
|
|
606
|
+
def defined_name: (String name, ?untyped value, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped, ?sheet: String?, ?scope: (String | Symbol)?) -> void
|
|
902
607
|
|
|
903
|
-
#
|
|
608
|
+
# Configures or queries freeze panes (<pane state="frozen">).
|
|
609
|
+
#
|
|
610
|
+
# When called with no arguments, returns the {Elements::FreezePane} value object or nil.
|
|
611
|
+
# When called with arguments, configures the freeze pane and returns nil.
|
|
904
612
|
#
|
|
905
613
|
# @example Freeze top row
|
|
906
614
|
# s.freeze_pane(row: 1)
|
|
@@ -910,27 +618,27 @@ module Xlsxrb
|
|
|
910
618
|
#
|
|
911
619
|
# @param row [Integer, nil] Number of rows to freeze.
|
|
912
620
|
# @param column [Integer, String, nil] Number of columns to freeze.
|
|
913
|
-
# @
|
|
914
|
-
# @return [void]
|
|
621
|
+
# @return [Elements::FreezePane, nil, void]
|
|
915
622
|
# @api public
|
|
916
|
-
# : (
|
|
917
|
-
|
|
623
|
+
# : () -> Elements::FreezePane?
|
|
624
|
+
# : (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
625
|
+
def freeze_pane: () -> Elements::FreezePane?
|
|
626
|
+
| (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
918
627
|
|
|
919
628
|
# Sets or clears freeze pane configuration.
|
|
920
629
|
#
|
|
921
630
|
# @param opts [Elements::FreezePane, Hash, nil] Freeze pane options.
|
|
922
631
|
# @return [void]
|
|
923
632
|
# @api public
|
|
924
|
-
# : (untyped opts) -> void
|
|
925
|
-
def freeze_pane=: (untyped opts) -> void
|
|
633
|
+
# : (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
634
|
+
def freeze_pane=: (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
926
635
|
|
|
927
|
-
#
|
|
636
|
+
# Returns the print area range for this worksheet, or nil if none.
|
|
928
637
|
#
|
|
929
|
-
# @
|
|
930
|
-
# @return [String, nil, void]
|
|
638
|
+
# @return [String, nil]
|
|
931
639
|
# @api public
|
|
932
|
-
# : (
|
|
933
|
-
def print_area: (
|
|
640
|
+
# : () -> String?
|
|
641
|
+
def print_area: () -> String?
|
|
934
642
|
|
|
935
643
|
# Sets the print area for this worksheet.
|
|
936
644
|
#
|
|
@@ -940,15 +648,19 @@ module Xlsxrb
|
|
|
940
648
|
# : (String? range) -> String?
|
|
941
649
|
def print_area=: (String? range) -> String?
|
|
942
650
|
|
|
943
|
-
#
|
|
651
|
+
# Sets or gets repeating print titles (rows and/or columns) for pagination.
|
|
652
|
+
#
|
|
653
|
+
# When called with no arguments, returns the {Elements::PrintTitles} value object or nil.
|
|
654
|
+
# When called with arguments, updates print titles and returns nil.
|
|
944
655
|
#
|
|
945
|
-
# @param rows [String, Integer, Range,
|
|
946
|
-
# @param columns [String, Integer, Symbol, Range,
|
|
947
|
-
# @param cols [String, Integer, Symbol, Range, Object, nil] Deprecated alias for columns.
|
|
656
|
+
# @param rows [String, Integer, Range, nil] Repeating row range (e.g. "1:2").
|
|
657
|
+
# @param columns [String, Integer, Symbol, Range, nil] Repeating column range (e.g. "A:B").
|
|
948
658
|
# @return [Elements::PrintTitles, nil, void]
|
|
949
659
|
# @api public
|
|
950
|
-
# : (
|
|
951
|
-
|
|
660
|
+
# : () -> Elements::PrintTitles?
|
|
661
|
+
# : (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?) -> void
|
|
662
|
+
def print_titles: () -> Elements::PrintTitles?
|
|
663
|
+
| (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?) -> void
|
|
952
664
|
|
|
953
665
|
# Sets repeating print titles for this worksheet.
|
|
954
666
|
#
|
|
@@ -976,74 +688,58 @@ module Xlsxrb
|
|
|
976
688
|
# : (Integer | String first, ?(Integer | String)? last) -> void
|
|
977
689
|
def repeat_columns: (Integer | String first, ?(Integer | String)? last) -> void
|
|
978
690
|
|
|
979
|
-
# Splits sheet view into panes.
|
|
691
|
+
# Splits sheet view into panes or queries split pane settings (<pane>).
|
|
692
|
+
#
|
|
693
|
+
# When called with no arguments, returns the {Elements::SplitPane} value object or nil.
|
|
694
|
+
# When called with arguments, configures the split pane and returns nil.
|
|
980
695
|
#
|
|
981
|
-
# @param x_split [Integer] Horizontal split position.
|
|
982
|
-
# @param y_split [Integer] Vertical split position.
|
|
696
|
+
# @param x_split [Integer, nil] Horizontal split position.
|
|
697
|
+
# @param y_split [Integer, nil] Vertical split position.
|
|
983
698
|
# @param top_left_cell [String, nil] Top-left visible cell in bottom-right pane.
|
|
984
699
|
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
985
700
|
# @param state [String, Symbol, nil] Split state.
|
|
986
|
-
# @return [void]
|
|
701
|
+
# @return [Elements::SplitPane, nil, void]
|
|
987
702
|
# @api public
|
|
988
|
-
# : (
|
|
989
|
-
|
|
703
|
+
# : () -> Elements::SplitPane?
|
|
704
|
+
# : (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
705
|
+
def split_pane: () -> Elements::SplitPane?
|
|
706
|
+
| (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
990
707
|
|
|
991
708
|
# Sets or clears split pane configuration.
|
|
992
709
|
#
|
|
993
710
|
# @param opts [Elements::SplitPane, Hash, nil] Split pane options.
|
|
994
711
|
# @return [void]
|
|
995
712
|
# @api public
|
|
996
|
-
# : (untyped opts) -> void
|
|
997
|
-
def split_pane=: (untyped opts) -> void
|
|
713
|
+
# : (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
714
|
+
def split_pane=: (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
998
715
|
|
|
999
|
-
#
|
|
1000
|
-
# Edge case / untested delegation block
|
|
1001
|
-
# Sets workbook structure and window protection.
|
|
716
|
+
# Sets or queries the active/selected cell on the sheet (<selection>).
|
|
1002
717
|
#
|
|
1003
|
-
#
|
|
1004
|
-
#
|
|
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
|
|
1012
|
-
|
|
1013
|
-
# simplecov:disable
|
|
1014
|
-
# Edge case / untested delegation block
|
|
1015
|
-
# Sets core metadata property.
|
|
718
|
+
# When called with no arguments, returns the selection ({Elements::Selection}, Array, or nil).
|
|
719
|
+
# When called with arguments, updates the selection and returns nil.
|
|
1016
720
|
#
|
|
1017
|
-
# @param
|
|
1018
|
-
# @param value [String, Integer, Time] Property value.
|
|
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.
|
|
1025
|
-
#
|
|
1026
|
-
# @param active_cell [String] Cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
721
|
+
# @param active_cell [String, nil] Cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
1027
722
|
# @param sqref [String, nil] Selection range.
|
|
1028
723
|
# @param pane [String, Symbol, nil] Pane identifier.
|
|
1029
|
-
# @return [void]
|
|
724
|
+
# @return [Elements::Selection, Array<Elements::Selection>, nil, void]
|
|
1030
725
|
# @api public
|
|
1031
|
-
# : (
|
|
1032
|
-
|
|
726
|
+
# : () -> (Elements::Selection | Array[Elements::Selection])?
|
|
727
|
+
# : (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
728
|
+
def selection: () -> (Elements::Selection | Array[Elements::Selection])?
|
|
729
|
+
| (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1033
730
|
|
|
1034
731
|
# Sets or clears the selection configuration.
|
|
1035
732
|
#
|
|
1036
733
|
# @param opts [Elements::Selection, Array<Elements::Selection, Hash>, Hash, nil]
|
|
1037
734
|
# @return [void]
|
|
1038
735
|
# @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
|
|
736
|
+
# : (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
737
|
+
def selection=: (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
1045
738
|
|
|
1046
|
-
# Configures page margins for printing.
|
|
739
|
+
# Configures or queries page margins for printing (<pageMargins>).
|
|
740
|
+
#
|
|
741
|
+
# When called with no arguments, returns the {Elements::PageMargins} value object or nil.
|
|
742
|
+
# When called with arguments, configures page margins and returns nil.
|
|
1047
743
|
#
|
|
1048
744
|
# @param left [Float, nil] Left margin in inches.
|
|
1049
745
|
# @param right [Float, nil] Right margin in inches.
|
|
@@ -1051,62 +747,75 @@ module Xlsxrb
|
|
|
1051
747
|
# @param bottom [Float, nil] Bottom margin in inches.
|
|
1052
748
|
# @param header [Float, nil] Header margin in inches.
|
|
1053
749
|
# @param footer [Float, nil] Footer margin in inches.
|
|
1054
|
-
# @return [void]
|
|
750
|
+
# @return [Elements::PageMargins, nil, void]
|
|
1055
751
|
# @api public
|
|
752
|
+
# : () -> Elements::PageMargins?
|
|
1056
753
|
# : (?left: Float | nil, ?right: Float | nil, ?top: Float | nil, ?bottom: Float | nil, ?header: Float | nil, ?footer: Float | nil) -> void
|
|
1057
|
-
def page_margins: (
|
|
754
|
+
def page_margins: () -> Elements::PageMargins?
|
|
755
|
+
| (?left: Float | nil, ?right: Float | nil, ?top: Float | nil, ?bottom: Float | nil, ?header: Float | nil, ?footer: Float | nil) -> void
|
|
1058
756
|
|
|
1059
|
-
# Sets page margins configuration.
|
|
757
|
+
# Sets or clears page margins configuration.
|
|
1060
758
|
#
|
|
1061
759
|
# @param opts [Hash, Elements::PageMargins, nil]
|
|
1062
760
|
# @return [void]
|
|
1063
761
|
# @api public
|
|
1064
|
-
# : (untyped opts) -> void
|
|
1065
|
-
def page_margins=: (untyped opts) -> void
|
|
762
|
+
# : (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
763
|
+
def page_margins=: (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
1066
764
|
|
|
1067
|
-
# Configures page orientation, paper size, and print setup.
|
|
765
|
+
# Configures or queries page orientation, paper size, and print setup (<pageSetup>).
|
|
766
|
+
#
|
|
767
|
+
# When called with no arguments, returns the {Elements::PageSetup} value object.
|
|
768
|
+
# When called with keyword arguments, updates page setup and returns nil.
|
|
1068
769
|
#
|
|
1069
770
|
# @param orientation [String, Symbol, nil] "portrait" or "landscape" (or :portrait, :landscape).
|
|
1070
771
|
# @param paper_size [Integer, nil] Paper size index (e.g. 9 for A4, 1 for Letter).
|
|
1071
772
|
# @param opts [Hash] Additional options (scale, fit_to_width, fit_to_height).
|
|
1072
|
-
# @return [void]
|
|
773
|
+
# @return [Elements::PageSetup, void]
|
|
1073
774
|
# @api public
|
|
1074
|
-
# : (
|
|
1075
|
-
|
|
775
|
+
# : () -> Elements::PageSetup
|
|
776
|
+
# : (**untyped opts) -> void
|
|
777
|
+
def page_setup: () -> Elements::PageSetup
|
|
778
|
+
| (**untyped opts) -> void
|
|
1076
779
|
|
|
1077
780
|
# Sets page setup configuration.
|
|
1078
781
|
#
|
|
1079
782
|
# @param opts [Hash, Elements::PageSetup]
|
|
1080
783
|
# @return [void]
|
|
1081
784
|
# @api public
|
|
1082
|
-
# : (untyped opts) -> void
|
|
1083
|
-
def page_setup=: (untyped opts) -> void
|
|
785
|
+
# : (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
786
|
+
def page_setup=: (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
1084
787
|
|
|
1085
|
-
# Configures header and footer text for printing.
|
|
788
|
+
# Configures or queries header and footer text for printing (<headerFooter>).
|
|
789
|
+
#
|
|
790
|
+
# When called with no arguments, returns the {Elements::HeaderFooter} value object.
|
|
791
|
+
# When called with keyword arguments, updates headers and footers and returns nil.
|
|
1086
792
|
#
|
|
1087
793
|
# @param opts [Hash] Header and footer specifications.
|
|
1088
|
-
# @return [void]
|
|
794
|
+
# @return [Elements::HeaderFooter, void]
|
|
1089
795
|
# @api public
|
|
796
|
+
# : () -> Elements::HeaderFooter
|
|
1090
797
|
# : (**untyped opts) -> void
|
|
1091
|
-
def header_footer: (
|
|
798
|
+
def header_footer: () -> Elements::HeaderFooter
|
|
799
|
+
| (**untyped opts) -> void
|
|
1092
800
|
|
|
1093
801
|
# Sets header and footer configuration.
|
|
1094
802
|
#
|
|
1095
803
|
# @param opts [Hash, Elements::HeaderFooter]
|
|
1096
804
|
# @return [void]
|
|
1097
805
|
# @api public
|
|
1098
|
-
# : (untyped opts) -> void
|
|
1099
|
-
def header_footer=: (untyped opts) -> void
|
|
806
|
+
# : (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
807
|
+
def header_footer=: (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
1100
808
|
|
|
1101
|
-
# Configures print options (e.g. gridlines, headings).
|
|
809
|
+
# Configures or gets print options (e.g. gridlines, headings).
|
|
810
|
+
# Configures or queries print options.
|
|
1102
811
|
#
|
|
1103
|
-
# @param name [Symbol, String, Hash, nil] Print option name or hash.
|
|
1104
|
-
# @param value [Object, nil] Print option value.
|
|
1105
812
|
# @param opts [Hash] Additional options.
|
|
1106
|
-
# @return [void]
|
|
813
|
+
# @return [Elements::PrintOptions, void]
|
|
1107
814
|
# @api public
|
|
1108
|
-
# : (
|
|
1109
|
-
|
|
815
|
+
# : () -> Elements::PrintOptions
|
|
816
|
+
# : (**untyped opts) -> void
|
|
817
|
+
def print_options: () -> Elements::PrintOptions
|
|
818
|
+
| (**untyped opts) -> void
|
|
1110
819
|
|
|
1111
820
|
# Replaces print options.
|
|
1112
821
|
# @param opts [Hash, Elements::PrintOptions]
|
|
@@ -1115,115 +824,72 @@ module Xlsxrb
|
|
|
1115
824
|
# : (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1116
825
|
def print_options=: (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1117
826
|
|
|
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.
|
|
827
|
+
# Sets or queries sheet-level protection with optional password hashing (<sheetProtection>).
|
|
1133
828
|
#
|
|
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.
|
|
829
|
+
# When called with no arguments, returns the {Elements::SheetProtection} value object or nil.
|
|
830
|
+
# When called with keyword arguments, sets sheet protection and returns nil.
|
|
1142
831
|
#
|
|
1143
832
|
# @param opts [Hash] Protection options.
|
|
1144
|
-
# @return [void]
|
|
833
|
+
# @return [Elements::SheetProtection, nil, void]
|
|
1145
834
|
# @api public
|
|
835
|
+
# : () -> Elements::SheetProtection?
|
|
1146
836
|
# : (**untyped opts) -> void
|
|
1147
|
-
def sheet_protection: (
|
|
837
|
+
def sheet_protection: () -> Elements::SheetProtection?
|
|
838
|
+
| (**untyped opts) -> void
|
|
1148
839
|
|
|
1149
840
|
# Sets or clears sheet protection configuration.
|
|
1150
841
|
#
|
|
1151
842
|
# @param opts [Elements::SheetProtection, Hash, Boolean, nil]
|
|
1152
843
|
# @return [void]
|
|
1153
844
|
# @api public
|
|
1154
|
-
# : (untyped opts) -> void
|
|
1155
|
-
def sheet_protection=: (untyped opts) -> void
|
|
845
|
+
# : (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
846
|
+
def sheet_protection=: (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
1156
847
|
|
|
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.
|
|
848
|
+
# Returns column configurations defined for this worksheet.
|
|
1164
849
|
#
|
|
1165
|
-
# @
|
|
1166
|
-
# @param value [String, Integer, Float, Boolean, Time] Property value.
|
|
1167
|
-
# @param type [Symbol] Value type.
|
|
1168
|
-
# @return [void]
|
|
850
|
+
# @return [Array<Elements::Column>]
|
|
1169
851
|
# @api public
|
|
1170
|
-
# : (
|
|
1171
|
-
def
|
|
852
|
+
# : () -> Array[Elements::Column]
|
|
853
|
+
def columns: () -> Array[Elements::Column]
|
|
1172
854
|
|
|
1173
855
|
# Inserts an image into the sheet.
|
|
1174
856
|
#
|
|
1175
857
|
# @param file_data [String] Binary image data or file content.
|
|
1176
858
|
# @param ext [String] Image extension ("png", "jpeg", etc.).
|
|
1177
859
|
# @param from_column [Integer, nil] Starting column index (0-based).
|
|
1178
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
1179
860
|
# @param from_row [Integer] Starting row index (0-based).
|
|
1180
861
|
# @param to_column [Integer, nil] Ending column index (0-based).
|
|
1181
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
1182
862
|
# @param to_row [Integer] Ending row index (0-based).
|
|
1183
863
|
# @param opts [Hash] Additional anchor and sizing options.
|
|
1184
864
|
# @return [void]
|
|
1185
865
|
# @api public
|
|
1186
|
-
# : (String file_data, ?ext: String, ?from_column: Integer?, ?
|
|
1187
|
-
def image: (String file_data, ?ext: String, ?from_column: Integer?, ?
|
|
866
|
+
# : (String file_data, ?ext: String, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
867
|
+
def image: (String file_data, ?ext: String, ?from_column: Integer?, ?from_row: Integer, ?to_column: Integer?, ?to_row: Integer, **untyped opts) -> void
|
|
1188
868
|
|
|
1189
|
-
#
|
|
1190
|
-
#
|
|
1191
|
-
# @example Set background image from binary data
|
|
1192
|
-
# sheet.background_image(png_bytes, ext: "png")
|
|
869
|
+
# Gets the worksheet background image (<picture>).
|
|
1193
870
|
#
|
|
1194
|
-
# @
|
|
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]
|
|
871
|
+
# @return [Elements::BackgroundImage, nil]
|
|
1199
872
|
# @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
|
|
873
|
+
# : () -> Elements::BackgroundImage?
|
|
874
|
+
def background_image: () -> Elements::BackgroundImage?
|
|
1208
875
|
|
|
876
|
+
# Sets the worksheet background image (<picture>).
|
|
877
|
+
#
|
|
878
|
+
# @param val [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
879
|
+
# @return [untyped]
|
|
880
|
+
# @api public
|
|
1209
881
|
# : (untyped val) -> untyped
|
|
1210
882
|
def background_image=: (untyped val) -> untyped
|
|
1211
883
|
|
|
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).
|
|
884
|
+
# Configures or gets sheet view settings (zoom scale, grid lines visibility).
|
|
1219
885
|
#
|
|
1220
|
-
# @param name [Symbol, String, Hash, nil] View setting name or hash.
|
|
1221
|
-
# @param value [Object, nil] View setting value.
|
|
1222
886
|
# @param opts [Hash] Additional options.
|
|
1223
|
-
# @return [void]
|
|
887
|
+
# @return [Elements::SheetView, void]
|
|
1224
888
|
# @api public
|
|
1225
|
-
# : (
|
|
1226
|
-
|
|
889
|
+
# : () -> Elements::SheetView
|
|
890
|
+
# : (**untyped opts) -> void
|
|
891
|
+
def sheet_view: () -> Elements::SheetView
|
|
892
|
+
| (**untyped opts) -> void
|
|
1227
893
|
|
|
1228
894
|
# Replaces sheet view properties.
|
|
1229
895
|
# @param opts [Hash, Elements::SheetView]
|
|
@@ -1232,15 +898,15 @@ module Xlsxrb
|
|
|
1232
898
|
# : (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
1233
899
|
def sheet_view=: (Hash[Symbol, untyped] | Elements::SheetView opts) -> void
|
|
1234
900
|
|
|
1235
|
-
# Configures sheet format properties (e.g. default_row_height,
|
|
901
|
+
# Configures or gets sheet format properties (e.g. default_row_height, default_column_width).
|
|
1236
902
|
#
|
|
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
903
|
# @param opts [Hash] Keyword arguments for sheet format properties.
|
|
1240
|
-
# @return [
|
|
904
|
+
# @return [Elements::SheetFormat, void]
|
|
1241
905
|
# @api public
|
|
1242
|
-
# : (
|
|
1243
|
-
|
|
906
|
+
# : () -> Elements::SheetFormat
|
|
907
|
+
# : (**untyped opts) -> void
|
|
908
|
+
def sheet_format: () -> Elements::SheetFormat
|
|
909
|
+
| (**untyped opts) -> void
|
|
1244
910
|
|
|
1245
911
|
# Replaces sheet format properties.
|
|
1246
912
|
# @param opts [Hash, Elements::SheetFormat]
|
|
@@ -1259,10 +925,6 @@ module Xlsxrb
|
|
|
1259
925
|
# : (Integer row_index) -> void
|
|
1260
926
|
def row_break: (Integer row_index) -> void
|
|
1261
927
|
|
|
1262
|
-
# @deprecated Use {#row_break} instead.
|
|
1263
|
-
# : (Integer row_num) -> void
|
|
1264
|
-
def page_break_row: (Integer row_num) -> void
|
|
1265
|
-
|
|
1266
928
|
# simplecov:disable
|
|
1267
929
|
# Edge case / untested delegation block
|
|
1268
930
|
# Adds a vertical page break after the given column.
|
|
@@ -1273,10 +935,6 @@ module Xlsxrb
|
|
|
1273
935
|
# : (Integer | String | Symbol col) -> void
|
|
1274
936
|
def column_break: (Integer | String | Symbol col) -> void
|
|
1275
937
|
|
|
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
938
|
# Adds a protected range to the sheet.
|
|
1281
939
|
#
|
|
1282
940
|
# @param name [String] Name of the protected range.
|
|
@@ -1288,9 +946,6 @@ module Xlsxrb
|
|
|
1288
946
|
# : (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
1289
947
|
def protected_range: (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
1290
948
|
|
|
1291
|
-
# @deprecated Use {#protected_range} instead. Will be removed in 0.2.0.
|
|
1292
|
-
alias add_protected_range protected_range
|
|
1293
|
-
|
|
1294
949
|
# Adds a cell watch to the sheet.
|
|
1295
950
|
#
|
|
1296
951
|
# @param ref [String] Cell reference (e.g. "A1").
|
|
@@ -1299,9 +954,6 @@ module Xlsxrb
|
|
|
1299
954
|
# : (String ref) -> void
|
|
1300
955
|
def cell_watch: (String ref) -> void
|
|
1301
956
|
|
|
1302
|
-
# @deprecated Use {#cell_watch} instead. Will be removed in 0.2.0.
|
|
1303
|
-
alias add_cell_watch cell_watch
|
|
1304
|
-
|
|
1305
957
|
# Adds an ignored error entry to the sheet.
|
|
1306
958
|
#
|
|
1307
959
|
# @param sqref [String] Cell range reference (e.g. "A1" or "A1:B10").
|
|
@@ -1311,30 +963,19 @@ module Xlsxrb
|
|
|
1311
963
|
# : (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
964
|
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
965
|
|
|
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
966
|
# Returns the ignored error entries configured for this sheet.
|
|
1323
967
|
#
|
|
1324
|
-
# @return [Array<
|
|
968
|
+
# @return [Array<Elements::IgnoredError>]
|
|
1325
969
|
# @api public
|
|
1326
|
-
# : () -> Array[
|
|
1327
|
-
def ignored_errors: () -> Array[
|
|
970
|
+
# : () -> Array[Elements::IgnoredError]
|
|
971
|
+
def ignored_errors: () -> Array[Elements::IgnoredError]
|
|
1328
972
|
|
|
1329
|
-
# Gets
|
|
973
|
+
# Gets phonetic (furigana) guide properties for the sheet.
|
|
1330
974
|
#
|
|
1331
|
-
# @
|
|
975
|
+
# @return [Elements::PhoneticProperties, nil]
|
|
1332
976
|
# @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
|
|
977
|
+
# : () -> Elements::PhoneticProperties?
|
|
978
|
+
def phonetic_properties: () -> Elements::PhoneticProperties?
|
|
1338
979
|
|
|
1339
980
|
# Sets phonetic (furigana) guide properties for the sheet.
|
|
1340
981
|
#
|
|
@@ -1344,17 +985,12 @@ module Xlsxrb
|
|
|
1344
985
|
# : (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
1345
986
|
def phonetic_properties=: (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
1346
987
|
|
|
1347
|
-
#
|
|
1348
|
-
alias phonetic_pr= phonetic_properties=
|
|
1349
|
-
|
|
1350
|
-
# Sets or gets the internal code name of the worksheet.
|
|
988
|
+
# Gets the internal code name of the worksheet.
|
|
1351
989
|
#
|
|
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
990
|
# @return [String, nil]
|
|
1355
991
|
# @api public
|
|
1356
|
-
# : (
|
|
1357
|
-
def code_name: (
|
|
992
|
+
# : () -> String?
|
|
993
|
+
def code_name: () -> String?
|
|
1358
994
|
|
|
1359
995
|
# Sets the internal code name of the worksheet.
|
|
1360
996
|
#
|
|
@@ -1364,19 +1000,8 @@ module Xlsxrb
|
|
|
1364
1000
|
# : (String | Symbol | nil val) -> String?
|
|
1365
1001
|
def code_name=: (String | Symbol | nil val) -> String?
|
|
1366
1002
|
|
|
1367
|
-
#
|
|
1368
|
-
# When enabled, optionally sets fit_to_width and/or fit_to_height on page_setup.
|
|
1003
|
+
# Returns whether page setup fits content to page width/height.
|
|
1369
1004
|
#
|
|
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
1005
|
# @return [Boolean]
|
|
1381
1006
|
# @api public
|
|
1382
1007
|
# : () -> bool
|
|
@@ -1387,18 +1012,15 @@ module Xlsxrb
|
|
|
1387
1012
|
# @param enabled [Boolean, nil] Whether to fit to page.
|
|
1388
1013
|
# @return [Boolean]
|
|
1389
1014
|
# @api public
|
|
1390
|
-
# : (bool? enabled) -> bool
|
|
1015
|
+
# : (bool? enabled) -> bool??
|
|
1391
1016
|
def fit_to_page=: (bool? enabled) -> bool?
|
|
1392
1017
|
|
|
1393
|
-
#
|
|
1018
|
+
# Gets worksheet calculation properties (<sheetCalcPr>).
|
|
1394
1019
|
#
|
|
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]
|
|
1020
|
+
# @return [Elements::SheetCalcProperties, nil]
|
|
1399
1021
|
# @api public
|
|
1400
|
-
# : (
|
|
1401
|
-
def sheet_calc_properties: (
|
|
1022
|
+
# : () -> Elements::SheetCalcProperties?
|
|
1023
|
+
def sheet_calc_properties: () -> Elements::SheetCalcProperties?
|
|
1402
1024
|
|
|
1403
1025
|
# Sets worksheet calculation properties (<sheetCalcPr>).
|
|
1404
1026
|
#
|
|
@@ -1407,22 +1029,6 @@ module Xlsxrb
|
|
|
1407
1029
|
# @api public
|
|
1408
1030
|
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1409
1031
|
def sheet_calc_properties=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
1410
|
-
|
|
1411
|
-
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
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)
|
|
1414
|
-
|
|
1415
|
-
# @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
|
|
1416
|
-
# : (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
1417
|
-
def calc_pr: (?Hash[Symbol, untyped]? spec, ?full_calc_on_load: bool?, **untyped opts) -> (Elements::SheetCalcProperties | Hash[Symbol, untyped] | nil)
|
|
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]?
|
|
1426
1032
|
end
|
|
1427
1033
|
|
|
1428
1034
|
# Returns the list of worksheet names created in this workbook so far.
|
|
@@ -1436,16 +1042,15 @@ module Xlsxrb
|
|
|
1436
1042
|
#
|
|
1437
1043
|
# @param name [String, nil] Sheet name (max 31 characters).
|
|
1438
1044
|
# @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.
|
|
1045
|
+
# @param tab_color [String, Hash, Symbol, nil] Tab color hex string (e.g. "FF0000") or hash options.
|
|
1046
|
+
# @param code_name [String, Symbol, nil] Internal VBA code name of the sheet.
|
|
1442
1047
|
# @param opts [Hash] Sheet-level configuration.
|
|
1443
1048
|
# @yield [sheet_proxy]
|
|
1444
1049
|
# @yieldparam sheet_proxy [WorksheetProxy] The streaming sheet proxy.
|
|
1445
1050
|
# @return [String] The sheet name.
|
|
1446
1051
|
# @api public
|
|
1447
|
-
# : (?String? name, ?state:
|
|
1448
|
-
def sheet: (?String? name, ?state:
|
|
1052
|
+
# : (?String? name, ?state: Symbol | String | nil, ?tab_color: String | Hash[Symbol, untyped] | Symbol | nil, ?code_name: String | Symbol | nil, **untyped opts) ?{ (WorksheetProxy) -> void } -> String
|
|
1053
|
+
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
|
|
1449
1054
|
|
|
1450
1055
|
# Returns a WorksheetProxy for the current or named sheet.
|
|
1451
1056
|
#
|
|
@@ -1476,15 +1081,10 @@ module Xlsxrb
|
|
|
1476
1081
|
# @param custom_height [Boolean] Whether custom row height is set.
|
|
1477
1082
|
# @param outline_level [Integer, nil] Grouping/outline level (0 - 7).
|
|
1478
1083
|
# @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
1084
|
# @return [void]
|
|
1482
1085
|
# @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
|
|
1086
|
+
# : (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
|
|
1087
|
+
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
1088
|
|
|
1489
1089
|
# Appends a row to the worksheet and returns self for chaining.
|
|
1490
1090
|
#
|
|
@@ -1499,9 +1099,6 @@ module Xlsxrb
|
|
|
1499
1099
|
|
|
1500
1100
|
# Advances the row cursor by count without writing empty row elements.
|
|
1501
1101
|
#
|
|
1502
|
-
# @example Skip one row
|
|
1503
|
-
# w.skip_row
|
|
1504
|
-
#
|
|
1505
1102
|
# @example Skip multiple rows
|
|
1506
1103
|
# w.skip_rows(3)
|
|
1507
1104
|
#
|
|
@@ -1511,9 +1108,6 @@ module Xlsxrb
|
|
|
1511
1108
|
# : (?Integer count) -> void
|
|
1512
1109
|
def skip_rows: (?Integer count) -> void
|
|
1513
1110
|
|
|
1514
|
-
# @deprecated Use {#skip_rows} instead. Will be removed in 0.2.0.
|
|
1515
|
-
alias skip_row skip_rows
|
|
1516
|
-
|
|
1517
1111
|
# Sets column formatting and properties for one or multiple columns.
|
|
1518
1112
|
#
|
|
1519
1113
|
# @param index [Integer, String, Symbol, Range, Array] Column index (0-based), letter ("A", :A), range, or array.
|
|
@@ -1529,7 +1123,7 @@ module Xlsxrb
|
|
|
1529
1123
|
# : (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
1124
|
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
1125
|
|
|
1532
|
-
# Returns column configurations defined for the
|
|
1126
|
+
# Returns column configurations defined for the active worksheet.
|
|
1533
1127
|
#
|
|
1534
1128
|
# @return [Array<Elements::Column>]
|
|
1535
1129
|
# @api public
|
|
@@ -1555,15 +1149,6 @@ module Xlsxrb
|
|
|
1555
1149
|
# : (Integer | String | Range[Integer | String] | Array[Integer | String] index, ?level: Integer, ?collapsed: bool, ?hidden: bool, ?width: Float | Integer | nil, ?style: untyped) -> void
|
|
1556
1150
|
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
1151
|
|
|
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
1152
|
# Groups multiple rows with outline hierarchy with a block.
|
|
1568
1153
|
#
|
|
1569
1154
|
# @example Group rows with a block
|
|
@@ -1582,10 +1167,10 @@ module Xlsxrb
|
|
|
1582
1167
|
# : (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
1583
1168
|
def group_rows: (?untyped rows, ?level: Integer, ?collapsed: bool, ?hidden: bool) ?{ (self) -> void } -> void
|
|
1584
1169
|
|
|
1585
|
-
#
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
#
|
|
1170
|
+
# Configures or queries worksheet-level outline and grouping view properties.
|
|
1171
|
+
#
|
|
1172
|
+
# When called with no arguments, returns the outline properties Hash.
|
|
1173
|
+
# When called with arguments, updates outline properties and returns nil.
|
|
1589
1174
|
#
|
|
1590
1175
|
# @example Show summary row below detail rows
|
|
1591
1176
|
# sheet.outline_properties(summary_below: true, summary_right: true)
|
|
@@ -1593,16 +1178,14 @@ module Xlsxrb
|
|
|
1593
1178
|
# @param summary_below [Boolean, nil] Flag indicating if summary rows appear below detail rows.
|
|
1594
1179
|
# @param summary_right [Boolean, nil] Flag indicating if summary columns appear to the right of detail columns.
|
|
1595
1180
|
# @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
1181
|
# @param apply_styles [Boolean, nil] Flag indicating whether automatic styles apply to outlines.
|
|
1598
1182
|
# @param opts [Hash] Additional options.
|
|
1599
1183
|
# @return [Hash<Symbol, untyped>, void]
|
|
1600
1184
|
# @api public
|
|
1601
|
-
# : (
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
alias outline_pr outline_properties
|
|
1185
|
+
# : () -> Hash[Symbol, untyped]
|
|
1186
|
+
# : (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
1187
|
+
def outline_properties: () -> Hash[Symbol, untyped]
|
|
1188
|
+
| (?summary_below: bool?, ?summary_right: bool?, ?show_outline_symbols: bool?, ?apply_styles: bool?, **untyped opts) -> void
|
|
1606
1189
|
|
|
1607
1190
|
# Sets worksheet outline and grouping view properties.
|
|
1608
1191
|
#
|
|
@@ -1612,8 +1195,6 @@ module Xlsxrb
|
|
|
1612
1195
|
# : (Hash[Symbol, untyped] opts) -> void
|
|
1613
1196
|
def outline_properties=: (Hash[Symbol, untyped] opts) -> void
|
|
1614
1197
|
|
|
1615
|
-
alias outline_pr= outline_properties=
|
|
1616
|
-
|
|
1617
1198
|
# Adds a chart to the current worksheet.
|
|
1618
1199
|
#
|
|
1619
1200
|
# @param type [Symbol, String, nil] Optional chart type (e.g. :bar, :line).
|
|
@@ -1637,13 +1218,12 @@ module Xlsxrb
|
|
|
1637
1218
|
# : (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
1638
1219
|
def hyperlink: (String | Integer cell, ?(String | Elements::Hyperlink)? url, ?display: String?, ?tooltip: String?, ?location: String?) -> void
|
|
1639
1220
|
|
|
1640
|
-
#
|
|
1221
|
+
# Returns the auto-filter range on the active sheet, or nil if none.
|
|
1641
1222
|
#
|
|
1642
|
-
# @
|
|
1643
|
-
# @return [void]
|
|
1223
|
+
# @return [String, nil]
|
|
1644
1224
|
# @api public
|
|
1645
|
-
# : (
|
|
1646
|
-
def auto_filter: (
|
|
1225
|
+
# : () -> String?
|
|
1226
|
+
def auto_filter: () -> String?
|
|
1647
1227
|
|
|
1648
1228
|
# Sets the auto-filter range for the current worksheet.
|
|
1649
1229
|
#
|
|
@@ -1665,26 +1245,33 @@ module Xlsxrb
|
|
|
1665
1245
|
# @param filter [Hash] Filter definition.
|
|
1666
1246
|
# @return [void]
|
|
1667
1247
|
# @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
|
|
1248
|
+
# : (Integer | String | Symbol col_id, (Hash[untyped, untyped] | Array[untyped]) filter) -> void
|
|
1249
|
+
def filter_column: (Integer | String | Symbol col_id, Hash[untyped, untyped] | Array[untyped] filter) -> void
|
|
1670
1250
|
|
|
1671
|
-
# Configures column sort state on the active sheet.
|
|
1251
|
+
# Configures or queries column sort state on the active sheet.
|
|
1252
|
+
#
|
|
1253
|
+
# When called with no arguments, returns the {Elements::SortState} value object.
|
|
1254
|
+
# When called with arguments, updates sort state and returns nil.
|
|
1672
1255
|
#
|
|
1673
|
-
# @param ref [String] The sorted range.
|
|
1674
|
-
# @param sort_conditions [Array<Hash
|
|
1256
|
+
# @param ref [String, nil] The sorted range.
|
|
1257
|
+
# @param sort_conditions [Array<Hash>, nil] Sort conditions.
|
|
1258
|
+
# @param case_sensitive [Boolean] Whether sorting is case sensitive.
|
|
1259
|
+
# @param sort_method [String, nil] Sort method.
|
|
1675
1260
|
# @param opts [Hash] Additional options.
|
|
1676
|
-
# @return [Elements::SortState,
|
|
1261
|
+
# @return [Elements::SortState, nil, void]
|
|
1677
1262
|
# @api public
|
|
1678
|
-
# : (
|
|
1679
|
-
|
|
1263
|
+
# : () -> Elements::SortState?
|
|
1264
|
+
# : (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, ?case_sensitive: bool, ?sort_method: String?, **untyped opts) -> void
|
|
1265
|
+
def sort_state: () -> Elements::SortState?
|
|
1266
|
+
| (?String? ref, ?Array[Hash[untyped, untyped]]? sort_conditions, ?case_sensitive: bool, ?sort_method: String?, **untyped opts) -> void
|
|
1680
1267
|
|
|
1681
|
-
# Sets column sort state
|
|
1268
|
+
# Sets column sort state on the active sheet.
|
|
1682
1269
|
#
|
|
1683
1270
|
# @param opts [Elements::SortState, Hash, nil] Sort state options.
|
|
1684
1271
|
# @return [void]
|
|
1685
1272
|
# @api public
|
|
1686
|
-
# : (untyped opts) -> void
|
|
1687
|
-
def sort_state=: (untyped opts) -> void
|
|
1273
|
+
# : (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
1274
|
+
def sort_state=: (Elements::SortState | Hash[Symbol, untyped] | nil opts) -> void
|
|
1688
1275
|
|
|
1689
1276
|
# Adds a data validation rule.
|
|
1690
1277
|
#
|
|
@@ -1696,10 +1283,6 @@ module Xlsxrb
|
|
|
1696
1283
|
# : (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1697
1284
|
def data_validation: (?String? sqref, **untyped opts) ?{ (DataValidationBuilder) -> void } -> void
|
|
1698
1285
|
|
|
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
1286
|
# Adds a conditional formatting rule.
|
|
1704
1287
|
# Supports block configuration via {ConditionalFormatBuilder} and coordinate targeting (:columns, :rows).
|
|
1705
1288
|
#
|
|
@@ -1732,35 +1315,34 @@ module Xlsxrb
|
|
|
1732
1315
|
# @param source_ref [String] Source data range.
|
|
1733
1316
|
# @param row_fields [Array<Integer>] 0-based field indices for rows.
|
|
1734
1317
|
# @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.
|
|
1318
|
+
# @param column_fields [Array<Integer>, nil] 0-based field indices for columns.
|
|
1319
|
+
# @param ref [String, nil] Top-left destination cell (default: "E1").
|
|
1739
1320
|
# @param name [String, nil] Pivot table name.
|
|
1740
1321
|
# @param field_names [Array<String>, nil] Override field names.
|
|
1741
|
-
# @param items [Array, nil] Items
|
|
1322
|
+
# @param items [Hash{Integer => Array}, nil] Items of each field, by 0-based field index.
|
|
1742
1323
|
# @param opts [Hash] Additional options.
|
|
1743
1324
|
# @return [void]
|
|
1744
1325
|
# @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, ?
|
|
1326
|
+
# : (untyped source_ref, row_fields: untyped, data_fields: untyped, ?column_fields: untyped, ?ref: untyped, ?name: untyped, ?field_names: untyped, ?items: untyped, **untyped opts) -> void
|
|
1327
|
+
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
1328
|
|
|
1748
1329
|
# Adds a comment to a cell.
|
|
1749
1330
|
#
|
|
1750
1331
|
# @param cell [String, Integer] Cell coordinate (e.g. "A1").
|
|
1751
1332
|
# @param text [String] Comment text.
|
|
1752
1333
|
# @param author [String] Author name.
|
|
1334
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover.
|
|
1753
1335
|
# @return [void]
|
|
1754
1336
|
# @api public
|
|
1755
|
-
# : (String | Integer cell, String text, ?author: ::String) -> void
|
|
1756
|
-
def comment: (String | Integer cell, String text, ?author: ::String) -> void
|
|
1337
|
+
# : (String | Integer cell, String text, ?author: ::String, ?visible: bool) -> void
|
|
1338
|
+
def comment: (String | Integer cell, String text, ?author: ::String, ?visible: bool) -> void
|
|
1757
1339
|
|
|
1758
1340
|
# Adds a threaded comment to a cell.
|
|
1759
1341
|
#
|
|
1760
1342
|
# @param cell [String, Integer] Cell coordinate (e.g. "A1").
|
|
1761
1343
|
# @param text [String] Comment text.
|
|
1762
1344
|
# @param author [String] Author name.
|
|
1763
|
-
# @param timestamp [String, Time, nil] Optional ISO 8601 timestamp.
|
|
1345
|
+
# @param visible [Boolean] Whether the comment is always shown instead of on hover. # @param timestamp [String, Time, nil] Optional ISO 8601 timestamp.
|
|
1764
1346
|
# @param id [String, nil] Optional GUID for this comment.
|
|
1765
1347
|
# @param parent_id [String, nil] Optional parent comment GUID for replies.
|
|
1766
1348
|
# @param done [Boolean, nil] Optional resolved flag.
|
|
@@ -1771,9 +1353,6 @@ module Xlsxrb
|
|
|
1771
1353
|
# : (String | Integer cell, String text, ?author: untyped, ?timestamp: untyped, ?id: String?, ?parent_id: String?, ?done: bool?, ?user_id: String?, ?provider_id: String?) -> void
|
|
1772
1354
|
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
1355
|
|
|
1774
|
-
# @deprecated Use {#threaded_comment} instead. Will be removed in 0.2.0.
|
|
1775
|
-
alias add_threaded_comment threaded_comment
|
|
1776
|
-
|
|
1777
1356
|
# Adds a sparkline group.
|
|
1778
1357
|
#
|
|
1779
1358
|
# @param sparklines [Array<Hash>] Sparkline definitions.
|
|
@@ -1784,107 +1363,92 @@ module Xlsxrb
|
|
|
1784
1363
|
# : (sparklines: untyped, ?type: untyped, **untyped opts) -> void
|
|
1785
1364
|
def sparkline_group: (sparklines: untyped, ?type: untyped, **untyped opts) -> void
|
|
1786
1365
|
|
|
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
1366
|
# Merges a range of cells into a single cell.
|
|
1809
1367
|
#
|
|
1810
1368
|
# @example
|
|
1811
1369
|
# sheet.merge("A1:C1")
|
|
1812
1370
|
#
|
|
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.
|
|
1371
|
+
# @param range [String] Cell range (e.g. "A1:B2").
|
|
1820
1372
|
# @return [void]
|
|
1821
1373
|
# @api public
|
|
1822
|
-
# : (
|
|
1823
|
-
def merge: (
|
|
1374
|
+
# : (String range) -> void
|
|
1375
|
+
def merge: (String range) -> void
|
|
1824
1376
|
|
|
1825
|
-
#
|
|
1377
|
+
# Configures or queries freeze panes (<pane state="frozen">).
|
|
1378
|
+
#
|
|
1379
|
+
# When called with no arguments, returns the {Elements::FreezePane} value object or nil.
|
|
1380
|
+
# When called with arguments, configures the freeze pane and returns nil.
|
|
1826
1381
|
#
|
|
1827
1382
|
# @param row [Integer, nil] Number of rows to freeze.
|
|
1828
1383
|
# @param column [Integer, String, nil] Number of columns to freeze.
|
|
1829
|
-
# @param
|
|
1830
|
-
# @
|
|
1384
|
+
# @param top_left_cell [String, nil] Top-left cell reference in bottom-right pane.
|
|
1385
|
+
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
1386
|
+
# @return [Elements::FreezePane, nil, void]
|
|
1831
1387
|
# @api public
|
|
1832
|
-
# : (
|
|
1833
|
-
|
|
1388
|
+
# : () -> Elements::FreezePane?
|
|
1389
|
+
# : (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1390
|
+
def freeze_pane: () -> Elements::FreezePane?
|
|
1391
|
+
| (?row: Integer | nil, ?column: (Integer | String)?, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1834
1392
|
|
|
1835
1393
|
# Sets or clears freeze pane configuration.
|
|
1836
1394
|
#
|
|
1837
1395
|
# @param opts [Elements::FreezePane, Hash, nil] Freeze pane options.
|
|
1838
1396
|
# @return [void]
|
|
1839
1397
|
# @api public
|
|
1840
|
-
# : (untyped opts) -> void
|
|
1841
|
-
def freeze_pane=: (untyped opts) -> void
|
|
1398
|
+
# : (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1399
|
+
def freeze_pane=: (Elements::FreezePane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1842
1400
|
|
|
1843
|
-
# Splits window panes without freezing or queries split pane settings.
|
|
1401
|
+
# Splits window panes without freezing or queries split pane settings (<pane>).
|
|
1402
|
+
#
|
|
1403
|
+
# When called with no arguments, returns the {Elements::SplitPane} value object or nil.
|
|
1404
|
+
# When called with arguments, configures the split pane and returns nil.
|
|
1844
1405
|
#
|
|
1845
1406
|
# @param x_split [Integer, nil] Horizontal split in points.
|
|
1846
1407
|
# @param y_split [Integer, nil] Vertical split in points.
|
|
1847
1408
|
# @param top_left_cell [String, nil] Top-left cell reference in bottom-right pane.
|
|
1848
1409
|
# @param active_pane [String, Symbol, nil] Active pane identifier.
|
|
1849
1410
|
# @param state [String, Symbol, nil] Split state.
|
|
1850
|
-
# @return [Elements::SplitPane,
|
|
1411
|
+
# @return [Elements::SplitPane, nil, void]
|
|
1851
1412
|
# @api public
|
|
1852
|
-
# : (
|
|
1853
|
-
|
|
1413
|
+
# : () -> Elements::SplitPane?
|
|
1414
|
+
# : (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1415
|
+
def split_pane: () -> Elements::SplitPane?
|
|
1416
|
+
| (?x_split: Integer | nil, ?y_split: Integer | nil, ?top_left_cell: String?, ?active_pane: (String | Symbol)?) -> void
|
|
1854
1417
|
|
|
1855
1418
|
# Sets or clears split pane configuration.
|
|
1856
1419
|
#
|
|
1857
1420
|
# @param opts [Elements::SplitPane, Hash, nil] Split pane options.
|
|
1858
1421
|
# @return [void]
|
|
1859
1422
|
# @api public
|
|
1860
|
-
# : (untyped opts) -> void
|
|
1861
|
-
def split_pane=: (untyped opts) -> void
|
|
1423
|
+
# : (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1424
|
+
def split_pane=: (Elements::SplitPane | Hash[Symbol, untyped] | nil opts) -> void
|
|
1862
1425
|
|
|
1863
|
-
# Sets or queries the active cell selection on the current sheet.
|
|
1426
|
+
# Sets or queries the active cell selection on the current sheet (<selection>).
|
|
1427
|
+
#
|
|
1428
|
+
# When called with no arguments, returns the selection ({Elements::Selection}, Array, or nil).
|
|
1429
|
+
# When called with arguments, updates the selection and returns nil.
|
|
1864
1430
|
#
|
|
1865
1431
|
# @param active_cell [String, nil] Active cell reference (e.g. "A1") or range (e.g. "A1:D10").
|
|
1866
1432
|
# @param sqref [String, nil] Selection range.
|
|
1867
1433
|
# @param pane [String, Symbol, nil] Target pane.
|
|
1868
|
-
# @return [Elements::Selection, Array<Elements::Selection>,
|
|
1434
|
+
# @return [Elements::Selection, Array<Elements::Selection>, nil, void]
|
|
1869
1435
|
# @api public
|
|
1870
|
-
# : (
|
|
1871
|
-
|
|
1436
|
+
# : () -> (Elements::Selection | Array[Elements::Selection])?
|
|
1437
|
+
# : (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1438
|
+
def selection: () -> (Elements::Selection | Array[Elements::Selection])?
|
|
1439
|
+
| (?String? active_cell, ?sqref: String?, ?pane: (String | Symbol)?) -> void
|
|
1872
1440
|
|
|
1873
1441
|
# Sets or clears the selection configuration.
|
|
1874
1442
|
#
|
|
1875
1443
|
# @param opts [Elements::Selection, Array<Elements::Selection, Hash>, Hash, nil]
|
|
1876
1444
|
# @return [void]
|
|
1877
1445
|
# @api public
|
|
1878
|
-
# : (untyped opts) -> void
|
|
1879
|
-
def selection=: (untyped opts) -> void
|
|
1446
|
+
# : (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
1447
|
+
def selection=: (Elements::Selection | Array[Elements::Selection | Hash[Symbol, untyped]] | Hash[Symbol, untyped] | nil opts) -> void
|
|
1880
1448
|
|
|
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>).
|
|
1449
|
+
# Configures or queries page margins in inches for printing (<pageMargins>).
|
|
1886
1450
|
#
|
|
1887
|
-
# When called with no arguments, returns the
|
|
1451
|
+
# When called with no arguments, returns the {Elements::PageMargins} value object or nil.
|
|
1888
1452
|
# When called with arguments, configures page margins and returns nil.
|
|
1889
1453
|
#
|
|
1890
1454
|
# @param left [Float, nil] Left margin.
|
|
@@ -1893,69 +1457,75 @@ module Xlsxrb
|
|
|
1893
1457
|
# @param bottom [Float, nil] Bottom margin.
|
|
1894
1458
|
# @param header [Float, nil] Header margin.
|
|
1895
1459
|
# @param footer [Float, nil] Footer margin.
|
|
1896
|
-
# @return [Elements::PageMargins,
|
|
1460
|
+
# @return [Elements::PageMargins, nil, void]
|
|
1897
1461
|
# @api public
|
|
1898
|
-
# : (
|
|
1899
|
-
|
|
1462
|
+
# : () -> Elements::PageMargins?
|
|
1463
|
+
# : (?left: Float?, ?right: Float?, ?top: Float?, ?bottom: Float?, ?header: Float?, ?footer: Float?) -> void
|
|
1464
|
+
def page_margins: () -> Elements::PageMargins?
|
|
1465
|
+
| (?left: Float?, ?right: Float?, ?top: Float?, ?bottom: Float?, ?header: Float?, ?footer: Float?) -> void
|
|
1900
1466
|
|
|
1901
1467
|
# Sets or clears page margins configuration.
|
|
1902
1468
|
#
|
|
1903
1469
|
# @param opts [Hash, Elements::PageMargins, nil]
|
|
1904
1470
|
# @return [void]
|
|
1905
1471
|
# @api public
|
|
1906
|
-
# : (untyped opts) -> void
|
|
1907
|
-
def page_margins=: (untyped opts) -> void
|
|
1472
|
+
# : (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
1473
|
+
def page_margins=: (Hash[Symbol, untyped] | Elements::PageMargins | nil opts) -> void
|
|
1908
1474
|
|
|
1909
1475
|
# Configures or queries page setup configuration (<pageSetup>).
|
|
1910
1476
|
#
|
|
1911
|
-
# When called with no arguments, returns the
|
|
1477
|
+
# When called with no arguments, returns the {Elements::PageSetup} value object.
|
|
1912
1478
|
# When called with keyword arguments, updates page setup and returns nil.
|
|
1913
1479
|
#
|
|
1914
1480
|
# @param opts [Hash] Page setup options (e.g. orientation: :landscape).
|
|
1915
|
-
# @return [Elements::PageSetup,
|
|
1481
|
+
# @return [Elements::PageSetup, void]
|
|
1916
1482
|
# @api public
|
|
1917
|
-
# : (
|
|
1918
|
-
|
|
1483
|
+
# : () -> Elements::PageSetup
|
|
1484
|
+
# : (**untyped opts) -> void
|
|
1485
|
+
def page_setup: () -> Elements::PageSetup
|
|
1486
|
+
| (**untyped opts) -> void
|
|
1919
1487
|
|
|
1920
1488
|
# Sets page setup configuration.
|
|
1921
1489
|
#
|
|
1922
1490
|
# @param opts [Hash, Elements::PageSetup]
|
|
1923
1491
|
# @return [void]
|
|
1924
1492
|
# @api public
|
|
1925
|
-
# : (untyped opts) -> void
|
|
1926
|
-
def page_setup=: (untyped opts) -> void
|
|
1493
|
+
# : (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
1494
|
+
def page_setup=: (Hash[Symbol, untyped] | Elements::PageSetup opts) -> void
|
|
1927
1495
|
|
|
1928
1496
|
# Configures or queries headers and footers for printing (<headerFooter>).
|
|
1929
1497
|
#
|
|
1930
|
-
# When called with no arguments, returns the
|
|
1498
|
+
# When called with no arguments, returns the {Elements::HeaderFooter} value object.
|
|
1931
1499
|
# When called with keyword arguments, updates headers and footers and returns nil.
|
|
1932
1500
|
#
|
|
1933
1501
|
# @param opts [Hash] Header/footer options.
|
|
1934
|
-
# @return [Elements::HeaderFooter,
|
|
1502
|
+
# @return [Elements::HeaderFooter, void]
|
|
1935
1503
|
# @api public
|
|
1936
|
-
# : (
|
|
1937
|
-
|
|
1504
|
+
# : () -> Elements::HeaderFooter
|
|
1505
|
+
# : (**untyped opts) -> void
|
|
1506
|
+
def header_footer: () -> Elements::HeaderFooter
|
|
1507
|
+
| (**untyped opts) -> void
|
|
1938
1508
|
|
|
1939
1509
|
# Sets header and footer configuration.
|
|
1940
1510
|
#
|
|
1941
1511
|
# @param opts [Hash, Elements::HeaderFooter]
|
|
1942
1512
|
# @return [void]
|
|
1943
1513
|
# @api public
|
|
1944
|
-
# : (untyped opts) -> void
|
|
1945
|
-
def header_footer=: (untyped opts) -> void
|
|
1514
|
+
# : (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
1515
|
+
def header_footer=: (Hash[Symbol, untyped] | Elements::HeaderFooter opts) -> void
|
|
1946
1516
|
|
|
1947
1517
|
# Configures or queries print options (<printOptions>).
|
|
1948
1518
|
#
|
|
1949
1519
|
# When called with no arguments, returns the {Elements::PrintOptions} value object.
|
|
1950
|
-
# When called with
|
|
1520
|
+
# When called with keyword options, configures print options and returns nil.
|
|
1951
1521
|
#
|
|
1952
|
-
# @param name [Symbol, String, Hash, Elements::MetadataRecord, nil] Option name or hash/record of options.
|
|
1953
|
-
# @param value [Object, nil] Option value.
|
|
1954
1522
|
# @param opts [Hash] Additional print options.
|
|
1955
1523
|
# @return [Elements::PrintOptions, void]
|
|
1956
1524
|
# @api public
|
|
1957
|
-
# : (
|
|
1958
|
-
|
|
1525
|
+
# : () -> Elements::PrintOptions
|
|
1526
|
+
# : (**untyped opts) -> void
|
|
1527
|
+
def print_options: () -> Elements::PrintOptions
|
|
1528
|
+
| (**untyped opts) -> void
|
|
1959
1529
|
|
|
1960
1530
|
# Replaces print options with the given hash or {Elements::PrintOptions} object.
|
|
1961
1531
|
#
|
|
@@ -1965,86 +1535,63 @@ module Xlsxrb
|
|
|
1965
1535
|
# : (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1966
1536
|
def print_options=: (Hash[Symbol, untyped] | Elements::PrintOptions opts) -> void
|
|
1967
1537
|
|
|
1968
|
-
#
|
|
1538
|
+
# Sets or queries sheet-level protection with optional password hashing (<sheetProtection>).
|
|
1969
1539
|
#
|
|
1970
|
-
# When called with no arguments, returns the
|
|
1540
|
+
# When called with no arguments, returns the {Elements::SheetProtection} value object or nil.
|
|
1971
1541
|
# When called with keyword arguments, sets sheet protection and returns nil.
|
|
1972
1542
|
#
|
|
1973
1543
|
# @param opts [Hash] Protection options.
|
|
1974
|
-
# @return [Elements::SheetProtection,
|
|
1544
|
+
# @return [Elements::SheetProtection, nil, void]
|
|
1975
1545
|
# @api public
|
|
1976
|
-
# : (
|
|
1977
|
-
|
|
1546
|
+
# : () -> Elements::SheetProtection?
|
|
1547
|
+
# : (**untyped opts) -> void
|
|
1548
|
+
def sheet_protection: () -> Elements::SheetProtection?
|
|
1549
|
+
| (**untyped opts) -> void
|
|
1978
1550
|
|
|
1979
1551
|
# Sets or clears sheet protection configuration.
|
|
1980
1552
|
#
|
|
1981
1553
|
# @param opts [Elements::SheetProtection, Hash, Boolean, nil]
|
|
1982
1554
|
# @return [void]
|
|
1983
1555
|
# @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
|
|
1556
|
+
# : (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
1557
|
+
def sheet_protection=: (Elements::SheetProtection | Hash[Symbol, untyped] | bool | nil opts) -> void
|
|
1990
1558
|
|
|
1991
1559
|
# Inserts an embedded image into the active sheet.
|
|
1992
1560
|
#
|
|
1993
1561
|
# @param file_data [String] Binary image data.
|
|
1994
1562
|
# @param ext [String] File extension ("png", "jpeg", etc.).
|
|
1995
1563
|
# @param from_column [Integer, nil] Top-left starting column.
|
|
1996
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
1997
1564
|
# @param from_row [Integer] Top-left starting row.
|
|
1998
1565
|
# @param to_column [Integer, nil] Bottom-right ending column.
|
|
1999
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
2000
1566
|
# @param to_row [Integer] Bottom-right ending row.
|
|
2001
1567
|
# @param opts [Hash] Additional options.
|
|
2002
1568
|
# @return [void]
|
|
2003
1569
|
# @api public
|
|
2004
|
-
# : (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?
|
|
2005
|
-
def image: (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?
|
|
1570
|
+
# : (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?from_row: ::Integer, ?to_column: ::Integer?, ?to_row: ::Integer, **untyped opts) -> void
|
|
1571
|
+
def image: (String file_data, ?ext: ::String, ?from_column: ::Integer?, ?from_row: ::Integer, ?to_column: ::Integer?, ?to_row: ::Integer, **untyped opts) -> void
|
|
2006
1572
|
|
|
2007
|
-
#
|
|
1573
|
+
# Worksheet background image (<picture>).
|
|
2008
1574
|
#
|
|
2009
|
-
# @
|
|
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")
|
|
2014
|
-
#
|
|
2015
|
-
# @deprecated Calling with arguments is deprecated and will be removed in 0.2.0. Use {#background_image=} instead.
|
|
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]
|
|
1575
|
+
# @return [Elements::BackgroundImage, nil]
|
|
2020
1576
|
# @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
|
|
1577
|
+
# : () -> Elements::BackgroundImage?
|
|
1578
|
+
def background_image: () -> Elements::BackgroundImage?
|
|
2029
1579
|
|
|
1580
|
+
# Sets the worksheet background image (<picture>).
|
|
1581
|
+
#
|
|
1582
|
+
# @param val [String, Hash, Elements::Image, nil] Image binary data, file path, or image options hash.
|
|
1583
|
+
# @return [untyped]
|
|
1584
|
+
# @api public
|
|
2030
1585
|
# : (untyped val) -> untyped
|
|
2031
1586
|
def background_image=: (untyped val) -> untyped
|
|
2032
1587
|
|
|
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
1588
|
# Inserts a drawing shape.
|
|
2040
1589
|
#
|
|
2041
1590
|
# @param preset [String] Preset shape name.
|
|
2042
1591
|
# @param text [String, nil] Label text.
|
|
2043
1592
|
# @param from_column [Integer, nil] Top-left column.
|
|
2044
|
-
# @param from_col [Integer, nil] Deprecated alias for from_column.
|
|
2045
1593
|
# @param from_row [Integer] Top-left row.
|
|
2046
1594
|
# @param to_column [Integer, nil] Bottom-right column.
|
|
2047
|
-
# @param to_col [Integer, nil] Deprecated alias for to_column.
|
|
2048
1595
|
# @param to_row [Integer] Bottom-right row.
|
|
2049
1596
|
# @param opts [Hash] Additional options.
|
|
2050
1597
|
# @return [void]
|
|
@@ -2052,14 +1599,12 @@ module Xlsxrb
|
|
|
2052
1599
|
# : (**untyped opts) -> void
|
|
2053
1600
|
def shape: (**untyped opts) -> void
|
|
2054
1601
|
|
|
2055
|
-
# Gets
|
|
1602
|
+
# Gets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
2056
1603
|
#
|
|
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
1604
|
# @return [Symbol]
|
|
2060
1605
|
# @api public
|
|
2061
|
-
# : (
|
|
2062
|
-
def state: (
|
|
1606
|
+
# : () -> Symbol
|
|
1607
|
+
def state: () -> Symbol
|
|
2063
1608
|
|
|
2064
1609
|
# Sets the sheet visibility state (:visible, :hidden, or :very_hidden).
|
|
2065
1610
|
#
|
|
@@ -2069,15 +1614,12 @@ module Xlsxrb
|
|
|
2069
1614
|
# : (Symbol | String new_state) -> Symbol
|
|
2070
1615
|
def state=: (Symbol | String new_state) -> Symbol
|
|
2071
1616
|
|
|
2072
|
-
# Gets
|
|
1617
|
+
# Gets the tab color of the current worksheet.
|
|
2073
1618
|
#
|
|
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
1619
|
# @return [String, Hash, nil]
|
|
2078
1620
|
# @api public
|
|
2079
|
-
# : (
|
|
2080
|
-
def tab_color: (
|
|
1621
|
+
# : () -> (String | Hash[Symbol, untyped] | nil)
|
|
1622
|
+
def tab_color: () -> (String | Hash[Symbol, untyped] | nil)
|
|
2081
1623
|
|
|
2082
1624
|
# Sets the tab color of the current worksheet.
|
|
2083
1625
|
#
|
|
@@ -2087,27 +1629,18 @@ module Xlsxrb
|
|
|
2087
1629
|
# : (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
2088
1630
|
def tab_color=: (String | Symbol | Hash[Symbol, untyped] | nil spec) -> (String | Hash[Symbol, untyped] | nil)
|
|
2089
1631
|
|
|
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
1632
|
# Configures or queries sheet properties (<sheetPr>).
|
|
2100
1633
|
#
|
|
2101
1634
|
# When called with no arguments, returns the {Elements::SheetProperties} value object.
|
|
2102
|
-
# When called with
|
|
1635
|
+
# When called with keyword options, configures properties and returns nil.
|
|
2103
1636
|
#
|
|
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
1637
|
# @param opts [Hash] Additional sheet properties.
|
|
2107
1638
|
# @return [Elements::SheetProperties, void]
|
|
2108
1639
|
# @api public
|
|
2109
|
-
# : (
|
|
2110
|
-
|
|
1640
|
+
# : () -> Elements::SheetProperties
|
|
1641
|
+
# : (**untyped opts) -> void
|
|
1642
|
+
def sheet_properties: () -> Elements::SheetProperties
|
|
1643
|
+
| (**untyped opts) -> void
|
|
2111
1644
|
|
|
2112
1645
|
# Replaces worksheet properties with the given hash or {Elements::SheetProperties} object.
|
|
2113
1646
|
#
|
|
@@ -2120,15 +1653,15 @@ module Xlsxrb
|
|
|
2120
1653
|
# Configures or queries sheet view display properties (<sheetView>).
|
|
2121
1654
|
#
|
|
2122
1655
|
# When called with no arguments, returns the {Elements::SheetView} value object.
|
|
2123
|
-
# When called with
|
|
1656
|
+
# When called with keyword options, configures view properties and returns nil.
|
|
2124
1657
|
#
|
|
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
1658
|
# @param opts [Hash] Additional view properties.
|
|
2128
1659
|
# @return [Elements::SheetView, void]
|
|
2129
1660
|
# @api public
|
|
2130
|
-
# : (
|
|
2131
|
-
|
|
1661
|
+
# : () -> Elements::SheetView
|
|
1662
|
+
# : (**untyped opts) -> void
|
|
1663
|
+
def sheet_view: () -> Elements::SheetView
|
|
1664
|
+
| (**untyped opts) -> void
|
|
2132
1665
|
|
|
2133
1666
|
# Replaces sheet view properties with the given hash or {Elements::SheetView} object.
|
|
2134
1667
|
#
|
|
@@ -2141,15 +1674,15 @@ module Xlsxrb
|
|
|
2141
1674
|
# Configures or queries sheet format properties (<sheetFormatPr>).
|
|
2142
1675
|
#
|
|
2143
1676
|
# When called with no arguments, returns the {Elements::SheetFormat} value object.
|
|
2144
|
-
# When called with
|
|
1677
|
+
# When called with keyword options, configures format properties and returns nil.
|
|
2145
1678
|
#
|
|
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
1679
|
# @param opts [Hash] Keyword arguments for sheet format properties.
|
|
2149
1680
|
# @return [Elements::SheetFormat, void]
|
|
2150
1681
|
# @api public
|
|
2151
|
-
# : (
|
|
2152
|
-
|
|
1682
|
+
# : () -> Elements::SheetFormat
|
|
1683
|
+
# : (**untyped opts) -> void
|
|
1684
|
+
def sheet_format: () -> Elements::SheetFormat
|
|
1685
|
+
| (**untyped opts) -> void
|
|
2153
1686
|
|
|
2154
1687
|
# Replaces sheet format properties with the given hash or {Elements::SheetFormat} object.
|
|
2155
1688
|
#
|
|
@@ -2167,10 +1700,6 @@ module Xlsxrb
|
|
|
2167
1700
|
# : (Integer row_index) -> void
|
|
2168
1701
|
def row_break: (Integer row_index) -> void
|
|
2169
1702
|
|
|
2170
|
-
# @deprecated Use {#row_break} instead.
|
|
2171
|
-
# : (Integer row_num) -> void
|
|
2172
|
-
def page_break_row: (Integer row_num) -> void
|
|
2173
|
-
|
|
2174
1703
|
# Inserts a vertical page break after the given column.
|
|
2175
1704
|
#
|
|
2176
1705
|
# @param col [Integer, String, Symbol] 0-based column index or letter ("B", :B).
|
|
@@ -2179,10 +1708,6 @@ module Xlsxrb
|
|
|
2179
1708
|
# : (Integer | String | Symbol col) -> void
|
|
2180
1709
|
def column_break: (Integer | String | Symbol col) -> void
|
|
2181
1710
|
|
|
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
1711
|
# Adds a protected range to the current sheet.
|
|
2187
1712
|
#
|
|
2188
1713
|
# @param name [String] Name of the protected range.
|
|
@@ -2194,9 +1719,6 @@ module Xlsxrb
|
|
|
2194
1719
|
# : (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
2195
1720
|
def protected_range: (String name, String sqref, ?password: String?, **untyped opts) -> void
|
|
2196
1721
|
|
|
2197
|
-
# @deprecated Use {#protected_range} instead. Will be removed in 0.2.0.
|
|
2198
|
-
alias add_protected_range protected_range
|
|
2199
|
-
|
|
2200
1722
|
# Adds a cell watch to the current sheet.
|
|
2201
1723
|
#
|
|
2202
1724
|
# @param ref [String] Cell reference (e.g. "A1").
|
|
@@ -2205,9 +1727,6 @@ module Xlsxrb
|
|
|
2205
1727
|
# : (String ref) -> void
|
|
2206
1728
|
def cell_watch: (String ref) -> void
|
|
2207
1729
|
|
|
2208
|
-
# @deprecated Use {#cell_watch} instead. Will be removed in 0.2.0.
|
|
2209
|
-
alias add_cell_watch cell_watch
|
|
2210
|
-
|
|
2211
1730
|
# Adds an ignored error entry to the current sheet.
|
|
2212
1731
|
#
|
|
2213
1732
|
# @param sqref [String] Cell range reference (e.g. "A1" or "A1:B10").
|
|
@@ -2217,40 +1736,19 @@ module Xlsxrb
|
|
|
2217
1736
|
# : (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
1737
|
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
1738
|
|
|
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
1739
|
# Returns the ignored error entries configured for the current sheet.
|
|
2229
1740
|
#
|
|
2230
|
-
# @return [Array<
|
|
1741
|
+
# @return [Array<Elements::IgnoredError>]
|
|
2231
1742
|
# @api public
|
|
2232
|
-
# : () -> Array[
|
|
2233
|
-
def ignored_errors: () -> Array[
|
|
1743
|
+
# : () -> Array[Elements::IgnoredError]
|
|
1744
|
+
def ignored_errors: () -> Array[Elements::IgnoredError]
|
|
2234
1745
|
|
|
2235
|
-
#
|
|
1746
|
+
# Phonetic (furigana) guide properties for the current sheet.
|
|
2236
1747
|
#
|
|
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]
|
|
1748
|
+
# @return [Elements::PhoneticProperties, nil]
|
|
2248
1749
|
# @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
|
|
1750
|
+
# : () -> Elements::PhoneticProperties?
|
|
1751
|
+
def phonetic_properties: () -> Elements::PhoneticProperties?
|
|
2254
1752
|
|
|
2255
1753
|
# Sets phonetic (furigana) guide properties for the current sheet.
|
|
2256
1754
|
#
|
|
@@ -2260,17 +1758,12 @@ module Xlsxrb
|
|
|
2260
1758
|
# : (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
2261
1759
|
def phonetic_properties=: (Hash[Symbol, untyped] | Integer | nil spec) -> (Hash[Symbol, untyped] | Integer | nil)
|
|
2262
1760
|
|
|
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).
|
|
1761
|
+
# Gets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
2267
1762
|
#
|
|
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
1763
|
# @return [String, nil]
|
|
2271
1764
|
# @api public
|
|
2272
|
-
# : (
|
|
2273
|
-
def code_name: (
|
|
1765
|
+
# : () -> String?
|
|
1766
|
+
def code_name: () -> String?
|
|
2274
1767
|
|
|
2275
1768
|
# Sets the internal code name of the current worksheet (or workbook if no sheet is open).
|
|
2276
1769
|
#
|
|
@@ -2280,19 +1773,8 @@ module Xlsxrb
|
|
|
2280
1773
|
# : (String | Symbol | nil val) -> String?
|
|
2281
1774
|
def code_name=: (String | Symbol | nil val) -> String?
|
|
2282
1775
|
|
|
2283
|
-
#
|
|
2284
|
-
# When enabled, optionally sets fit_to_width and/or fit_to_height on page_setup.
|
|
1776
|
+
# Returns whether page setup fits content to page width/height for the current sheet.
|
|
2285
1777
|
#
|
|
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
1778
|
# @return [Boolean]
|
|
2297
1779
|
# @api public
|
|
2298
1780
|
# : () -> bool
|
|
@@ -2306,18 +1788,15 @@ module Xlsxrb
|
|
|
2306
1788
|
# : (bool? enabled) -> bool?
|
|
2307
1789
|
def fit_to_page=: (bool? enabled) -> bool?
|
|
2308
1790
|
|
|
2309
|
-
#
|
|
1791
|
+
# Worksheet calculation properties (<sheetCalcPr>) for the current sheet.
|
|
2310
1792
|
#
|
|
2311
1793
|
# @example Instruct Excel to recalculate formulas when loading sheet
|
|
2312
1794
|
# w.sheet_calc_properties = { full_calc_on_load: true }
|
|
2313
1795
|
#
|
|
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]
|
|
1796
|
+
# @return [Elements::SheetCalcProperties, nil]
|
|
2318
1797
|
# @api public
|
|
2319
|
-
# : (
|
|
2320
|
-
def sheet_calc_properties: (
|
|
1798
|
+
# : () -> Elements::SheetCalcProperties?
|
|
1799
|
+
def sheet_calc_properties: () -> Elements::SheetCalcProperties?
|
|
2321
1800
|
|
|
2322
1801
|
# Sets worksheet calculation properties (<sheetCalcPr>) for the current sheet.
|
|
2323
1802
|
#
|
|
@@ -2327,22 +1806,6 @@ module Xlsxrb
|
|
|
2327
1806
|
# : (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2328
1807
|
def sheet_calc_properties=: (Hash[Symbol, untyped]? spec) -> Hash[Symbol, untyped]?
|
|
2329
1808
|
|
|
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
1809
|
# Adds a defined name.
|
|
2347
1810
|
#
|
|
2348
1811
|
# @param name [String] The defined name.
|
|
@@ -2350,18 +1813,13 @@ module Xlsxrb
|
|
|
2350
1813
|
# @param sheet [String, nil] Reference sheet name.
|
|
2351
1814
|
# @param scope [String, Symbol, nil] Local scope sheet name or :workbook.
|
|
2352
1815
|
# @param hidden [Boolean] Whether the defined name is hidden.
|
|
2353
|
-
# @param column [Integer, String, nil] Deprecated alias for columns.
|
|
2354
1816
|
# @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.
|
|
1817
|
+
# @param rows [Integer, Range, nil] Row or row range (0-based) for coordinate-based reference.
|
|
2358
1818
|
# @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
1819
|
# @return [void]
|
|
2362
1820
|
# @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, ?
|
|
1821
|
+
# : (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped) -> void
|
|
1822
|
+
def defined_name: (String name, ?untyped value, ?sheet: String?, ?scope: (String | Symbol)?, ?hidden: bool, ?columns: untyped, ?rows: untyped, ?range: untyped) -> void
|
|
2365
1823
|
|
|
2366
1824
|
# Returns workbook-level defined names.
|
|
2367
1825
|
#
|
|
@@ -2370,14 +1828,13 @@ module Xlsxrb
|
|
|
2370
1828
|
# : () -> Array[Elements::DefinedName]
|
|
2371
1829
|
def defined_names: () -> Array[Elements::DefinedName]
|
|
2372
1830
|
|
|
2373
|
-
#
|
|
1831
|
+
# Returns the print area range for the current or named sheet, or nil if none.
|
|
2374
1832
|
#
|
|
2375
|
-
# @param range [String, Object, nil] Cell range (e.g. "A1:G50").
|
|
2376
1833
|
# @param sheet [String, nil] Target sheet name.
|
|
2377
|
-
# @return [String, nil
|
|
1834
|
+
# @return [String, nil]
|
|
2378
1835
|
# @api public
|
|
2379
|
-
# : (?
|
|
2380
|
-
def print_area: (?
|
|
1836
|
+
# : (?sheet: String?) -> String?
|
|
1837
|
+
def print_area: (?sheet: String?) -> String?
|
|
2381
1838
|
|
|
2382
1839
|
# Sets the print area for the current worksheet.
|
|
2383
1840
|
#
|
|
@@ -2387,16 +1844,20 @@ module Xlsxrb
|
|
|
2387
1844
|
# : (String? range) -> String?
|
|
2388
1845
|
def print_area=: (String? range) -> String?
|
|
2389
1846
|
|
|
2390
|
-
# Sets or gets print titles
|
|
1847
|
+
# Sets or gets repeating print titles (rows and/or columns) for pagination.
|
|
1848
|
+
#
|
|
1849
|
+
# When called with no row/column arguments, returns the {Elements::PrintTitles} value object or nil.
|
|
1850
|
+
# When called with row/column arguments, sets repeating print titles and returns nil.
|
|
2391
1851
|
#
|
|
2392
1852
|
# @param rows [String, Integer, Range, Object, nil] Repeating row range (e.g. "1:2" or 0-based 0..1).
|
|
2393
1853
|
# @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
1854
|
# @param sheet [String, nil] Target sheet name.
|
|
2396
1855
|
# @return [Elements::PrintTitles, nil, void]
|
|
2397
1856
|
# @api public
|
|
2398
|
-
# : (
|
|
2399
|
-
|
|
1857
|
+
# : () -> Elements::PrintTitles?
|
|
1858
|
+
# : (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?, ?sheet: String?) -> void
|
|
1859
|
+
def print_titles: () -> Elements::PrintTitles?
|
|
1860
|
+
| (?rows: (String | Integer | Range[Integer])?, ?columns: (String | Integer | Symbol | Range[untyped])?, ?sheet: String?) -> void
|
|
2400
1861
|
|
|
2401
1862
|
# Sets repeating print titles for the current worksheet.
|
|
2402
1863
|
#
|
|
@@ -2448,41 +1909,47 @@ module Xlsxrb
|
|
|
2448
1909
|
# : (untyped opts) -> void
|
|
2449
1910
|
def workbook_protection=: (untyped opts) -> void
|
|
2450
1911
|
|
|
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.
|
|
1912
|
+
# Configures or queries core document properties.
|
|
2456
1913
|
#
|
|
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.
|
|
1914
|
+
# When called with no arguments, returns the {Elements::CoreProperties} value object.
|
|
1915
|
+
# When called with keyword options, configures properties and returns nil.
|
|
2465
1916
|
#
|
|
2466
|
-
# @
|
|
1917
|
+
# @param opts [Hash] Core properties map.
|
|
1918
|
+
# @return [Elements::CoreProperties, void]
|
|
2467
1919
|
# @api public
|
|
2468
1920
|
# : () -> Elements::CoreProperties
|
|
1921
|
+
# : (**untyped opts) -> void
|
|
2469
1922
|
def core_properties: () -> Elements::CoreProperties
|
|
1923
|
+
| (**untyped opts) -> void
|
|
2470
1924
|
|
|
2471
|
-
#
|
|
1925
|
+
# Replaces core document properties.
|
|
2472
1926
|
#
|
|
2473
|
-
# @param
|
|
2474
|
-
# @param value [String, Integer, Time] Property value.
|
|
1927
|
+
# @param props [Hash, Elements::CoreProperties]
|
|
2475
1928
|
# @return [void]
|
|
2476
1929
|
# @api public
|
|
2477
|
-
# : (Symbol
|
|
2478
|
-
def
|
|
1930
|
+
# : (Hash[Symbol, untyped] | Elements::CoreProperties props) -> void
|
|
1931
|
+
def core_properties=: (Hash[Symbol, untyped] | Elements::CoreProperties props) -> void
|
|
2479
1932
|
|
|
2480
|
-
#
|
|
1933
|
+
# Configures or queries application document properties.
|
|
2481
1934
|
#
|
|
2482
|
-
#
|
|
1935
|
+
# When called with no arguments, returns the {Elements::AppProperties} value object.
|
|
1936
|
+
# When called with keyword options, configures properties and returns nil.
|
|
1937
|
+
#
|
|
1938
|
+
# @param opts [Hash] Application properties map.
|
|
1939
|
+
# @return [Elements::AppProperties, void]
|
|
2483
1940
|
# @api public
|
|
2484
1941
|
# : () -> Elements::AppProperties
|
|
1942
|
+
# : (**untyped opts) -> void
|
|
2485
1943
|
def app_properties: () -> Elements::AppProperties
|
|
1944
|
+
| (**untyped opts) -> void
|
|
1945
|
+
|
|
1946
|
+
# Replaces application document properties.
|
|
1947
|
+
#
|
|
1948
|
+
# @param props [Hash, Elements::AppProperties]
|
|
1949
|
+
# @return [void]
|
|
1950
|
+
# @api public
|
|
1951
|
+
# : (Hash[Symbol, untyped] | Elements::AppProperties props) -> void
|
|
1952
|
+
def app_properties=: (Hash[Symbol, untyped] | Elements::AppProperties props) -> void
|
|
2486
1953
|
|
|
2487
1954
|
# Sets multiple core and/or app properties.
|
|
2488
1955
|
#
|
|
@@ -2527,6 +1994,20 @@ module Xlsxrb
|
|
|
2527
1994
|
|
|
2528
1995
|
private
|
|
2529
1996
|
|
|
1997
|
+
# Raises ArgumentError for any cell style name that has not been defined.
|
|
1998
|
+
# : (untyped cell_styles) -> void
|
|
1999
|
+
def check_style_names!: (untyped cell_styles) -> void
|
|
2000
|
+
|
|
2001
|
+
# Gives Date and Time values whose named cell style has no number format a variant of
|
|
2002
|
+
# that style with the default date or time format, registered on first use.
|
|
2003
|
+
# : (Array[untyped] values, untyped cell_styles) -> untyped
|
|
2004
|
+
def with_date_style_variants: (Array[untyped] values, untyped cell_styles) -> untyped
|
|
2005
|
+
|
|
2006
|
+
def ensure_sheet_started!: () -> untyped
|
|
2007
|
+
|
|
2008
|
+
# : (String? range, ?sheet: String?) -> String?
|
|
2009
|
+
def set_print_area: (String? range, ?sheet: String?) -> String?
|
|
2010
|
+
|
|
2530
2011
|
# : (untyped range) -> untyped
|
|
2531
2012
|
def absolute_range: (untyped range) -> untyped
|
|
2532
2013
|
|