xlsxrb 0.1.18 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +200 -0
  3. data/README.md +35 -12
  4. data/lib/ruby_lsp/xlsxrb/completion_listener.rb +410 -80
  5. data/lib/xlsxrb/chart_builder.rb +251 -386
  6. data/lib/xlsxrb/dsl_helpers.rb +169 -68
  7. data/lib/xlsxrb/elements/cell.rb +37 -157
  8. data/lib/xlsxrb/elements/column.rb +11 -19
  9. data/lib/xlsxrb/elements/coordinate_access.rb +15 -86
  10. data/lib/xlsxrb/elements/image.rb +5 -72
  11. data/lib/xlsxrb/elements/metadata.rb +463 -817
  12. data/lib/xlsxrb/elements/row.rb +27 -145
  13. data/lib/xlsxrb/elements/styles.rb +30 -88
  14. data/lib/xlsxrb/elements/types.rb +6 -99
  15. data/lib/xlsxrb/elements/workbook.rb +19 -126
  16. data/lib/xlsxrb/elements/worksheet.rb +45 -316
  17. data/lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb +4 -1
  18. data/lib/xlsxrb/ooxml/reader/listeners/drawing_listeners.rb +7 -7
  19. data/lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb +32 -17
  20. data/lib/xlsxrb/ooxml/reader.rb +49 -51
  21. data/lib/xlsxrb/ooxml/styles_parser.rb +26 -2
  22. data/lib/xlsxrb/ooxml/utils.rb +15 -2
  23. data/lib/xlsxrb/ooxml/workbook_parser.rb +0 -1
  24. data/lib/xlsxrb/ooxml/workbook_writer.rb +184 -94
  25. data/lib/xlsxrb/ooxml/worksheet_parser.rb +61 -29
  26. data/lib/xlsxrb/ooxml/worksheet_writer.rb +353 -261
  27. data/lib/xlsxrb/ooxml/writer/drawing_xml.rb +28 -11
  28. data/lib/xlsxrb/ooxml/writer/features_xml.rb +62 -16
  29. data/lib/xlsxrb/ooxml/writer/styles_xml.rb +1 -1
  30. data/lib/xlsxrb/ooxml/writer.rb +106 -42
  31. data/lib/xlsxrb/ooxml/xml_builder.rb +18 -0
  32. data/lib/xlsxrb/ooxml/xml_parser.rb +78 -5
  33. data/lib/xlsxrb/ooxml/zip_reader.rb +65 -15
  34. data/lib/xlsxrb/ooxml/zip_writer.rb +119 -30
  35. data/lib/xlsxrb/stream_row.rb +14 -118
  36. data/lib/xlsxrb/stream_sheet.rb +14 -261
  37. data/lib/xlsxrb/stream_writer.rb +807 -1537
  38. data/lib/xlsxrb/style_builder.rb +715 -593
  39. data/lib/xlsxrb/version.rb +1 -1
  40. data/lib/xlsxrb/workbook_builder.rb +403 -286
  41. data/lib/xlsxrb/worksheet_builder.rb +1297 -1458
  42. data/lib/xlsxrb.rb +281 -1079
  43. data/sig/generated/xlsxrb/chart_builder.rbs +202 -205
  44. data/sig/generated/xlsxrb/dsl_helpers.rbs +92 -16
  45. data/sig/generated/xlsxrb/elements/cell.rbs +12 -76
  46. data/sig/generated/xlsxrb/elements/column.rbs +0 -7
  47. data/sig/generated/xlsxrb/elements/coordinate_access.rbs +5 -41
  48. data/sig/generated/xlsxrb/elements/image.rbs +3 -29
  49. data/sig/generated/xlsxrb/elements/metadata.rbs +138 -151
  50. data/sig/generated/xlsxrb/elements/row.rbs +10 -53
  51. data/sig/generated/xlsxrb/elements/styles.rbs +1 -39
  52. data/sig/generated/xlsxrb/elements/workbook.rbs +14 -78
  53. data/sig/generated/xlsxrb/elements/worksheet.rbs +5 -121
  54. data/sig/generated/xlsxrb/ooxml/reader/listeners/feature_listeners.rbs +0 -4
  55. data/sig/generated/xlsxrb/ooxml/reader.rbs +0 -3
  56. data/sig/generated/xlsxrb/ooxml/styles_parser.rbs +1 -1
  57. data/sig/generated/xlsxrb/ooxml/utils.rbs +13 -3
  58. data/sig/generated/xlsxrb/ooxml/workbook_writer.rbs +17 -0
  59. data/sig/generated/xlsxrb/ooxml/worksheet_parser.rbs +16 -0
  60. data/sig/generated/xlsxrb/ooxml/worksheet_writer.rbs +58 -3
  61. data/sig/generated/xlsxrb/ooxml/writer/features_xml.rbs +10 -0
  62. data/sig/generated/xlsxrb/ooxml/writer.rbs +20 -14
  63. data/sig/generated/xlsxrb/ooxml/xml_builder.rbs +12 -0
  64. data/sig/generated/xlsxrb/ooxml/xml_parser.rbs +70 -0
  65. data/sig/generated/xlsxrb/ooxml/zip_reader.rbs +22 -7
  66. data/sig/generated/xlsxrb/ooxml/zip_writer.rbs +26 -1
  67. data/sig/generated/xlsxrb/stream_row.rbs +9 -44
  68. data/sig/generated/xlsxrb/stream_sheet.rbs +1 -158
  69. data/sig/generated/xlsxrb/stream_writer.rbs +491 -974
  70. data/sig/generated/xlsxrb/style_builder.rbs +464 -239
  71. data/sig/generated/xlsxrb/workbook_builder.rbs +124 -139
  72. data/sig/generated/xlsxrb/worksheet_builder.rbs +922 -686
  73. data/sig/generated/xlsxrb.rbs +56 -188
  74. data/sig/rexml.rbs +8 -0
  75. metadata +3 -5
  76. data/lib/xlsxrb/utils.rb +0 -251
  77. data/sig/generated/xlsxrb/utils.rbs +0 -200
@@ -52,10 +52,6 @@ module Xlsxrb
52
52
  # : () -> Hash[Integer, String]
53
53
  def number_formats: () -> Hash[Integer, String]
54
54
 
55
- # @deprecated Use {#number_formats} instead. Will be removed in 0.2.0.
56
- # : () -> Hash[Integer, String]
57
- def num_fmts: () -> Hash[Integer, String]
58
-
59
55
  # Returns array of differential format (dxf) entries from the styles.
60
56
  #
61
57
  # @return [Array<Elements::Dxf>]
@@ -121,10 +117,6 @@ module Xlsxrb
121
117
  # : (Integer? id) -> Numeric?
122
118
  def font_size: (Integer? id) -> Numeric?
123
119
 
124
- # @deprecated Use {#font_size} instead. Will be removed in 0.2.0.
125
- # : (Integer? id) -> Numeric?
126
- def sz: (Integer? id) -> Numeric?
127
-
128
120
  # Looks up a fill entry by 0-based index.
129
121
  #
130
122
  # @param id [Integer, nil]
@@ -149,10 +141,6 @@ module Xlsxrb
149
141
  # : (Integer? id) -> Elements::CellXf?
150
142
  def cell_xf: (Integer? id) -> Elements::CellXf?
151
143
 
152
- # @deprecated Use {#cell_xf} instead. Will be removed in 0.2.0.
153
- # : (Integer? id) -> Elements::CellXf?
154
- def xf: (Integer? id) -> Elements::CellXf?
155
-
156
144
  # Looks up a custom format code by numFmtId.
157
145
  #
158
146
  # @param id [Integer, nil]
@@ -161,9 +149,6 @@ module Xlsxrb
161
149
  # : (Integer? id) -> String?
162
150
  def number_format_code: (Integer? id) -> String?
163
151
 
164
- # @deprecated Use {#number_format_code} instead. Will be removed in 0.2.0.
165
- def num_fmt: (untyped id) -> untyped
166
-
167
152
  # Looks up a differential format (dxf) entry by 0-based index.
168
153
  #
169
154
  # @param id [Integer, nil]
@@ -221,10 +206,6 @@ module Xlsxrb
221
206
  # : (Integer id, String code) -> Integer
222
207
  def add_number_format: (Integer id, String code) -> Integer
223
208
 
224
- # @deprecated Use {#add_number_format} instead. Will be removed in 0.2.0.
225
- # : (Integer id, String code) -> Integer
226
- def add_num_fmt: (Integer id, String code) -> Integer
227
-
228
209
  # Appends a cell format (cellXf) entry and returns its 0-based index.
229
210
  #
230
211
  # @param spec [Hash, nil]
@@ -233,10 +214,6 @@ module Xlsxrb
233
214
  # : (?Hash[Symbol, untyped]? spec, **untyped kwargs) -> Integer
234
215
  def add_cell_xf: (?Hash[Symbol, untyped]? spec, **untyped kwargs) -> Integer
235
216
 
236
- # @deprecated Use {#add_cell_xf} instead. Will be removed in 0.2.0.
237
- # : (?Hash[Symbol, untyped]? spec, **untyped kwargs) -> Integer
238
- def add_xf: (?Hash[Symbol, untyped]? spec, **untyped kwargs) -> Integer
239
-
240
217
  # Appends a differential format (dxf) entry and returns its 0-based index.
241
218
  #
242
219
  # @param spec [Hash, nil]
@@ -286,7 +263,7 @@ module Xlsxrb
286
263
 
287
264
  alias to_hash to_h
288
265
 
289
- # Equality check against another Styles or Hash.
266
+ # Equality check against another Styles.
290
267
  #
291
268
  # @param other [Object]
292
269
  # @return [Boolean]
@@ -311,17 +288,6 @@ module Xlsxrb
311
288
  # : (Integer? style_index) -> String?
312
289
  def number_format: (Integer? style_index) -> String?
313
290
 
314
- # @deprecated Use {#number_format} instead.
315
- # @param style_index [Integer, nil]
316
- # @return [String, nil]
317
- # @api public
318
- # : (Integer? style_index) -> String?
319
- def format_code: (Integer? style_index) -> String?
320
-
321
- # @deprecated Use {#number_format} instead. Will be removed in 0.2.0.
322
- # : (Integer? style_index) -> String?
323
- def format_code_for: (Integer? style_index) -> String?
324
-
325
291
  # Returns the classified format category (:date, :datetime, :time, :number, :text, :general) for a style index.
326
292
  #
327
293
  # @param style_index [Integer, nil]
@@ -330,10 +296,6 @@ module Xlsxrb
330
296
  # : (Integer? style_index) -> Symbol?
331
297
  def format_type: (Integer? style_index) -> Symbol?
332
298
 
333
- # @deprecated Use {#format_type} instead. Will be removed in 0.2.0.
334
- # : (Integer? style_index) -> Symbol?
335
- def classification_for: (Integer? style_index) -> Symbol?
336
-
337
299
  # Returns whether the style index represents a date, datetime, or time pattern.
338
300
  #
339
301
  # @param style_index [Integer, nil]
@@ -12,7 +12,7 @@ module Xlsxrb
12
12
  # @api public
13
13
  # rubocop:disable Style/DataInheritance -- Required as class syntax for mutant subject matcher
14
14
  class Workbook
15
- # @param sheets [Array<Elements::Worksheet, StreamSheet>] Worksheets in the workbook.
15
+ # @param sheets [Array<Elements::Worksheet>] Worksheets in the workbook.
16
16
  # @param shared_strings [Array<String>] Shared strings table.
17
17
  # @param styles [Elements::Styles, Hash] Styles definition.
18
18
  # @param unmapped_data [Hash] Additional metadata for round-tripping.
@@ -24,8 +24,8 @@ module Xlsxrb
24
24
  # @param workbook_protection [Elements::WorkbookProtection, Hash, nil] Workbook protection.
25
25
  # @param custom_properties [Hash, Array, nil] Custom properties.
26
26
  # @param date1904 [Boolean] Whether the workbook uses the 1904 date system.
27
- # : (?sheets: Array[Elements::Worksheet | StreamSheet], ?shared_strings: Array[String], ?styles: Elements::Styles | Hash[untyped, untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?defined_names: Array[untyped]?, ?workbook_properties: (Elements::WorkbookProperties | Hash[Symbol, untyped])?, ?core_properties: (Elements::CoreProperties | Hash[Symbol, untyped])?, ?app_properties: (Elements::AppProperties | Hash[Symbol, untyped])?, ?workbook_protection: (Elements::WorkbookProtection | Hash[Symbol, untyped])?, ?custom_properties: (Hash[String, Elements::CustomProperty] | Hash[untyped, untyped] | Array[untyped])?, ?date1904: bool) -> void
28
- def initialize: (?sheets: Array[Elements::Worksheet | StreamSheet], ?shared_strings: Array[String], ?styles: Elements::Styles | Hash[untyped, untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?defined_names: Array[untyped]?, ?workbook_properties: (Elements::WorkbookProperties | Hash[Symbol, untyped])?, ?core_properties: (Elements::CoreProperties | Hash[Symbol, untyped])?, ?app_properties: (Elements::AppProperties | Hash[Symbol, untyped])?, ?workbook_protection: (Elements::WorkbookProtection | Hash[Symbol, untyped])?, ?custom_properties: (Hash[String, Elements::CustomProperty] | Hash[untyped, untyped] | Array[untyped])?, ?date1904: bool) -> void
27
+ # : (?sheets: Array[Elements::Worksheet], ?shared_strings: Array[String], ?styles: Elements::Styles | Hash[untyped, untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?defined_names: Array[untyped]?, ?workbook_properties: (Elements::WorkbookProperties | Hash[Symbol, untyped])?, ?core_properties: (Elements::CoreProperties | Hash[Symbol, untyped])?, ?app_properties: (Elements::AppProperties | Hash[Symbol, untyped])?, ?workbook_protection: (Elements::WorkbookProtection | Hash[Symbol, untyped])?, ?custom_properties: (Hash[String, Elements::CustomProperty] | Hash[untyped, untyped] | Array[untyped])?, ?date1904: bool) -> void
28
+ def initialize: (?sheets: Array[Elements::Worksheet], ?shared_strings: Array[String], ?styles: Elements::Styles | Hash[untyped, untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?defined_names: Array[untyped]?, ?workbook_properties: (Elements::WorkbookProperties | Hash[Symbol, untyped])?, ?core_properties: (Elements::CoreProperties | Hash[Symbol, untyped])?, ?app_properties: (Elements::AppProperties | Hash[Symbol, untyped])?, ?workbook_protection: (Elements::WorkbookProtection | Hash[Symbol, untyped])?, ?custom_properties: (Hash[String, Elements::CustomProperty] | Hash[untyped, untyped] | Array[untyped])?, ?date1904: bool) -> void
29
29
 
30
30
  # Iterate over worksheets.
31
31
  #
@@ -35,18 +35,12 @@ module Xlsxrb
35
35
  # end
36
36
  #
37
37
  # @yield [sheet]
38
- # @yieldparam sheet [Elements::Worksheet, StreamSheet]
38
+ # @yieldparam sheet [Elements::Worksheet]
39
39
  # @return [Enumerator, void]
40
- # : () { (Elements::Worksheet | StreamSheet) -> void } -> void
41
- # : () -> Enumerator[Elements::Worksheet | StreamSheet, void]
42
- def each: () { (Elements::Worksheet | StreamSheet) -> void } -> void
43
- | () -> Enumerator[Elements::Worksheet | StreamSheet, void]
44
-
45
- # @deprecated Use {#each} instead. Will be removed in 0.2.0.
46
- # : () { (Elements::Worksheet | StreamSheet) -> void } -> void
47
- # : () -> Enumerator[Elements::Worksheet | StreamSheet, void]
48
- def each_sheet: () { (Elements::Worksheet | StreamSheet) -> void } -> void
49
- | () -> Enumerator[Elements::Worksheet | StreamSheet, void]
40
+ # : () { (Elements::Worksheet) -> void } -> void
41
+ # : () -> Enumerator[Elements::Worksheet, void]
42
+ def each: () { (Elements::Worksheet) -> void } -> void
43
+ | () -> Enumerator[Elements::Worksheet, void]
50
44
 
51
45
  # Returns whether the workbook is valid according to ECMA-376 rules.
52
46
  #
@@ -75,18 +69,12 @@ module Xlsxrb
75
69
  # : () -> Integer?
76
70
  def active_sheet_index: () -> Integer?
77
71
 
78
- # @deprecated Use {#active_sheet_index} or {#active_sheet} instead.
79
- # @return [Integer, nil]
80
- # @api public
81
- # : () -> Integer?
82
- def active_tab: () -> Integer?
83
-
84
72
  # Returns the active worksheet in the workbook, or the first worksheet if not set.
85
73
  #
86
- # @return [Elements::Worksheet, StreamSheet, nil]
74
+ # @return [Elements::Worksheet, nil]
87
75
  # @api public
88
- # : () -> (Elements::Worksheet | StreamSheet)?
89
- def active_sheet: () -> (Elements::Worksheet | StreamSheet)?
76
+ # : () -> Elements::Worksheet?
77
+ def active_sheet: () -> Elements::Worksheet?
90
78
 
91
79
  # Returns the index of the first sheet tab visible in the sheet tab scroll area.
92
80
  #
@@ -102,10 +90,6 @@ module Xlsxrb
102
90
  # : () -> bool
103
91
  def show_sheet_tabs?: () -> bool
104
92
 
105
- # @deprecated Use {#show_sheet_tabs?} instead. Will be removed in 0.2.0.
106
- # : () -> bool
107
- def show_sheet_tabs: () -> bool
108
-
109
93
  # Returns the ratio between the sheet tabs bar and the horizontal scroll bar (0-1000).
110
94
  #
111
95
  # @return [Integer, nil]
@@ -120,10 +104,6 @@ module Xlsxrb
120
104
  # : () -> bool
121
105
  def full_calc_on_load?: () -> bool
122
106
 
123
- # @deprecated Use {#full_calc_on_load?} instead. Will be removed in 0.2.0.
124
- # : () -> bool
125
- def full_calc_on_load: () -> bool
126
-
127
107
  # Returns the defined name matching name (and optionally sheet), or nil.
128
108
  #
129
109
  # @example
@@ -145,10 +125,10 @@ module Xlsxrb
145
125
  # wb.sheet(:Sales)
146
126
  #
147
127
  # @param identifier [Integer, String, Symbol, untyped] 0-based index or sheet name.
148
- # @return [Elements::Worksheet, StreamSheet, nil]
128
+ # @return [Elements::Worksheet, nil]
149
129
  # @api public
150
- # : (?Integer | String | Symbol | untyped identifier) -> (Elements::Worksheet | StreamSheet)?
151
- def sheet: (?Integer | String | Symbol | untyped identifier) -> (Elements::Worksheet | StreamSheet)?
130
+ # : (?Integer | String | Symbol | untyped identifier) -> Elements::Worksheet?
131
+ def sheet: (?Integer | String | Symbol | untyped identifier) -> Elements::Worksheet?
152
132
 
153
133
  alias [] sheet
154
134
 
@@ -179,53 +159,9 @@ module Xlsxrb
179
159
  # : (Integer | String | untyped sheet_identifier, String | Symbol | Integer ref_or_row, ?Integer? col) -> Array[Elements::Image]
180
160
  def images_at: (Integer | String | untyped sheet_identifier, String | Symbol | Integer ref_or_row, ?Integer? col) -> Array[Elements::Image]
181
161
 
182
- # Internal load helper without deprecation warning.
183
- # @api private
184
- # : () -> Elements::Workbook
185
- def _load: () -> Elements::Workbook
186
-
187
162
  # Loads all sheets into memory, returning an Elements::Workbook where every
188
163
  # worksheet is a fully-parsed Elements::Worksheet supporting coordinate random access.
189
164
  #
190
- # @example
191
- # wb = Xlsxrb.load("file.xlsx")
192
- # puts wb["Sheet1"]["A1"].value
193
- #
194
- # @deprecated Use {Xlsxrb.load} instead. Will be removed in 0.2.0.
195
- # @return [Elements::Workbook]
196
- # @api public
197
- # : () -> Elements::Workbook
198
- def load: () -> Elements::Workbook
199
-
200
- # @deprecated Use {Xlsxrb.load} instead. Will be removed in 0.2.0.
201
- # : () -> Elements::Workbook
202
- def to_workbook: () -> Elements::Workbook
203
-
204
- # Closes any streaming resources associated with worksheets.
205
- #
206
- # @return [void]
207
- # @api public
208
- # : () -> void
209
- def close: () -> void
210
-
211
- # Returns a new Workbook with the specified sheet updated.
212
- # Yields the matched worksheet to the block, which must return a new Worksheet.
213
- #
214
- # @deprecated Use {Xlsxrb.read} + {Xlsxrb.write} for streaming transformations or {Xlsxrb.write} DSL for report generation. Will be removed in 0.2.0.
215
- # @example
216
- # new_wb = wb.update_sheet("Sheet1") do |sheet|
217
- # sheet.update_cell("A1", value: "New Title")
218
- # end
219
- #
220
- # @param identifier [Integer, String] 0-based index or sheet name.
221
- # @yield [sheet]
222
- # @yieldparam sheet [Elements::Worksheet] The worksheet to update.
223
- # @yieldreturn [Elements::Worksheet] The modified worksheet.
224
- # @return [Elements::Workbook] A new Workbook instance.
225
- # @api public
226
- # : (Integer | String identifier) ?{ (Elements::Worksheet) -> Elements::Worksheet } -> Elements::Workbook
227
- def update_sheet: (Integer | String identifier) ?{ (Elements::Worksheet) -> Elements::Worksheet } -> Elements::Workbook
228
-
229
165
  # Returns an Array of all worksheet names.
230
166
  #
231
167
  # @return [Array<String>]
@@ -154,21 +154,6 @@ module Xlsxrb
154
154
  # : Array[Elements::HeaderFooterImage]
155
155
  attr_reader header_footer_images: untyped
156
156
 
157
- # @deprecated Worksheet instances are immutable value objects. In 0.2.0, #dimension= will be removed.
158
- # : (String? new_dim) -> String?
159
- def dimension=: (String? new_dim) -> String?
160
-
161
- # @deprecated Use {#date1904?} instead. Will be removed in 0.2.0.
162
- # : () -> bool
163
- def date1904: () -> bool
164
-
165
- # Closes the worksheet resources (no-op for in-memory worksheet).
166
- #
167
- # @return [void]
168
- # @api public
169
- # : () -> void
170
- def close: () -> void
171
-
172
157
  # Support array pattern matching.
173
158
  #
174
159
  # @return [Array<Object>]
@@ -176,10 +161,6 @@ module Xlsxrb
176
161
  # : () -> Array[untyped]
177
162
  def deconstruct: () -> Array[untyped]
178
163
 
179
- # @deprecated Use {#column_breaks} instead.
180
- # : () -> Array[Elements::PageBreak]
181
- def col_breaks: () -> Array[Elements::PageBreak]
182
-
183
164
  # Returns worksheet calculation properties (<sheetCalcPr>), or nil if none configured.
184
165
  #
185
166
  # @return [Elements::SheetCalcProperties, nil]
@@ -187,35 +168,14 @@ module Xlsxrb
187
168
  # : () -> Elements::SheetCalcProperties?
188
169
  def sheet_calc_properties: () -> Elements::SheetCalcProperties?
189
170
 
190
- # @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
191
- # : () -> Elements::SheetCalcProperties?
192
- def sheet_calc_pr: () -> Elements::SheetCalcProperties?
193
-
194
- # @deprecated Use {#sheet_calc_properties} instead. Will be removed in 0.2.0.
195
- # : () -> Elements::SheetCalcProperties?
196
- def calc_pr: () -> Elements::SheetCalcProperties?
197
-
198
- # @deprecated Use {#conditional_formats} instead. Matches the ECMA-376 XML element name (<conditionalFormatting>), but {#conditional_formats} is canonical in xlsxrb. Will be removed in version 0.2.0.
199
- alias conditional_formatting conditional_formats
200
-
201
- # @deprecated Use {#phonetic_properties} instead. Will be removed in 0.2.0.
202
- alias phonetic_pr phonetic_properties
203
-
204
- # @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
205
- alias background_picture background_image
206
-
207
- # @deprecated Use {#background_image} instead. Will be removed in 0.2.0.
208
- alias picture background_image
209
-
210
171
  # @param name [String] The worksheet name (max 31 characters).
211
172
  # @param rows [Array<Elements::Row>] Rows in the sheet.
212
173
  # @param columns [Array<Elements::Column>] Column definitions.
213
174
  # @param charts [Array<Hash>] Charts in the sheet.
214
- # @param conditional_formatting [Array<Hash>, nil] Conditional formatting rules.
175
+ # @param conditional_formats [Array<Hash, Elements::ConditionalFormat>] Conditional formatting rules.
215
176
  # @param data_validations [Array<Hash>] Data validation rules.
216
177
  # @param unmapped_data [Hash] Additional metadata for round-tripping.
217
178
  # @param errors [Array<String>, nil] Validation errors.
218
- # @param conditional_formats [Array<Hash>, nil] Alias for conditional_formatting.
219
179
  # @param state [Symbol] Sheet visibility state (:visible, :hidden, or :very_hidden).
220
180
  # @param hyperlinks [Hash{String => Hash}] Hyperlink mappings by cell reference.
221
181
  # @param comments [Array<Hash>] Comments and notes in the sheet.
@@ -243,17 +203,16 @@ module Xlsxrb
243
203
  # @param sheet_format [Hash] Sheet format properties (e.g. defaultRowHeight, defaultColWidth).
244
204
  # @param row_breaks [Array<Integer | Hash>] Explicit page row breaks.
245
205
  # @param column_breaks [Array<Integer | Hash>] Explicit page column breaks.
246
- # @param col_breaks [Array<Integer | Hash>] Deprecated alias for column_breaks.
247
206
  # @param protected_ranges [Array<Hash>] Protected range definitions.
248
207
  # @param cell_watches [Array<String>] Watched cell references.
249
208
  # @param ignored_errors [Array<Hash>] Ignored error rules.
250
209
  # @param phonetic_properties [Hash, nil] Phonetic text properties.
251
210
  # @param selection [Hash, Array<Hash>, nil] Active cell and selection settings.
252
- # @param sheet_calc_pr [Hash, nil] Worksheet calculation properties.
211
+ # @param sheet_calc_properties [Hash, nil] Worksheet calculation properties.
253
212
  # @param background_image [Hash, nil] Worksheet background image specification.
254
213
  # @param threaded_comments [Array<Hash>] Threaded comments in the sheet.
255
- # : (name: String?, ?rows: Array[Elements::Row], ?columns: Array[Elements::Column], ?charts: Array[untyped], ?conditional_formatting: Array[untyped]?, ?data_validations: Array[untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?conditional_formats: Array[untyped]?, ?state: Symbol, ?hyperlinks: Hash[String, untyped], ?comments: Array[untyped], ?images: Array[Elements::Image], ?styles: (Elements::Styles | Hash[untyped, untyped])?, ?date1904: bool, ?dimension: String?, ?trim_empty_rows: bool, ?pad_empty_rows: bool, ?pad_empty_cells: bool, ?print_area: String?, ?print_titles: untyped, ?sparkline_groups: Array[untyped], ?merged_cells: Array[String], ?auto_filter: String?, ?tables: Array[untyped], ?shapes: Array[untyped], ?freeze_pane: untyped, ?page_setup: untyped, ?page_margins: untyped, ?header_footer: untyped, ?print_options: untyped, ?sheet_protection: untyped, ?sheet_view: untyped, ?sheet_properties: untyped, ?sheet_format: untyped, ?row_breaks: Array[untyped], ?column_breaks: Array[untyped]?, ?col_breaks: Array[untyped]?, ?protected_ranges: Array[untyped], ?cell_watches: Array[String], ?ignored_errors: Array[untyped], ?phonetic_properties: untyped, ?selection: untyped, ?sheet_calc_properties: untyped, ?sheet_calc_pr: untyped, ?background_image: untyped, ?threaded_comments: Array[untyped], ?pivot_tables: Array[untyped]?, ?split_pane: untyped, ?filter_columns: Hash[Integer, untyped]?, ?sort_state: untyped, ?header_footer_images: Array[untyped]?) -> void
256
- def initialize: (name: String?, ?rows: Array[Elements::Row], ?columns: Array[Elements::Column], ?charts: Array[untyped], ?conditional_formatting: Array[untyped]?, ?data_validations: Array[untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?conditional_formats: Array[untyped]?, ?state: Symbol, ?hyperlinks: Hash[String, untyped], ?comments: Array[untyped], ?images: Array[Elements::Image], ?styles: (Elements::Styles | Hash[untyped, untyped])?, ?date1904: bool, ?dimension: String?, ?trim_empty_rows: bool, ?pad_empty_rows: bool, ?pad_empty_cells: bool, ?print_area: String?, ?print_titles: untyped, ?sparkline_groups: Array[untyped], ?merged_cells: Array[String], ?auto_filter: String?, ?tables: Array[untyped], ?shapes: Array[untyped], ?freeze_pane: untyped, ?page_setup: untyped, ?page_margins: untyped, ?header_footer: untyped, ?print_options: untyped, ?sheet_protection: untyped, ?sheet_view: untyped, ?sheet_properties: untyped, ?sheet_format: untyped, ?row_breaks: Array[untyped], ?column_breaks: Array[untyped]?, ?col_breaks: Array[untyped]?, ?protected_ranges: Array[untyped], ?cell_watches: Array[String], ?ignored_errors: Array[untyped], ?phonetic_properties: untyped, ?selection: untyped, ?sheet_calc_properties: untyped, ?sheet_calc_pr: untyped, ?background_image: untyped, ?threaded_comments: Array[untyped], ?pivot_tables: Array[untyped]?, ?split_pane: untyped, ?filter_columns: Hash[Integer, untyped]?, ?sort_state: untyped, ?header_footer_images: Array[untyped]?) -> void
214
+ # : (name: String?, ?rows: Array[Elements::Row], ?columns: Array[Elements::Column], ?charts: Array[untyped], ?data_validations: Array[untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?conditional_formats: Array[untyped]?, ?state: Symbol, ?hyperlinks: Hash[String, untyped], ?comments: Array[untyped], ?images: Array[Elements::Image], ?styles: (Elements::Styles | Hash[untyped, untyped])?, ?date1904: bool, ?dimension: String?, ?trim_empty_rows: bool, ?pad_empty_rows: bool, ?pad_empty_cells: bool, ?print_area: String?, ?print_titles: untyped, ?sparkline_groups: Array[untyped], ?merged_cells: Array[String], ?auto_filter: String?, ?tables: Array[untyped], ?shapes: Array[untyped], ?freeze_pane: untyped, ?page_setup: untyped, ?page_margins: untyped, ?header_footer: untyped, ?print_options: untyped, ?sheet_protection: untyped, ?sheet_view: untyped, ?sheet_properties: untyped, ?sheet_format: untyped, ?row_breaks: Array[untyped], ?column_breaks: Array[untyped]?, ?protected_ranges: Array[untyped], ?cell_watches: Array[String], ?ignored_errors: Array[untyped], ?phonetic_properties: untyped, ?selection: untyped, ?sheet_calc_properties: untyped, ?background_image: untyped, ?threaded_comments: Array[untyped], ?pivot_tables: Array[untyped]?, ?split_pane: untyped, ?filter_columns: Hash[Integer, untyped]?, ?sort_state: untyped, ?header_footer_images: Array[untyped]?) -> void
215
+ def initialize: (name: String?, ?rows: Array[Elements::Row], ?columns: Array[Elements::Column], ?charts: Array[untyped], ?data_validations: Array[untyped], ?unmapped_data: Hash[untyped, untyped], ?errors: Array[String]?, ?conditional_formats: Array[untyped]?, ?state: Symbol, ?hyperlinks: Hash[String, untyped], ?comments: Array[untyped], ?images: Array[Elements::Image], ?styles: (Elements::Styles | Hash[untyped, untyped])?, ?date1904: bool, ?dimension: String?, ?trim_empty_rows: bool, ?pad_empty_rows: bool, ?pad_empty_cells: bool, ?print_area: String?, ?print_titles: untyped, ?sparkline_groups: Array[untyped], ?merged_cells: Array[String], ?auto_filter: String?, ?tables: Array[untyped], ?shapes: Array[untyped], ?freeze_pane: untyped, ?page_setup: untyped, ?page_margins: untyped, ?header_footer: untyped, ?print_options: untyped, ?sheet_protection: untyped, ?sheet_view: untyped, ?sheet_properties: untyped, ?sheet_format: untyped, ?row_breaks: Array[untyped], ?column_breaks: Array[untyped]?, ?protected_ranges: Array[untyped], ?cell_watches: Array[String], ?ignored_errors: Array[untyped], ?phonetic_properties: untyped, ?selection: untyped, ?sheet_calc_properties: untyped, ?background_image: untyped, ?threaded_comments: Array[untyped], ?pivot_tables: Array[untyped]?, ?split_pane: untyped, ?filter_columns: Hash[Integer, untyped]?, ?sort_state: untyped, ?header_footer_images: Array[untyped]?) -> void
257
216
 
258
217
  # Returns whether trailing empty rows are omitted during iteration.
259
218
  #
@@ -262,21 +221,13 @@ module Xlsxrb
262
221
  # : () -> bool
263
222
  def trim_empty_rows?: () -> bool
264
223
 
265
- # @deprecated Use {#trim_empty_rows?} instead. Will be removed in 0.2.0.
266
- # : () -> bool
267
- def trim_empty_rows: () -> bool
268
-
269
- # Returns whether skipped rows are padded during iteration.
224
+ # Returns whether empty rows are yielded for skipped row numbers during iteration.
270
225
  #
271
226
  # @return [Boolean]
272
227
  # @api public
273
228
  # : () -> bool
274
229
  def pad_empty_rows?: () -> bool
275
230
 
276
- # @deprecated Use {#pad_empty_rows?} instead. Will be removed in 0.2.0.
277
- # : () -> bool
278
- def pad_empty_rows: () -> bool
279
-
280
231
  # Returns whether missing cells within rows are padded during iteration.
281
232
  #
282
233
  # @return [Boolean]
@@ -284,10 +235,6 @@ module Xlsxrb
284
235
  # : () -> bool
285
236
  def pad_empty_cells?: () -> bool
286
237
 
287
- # @deprecated Use {#pad_empty_cells?} instead. Will be removed in 0.2.0.
288
- # : () -> bool
289
- def pad_empty_cells: () -> bool
290
-
291
238
  # Returns whether the worksheet uses the 1904 date system.
292
239
  #
293
240
  # @return [Boolean]
@@ -324,10 +271,6 @@ module Xlsxrb
324
271
  # : () -> bool
325
272
  def fit_to_page?: () -> bool
326
273
 
327
- # @deprecated Use {#fit_to_page?} instead. Will be removed in 0.2.0.
328
- # : () -> bool
329
- def fit_to_page: () -> bool
330
-
331
274
  # Returns whether full calculation on load is enabled on this worksheet.
332
275
  #
333
276
  # @return [Boolean]
@@ -335,10 +278,6 @@ module Xlsxrb
335
278
  # : () -> bool
336
279
  def full_calc_on_load?: () -> bool
337
280
 
338
- # @deprecated Use {#full_calc_on_load?} instead. Will be removed in 0.2.0.
339
- # : () -> bool
340
- def full_calc_on_load: () -> bool
341
-
342
281
  # Returns the outline and grouping properties of the worksheet, or an empty hash if none configured.
343
282
  #
344
283
  # @return [Hash]
@@ -346,9 +285,6 @@ module Xlsxrb
346
285
  # : () -> Hash[Symbol, untyped]
347
286
  def outline_properties: () -> Hash[Symbol, untyped]
348
287
 
349
- # @deprecated Use {#outline_properties} instead. Will be removed in 0.2.0.
350
- alias outline_pr outline_properties
351
-
352
288
  # Iterate over rows in the worksheet.
353
289
  #
354
290
  # @example
@@ -447,18 +383,6 @@ module Xlsxrb
447
383
  # : (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col) -> Array[Elements::Image]
448
384
  def images_at: (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col) -> Array[Elements::Image]
449
385
 
450
- # Yields self with images loaded or returns self.
451
- #
452
- # @deprecated Access {#images} directly. Lazy-loading is automatic. Will be removed in 0.2.0.
453
- # @yield [sheet]
454
- # @yieldparam sheet [Elements::Worksheet]
455
- # @return [Elements::Worksheet, void]
456
- # @api public
457
- # : () { (Elements::Worksheet) -> void } -> void
458
- # : () -> Elements::Worksheet
459
- def with_images: () { (Elements::Worksheet) -> void } -> void
460
- | () -> Elements::Worksheet
461
-
462
386
  # Returns whether the worksheet is valid according to OOXML specifications.
463
387
  #
464
388
  # @return [Boolean]
@@ -542,16 +466,6 @@ module Xlsxrb
542
466
  # @param col [Integer, String, Symbol, nil] Optional 0-based column index or column letter/Symbol.
543
467
  # @return [Elements::Cell, nil]
544
468
  # @api public
545
- # Access a cell by reference (e.g. "A1") or 0-based coordinate indices (row, col).
546
- #
547
- # @deprecated Use {#[]} instead (e.g. sheet["A1"] or sheet[0, 0]). Will be removed in 0.2.0.
548
- # @param ref_or_row [String, Symbol, Integer] Cell reference (e.g. "A1") or 0-based row index.
549
- # @param col [Integer, String, Symbol, nil] Optional 0-based column index or column letter/Symbol.
550
- # @return [Elements::Cell, nil]
551
- # @api public
552
- # : (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col) -> Elements::Cell?
553
- def cell: (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col) -> Elements::Cell?
554
-
555
469
  # Returns the formatted string representation of a cell's value.
556
470
  #
557
471
  # @param ref_or_row [String, Symbol, Integer] Cell reference (e.g. "A1") or 0-based row index.
@@ -561,25 +475,6 @@ module Xlsxrb
561
475
  # : (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col) -> String?
562
476
  def formatted_value: (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col) -> String?
563
477
 
564
- # Returns a new Worksheet with the specified cell updated.
565
- #
566
- # @example
567
- # new_sheet = sheet.update_cell("B1", value: "Updated")
568
- #
569
- # @param ref_or_row [String, Symbol, Integer] Cell reference (e.g. "B1") or 0-based row index.
570
- # @param col_or_value [Integer, String, Symbol, nil] 0-based column index or column letter/Symbol when ref_or_row is a row index.
571
- # @param value [Object] The new cell value.
572
- # @param style [String, Symbol, Hash, nil] Optional new style name or inline style properties.
573
- # @param style_index [Integer, nil] Optional new 0-based style index.
574
- # @param formula [Elements::Formula, nil] Optional new formula.
575
- # @param hyperlink [Hash, String, nil] Optional new hyperlink.
576
- # @deprecated Use {Xlsxrb.read} + {Xlsxrb.write} for streaming transformations or {Xlsxrb.write} DSL for report generation. Will be removed in 0.2.0.
577
- # @param comment [Hash, String, nil] Optional new comment.
578
- # @return [Worksheet] A new Worksheet instance.
579
- # @api public
580
- # : (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col_or_value, ?value: untyped, ?style: (String | Symbol | Hash[Symbol, untyped])?, ?style_index: (Integer | String | Symbol | Hash[Symbol, untyped])?, ?formula: Elements::Formula?, ?hyperlink: (Hash[Symbol, untyped] | String)?, ?comment: (Hash[Symbol, untyped] | String)?) -> Elements::Worksheet
581
- def update_cell: (String | Symbol | Integer ref_or_row, ?Integer | String | Symbol | nil col_or_value, ?value: untyped, ?style: (String | Symbol | Hash[Symbol, untyped])?, ?style_index: (Integer | String | Symbol | Hash[Symbol, untyped])?, ?formula: Elements::Formula?, ?hyperlink: (Hash[Symbol, untyped] | String)?, ?comment: (Hash[Symbol, untyped] | String)?) -> Elements::Worksheet
582
-
583
478
  # Returns a new Worksheet with attributes replaced (Data-like behavior).
584
479
  #
585
480
  # @param changes [Hash]
@@ -601,17 +496,6 @@ module Xlsxrb
601
496
  # : () -> Integer
602
497
  def hash: () -> Integer
603
498
 
604
- # Returns self when load is called on an already in-memory Worksheet.
605
- #
606
- # @return [Elements::Worksheet]
607
- # @api public
608
- # : () -> Elements::Worksheet
609
- def load: () -> Elements::Worksheet
610
-
611
- # @deprecated Use {#load} instead. Will be removed in 0.2.0.
612
- # : () -> Elements::Worksheet
613
- def to_worksheet: () -> Elements::Worksheet
614
-
615
499
  FORBIDDEN_NAME_CHARS: ::Regexp
616
500
 
617
501
  # @api private
@@ -274,8 +274,6 @@ module Xlsxrb
274
274
  private
275
275
 
276
276
  def element_name: (untyped local_name, untyped qname) -> untyped
277
-
278
- def xml_unescape: (untyped str) -> untyped
279
277
  end
280
278
 
281
279
  # SAX2 listener for parsing conditionalFormatting elements.
@@ -402,8 +400,6 @@ module Xlsxrb
402
400
  private
403
401
 
404
402
  def element_name: (untyped local_name, untyped qname) -> untyped
405
-
406
- def xml_unescape: (untyped str) -> untyped
407
403
  end
408
404
 
409
405
  # SAX2 listener for parsing pivotCacheRecords XML.
@@ -97,9 +97,6 @@ module Xlsxrb
97
97
  # Returns outline and grouping properties (<outlinePr>) for the given sheet.
98
98
  def outline_properties: (?sheet: untyped) -> untyped
99
99
 
100
- # @deprecated Use {#outline_properties} instead. Will be removed in 0.2.0.
101
- alias outline_pr outline_properties
102
-
103
100
  # Returns phonetic properties for the given sheet, or nil if not present.
104
101
  def phonetic_properties: (?sheet: untyped) -> untyped
105
102
 
@@ -3,7 +3,7 @@
3
3
  module Xlsxrb
4
4
  module Ooxml
5
5
  # SAX-based parser for xl/styles.xml.
6
- # Returns an Elements::Styles (Hash) with :num_fmts, :fonts, :fills, :borders, :cell_xfs, :cell_style_xfs.
6
+ # Returns an Elements::Styles (Hash) with :num_fmts, :fonts, :fills, :borders, :cell_xfs, :cell_style_xfs, :cell_styles.
7
7
  class StylesParser
8
8
  # : (String? xml_string) -> Elements::Styles
9
9
  def self.parse: (String? xml_string) -> Elements::Styles
@@ -34,6 +34,16 @@ module Xlsxrb
34
34
  # Default date-time format code used by Writer for Time cells.
35
35
  DEFAULT_DATETIME_FORMAT: ::String
36
36
 
37
+ # First bytes of the four-byte UTF-8 sequences, which encode the characters outside
38
+ # the Basic Multilingual Plane: two UTF-16 code units each.
39
+ SUPPLEMENTARY_LEAD_BYTES: untyped
40
+
41
+ # The length of UTF-8 text in UTF-16 code units, the unit Excel counts its text
42
+ # limits in (ADR 0011): one per character, and one more for each character outside
43
+ # the Basic Multilingual Plane, such as an emoji.
44
+ # : (String text) -> Integer
45
+ def self.utf16_length: (String text) -> Integer
46
+
37
47
  # Checks whether a serial number is a valid Excel date within the supported range.
38
48
  # : (untyped serial, ?date1904: bool) -> bool
39
49
  def self.valid_excel_date?: (untyped serial, ?date1904: bool) -> bool
@@ -46,9 +56,9 @@ module Xlsxrb
46
56
  # : (Numeric serial, ?date1904: bool) -> Date
47
57
  def self.serial_to_date: (Numeric serial, ?date1904: bool) -> Date
48
58
 
49
- # Converts a Time to a fractional Excel serial number (1900 or 1904 system).
50
- # : (Time time, ?date1904: bool) -> Float
51
- def self.datetime_to_serial: (Time time, ?date1904: bool) -> Float
59
+ # Converts a Time or DateTime to a fractional Excel serial number (1900 or 1904 system).
60
+ # : (Time | DateTime time, ?date1904: bool) -> Float
61
+ def self.datetime_to_serial: (Time | DateTime time, ?date1904: bool) -> Float
52
62
 
53
63
  # Converts a fractional Excel serial number to a Time (1900 or 1904 system, UTC).
54
64
  # Excel serial numbers carry no timezone metadata; returned Time objects are in UTC.
@@ -38,6 +38,14 @@ module Xlsxrb
38
38
 
39
39
  private
40
40
 
41
+ PIVOT_CACHE_OPTIONS: untyped
42
+
43
+ # Returns the source and keyword arguments of Writer#add_pivot_table for a pivot table hash,
44
+ # as the builders create it or as Xlsxrb.load reads it (with the source, field names, and
45
+ # shared items in :cache, and pivot field attributes in :fields).
46
+ # : (Hash[Symbol, untyped] pivot_table) -> [String?, Hash[Symbol, untyped]]
47
+ def pivot_table_arguments: (Hash[Symbol, untyped] pivot_table) -> [ String?, Hash[Symbol, untyped] ]
48
+
41
49
  def build_sheet_rels_from_list: (untyped rels) -> untyped
42
50
 
43
51
  def build_content_types: () -> untyped
@@ -54,6 +62,10 @@ module Xlsxrb
54
62
 
55
63
  def extract_dxf_from_rule!: (untyped rule) -> untyped
56
64
 
65
+ # Writes one <xf> of cellXfs, or of cellStyleXfs when style_xf_count is nil. An xfId that
66
+ # points past the written cellStyleXfs is dropped, so it falls back to the first entry.
67
+ def write_xf: (untyped builder, untyped format, style_xf_count: untyped) -> untyped
68
+
57
69
  def write_dxf_font: (untyped builder, untyped font) -> untyped
58
70
 
59
71
  def write_dxf_fill: (untyped builder, untyped fill) -> untyped
@@ -78,6 +90,11 @@ module Xlsxrb
78
90
 
79
91
  def escape_xml: (untyped value) -> untyped
80
92
 
93
+ # Escapes cell text: encodes it as ST_Xstring (XmlBuilder.encode_xstring), so that
94
+ # text that looks like _xHHHH_ and characters XML 1.0 cannot hold are read back as
95
+ # written, then escapes the XML special characters.
96
+ def escape_text: (untyped value) -> untyped
97
+
81
98
  def write_shared_strings_xml: (untyped zip) -> untyped
82
99
 
83
100
  def write_worksheet_xml: (untyped io, untyped sheet, ?drawing_rid: untyped, ?picture_rid: untyped, ?sheet_protection: untyped, ?protected_ranges: untyped, ?auto_filter: untyped, ?filter_columns: untyped, ?sort_state: untyped, ?merge_cells: untyped, ?conditional_formats: untyped, ?data_validations: untyped, ?hyperlinks: untyped, ?print_options: untyped, ?page_margins: untyped, ?page_setup: untyped, ?header_footer: untyped, ?row_breaks: untyped, ?col_breaks: untyped, ?column_breaks: untyped, ?cell_watches: untyped, ?ignored_errors: untyped, ?freeze_pane: untyped, ?split_pane: untyped, ?selection: untyped, ?sheet_view: untyped, ?sheet_properties: untyped, ?sheet_format: untyped, ?tables: untyped, ?table_start_rid: untyped, ?legacy_drawing_rid: untyped, ?sparkline_groups: untyped, ?phonetic_pr: untyped, ?sheet_calc_pr: untyped) -> untyped
@@ -45,12 +45,25 @@ module Xlsxrb
45
45
  # Extract an attribute value from a small tag substring (bounded search).
46
46
  def self.tag_attr: (untyped tag, untyped prefix) -> untyped
47
47
 
48
+ # Like tag_attr, with entity references such as &amp; and &quot; decoded.
49
+ def self.decoded_attr: (untyped tag, untyped prefix) -> untyped
50
+
48
51
  def self.fast_scan_cells_events: (untyped xml, untyped from, untyped to, untyped shared_strings, untyped row_source, ?untyped prefix, ?untyped shared_masters) ?{ (?) -> untyped } -> untyped
49
52
 
50
53
  def self.extract_inline_text: (untyped xml, untyped from, untyped to) -> untyped
51
54
 
52
55
  STRICT_NUMERIC_RE: ::Regexp
53
56
 
57
+ # Returns str without leading and trailing whitespace, allocating a new String only
58
+ # when there is whitespace to remove (cell values rarely have any).
59
+ # : (String str) -> String
60
+ def self.strip_ws: (String str) -> String
61
+
62
+ # Retags a String captured from the binary scan buffer as UTF-8 in place, without
63
+ # copying. Only for Strings the caller has just created (e.g. regex captures).
64
+ # : (String? str) -> String?
65
+ def self.utf8!: (String? str) -> String?
66
+
54
67
  # Resolves a cell value from its type attribute and parsed XML content (<v> or <is>).
55
68
  # Consolidates parsing across fast-scan direct, row values, events, and listener paths.
56
69
  # : (String? type, String? raw_value, String? is_xml, Array[String | Elements::RichText | untyped] shared_strings) -> untyped
@@ -99,6 +112,9 @@ module Xlsxrb
99
112
 
100
113
  COL_MAP: untyped
101
114
 
115
+ # Captures r, s, and t directly when they appear in the order Excel and xlsxrb write them
116
+ # (groups 1 to 3). Any other attribute set or order falls back to capturing the raw
117
+ # attribute string (group 4, or group 8 for a self-closing cell) for ATTR_* lookups.
102
118
  CELL_FAST_RE: ::Regexp
103
119
 
104
120
  CELL_GENERIC_RE: ::Regexp