Class: MicrosoftGraph::Models::WorkbookRange

Inherits:
Entity
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/workbook_range.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Entity

#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=

Constructor Details

#initializeObject

Instantiates a new workbookRange and sets the default values.



163
164
165
# File 'lib/models/workbook_range.rb', line 163

def initialize()
    super
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a workbook_range

Raises:

  • (StandardError)


171
172
173
174
# File 'lib/models/workbook_range.rb', line 171

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return WorkbookRange.new
end

Instance Method Details

#addressObject

Gets the address property value. Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. Sheet1!A1:B4). Read-only.

Returns:

  • a string



73
74
75
# File 'lib/models/workbook_range.rb', line 73

def address
    return @address
end

#address=(value) ⇒ Object

Sets the address property value. Represents the range reference in A1-style. Address value will contain the Sheet reference (e.g. Sheet1!A1:B4). Read-only.

Parameters:

  • value

    Value to set for the address property.

Returns:

  • a void



81
82
83
# File 'lib/models/workbook_range.rb', line 81

def address=(value)
    @address = value
end

#address_localObject

Gets the addressLocal property value. Represents range reference for the specified range in the language of the user. Read-only.

Returns:

  • a string



88
89
90
# File 'lib/models/workbook_range.rb', line 88

def address_local
    return @address_local
end

#address_local=(value) ⇒ Object

Sets the addressLocal property value. Represents range reference for the specified range in the language of the user. Read-only.

Parameters:

  • value

    Value to set for the addressLocal property.

Returns:

  • a void



96
97
98
# File 'lib/models/workbook_range.rb', line 96

def address_local=(value)
    @address_local = value
end

#cell_countObject

Gets the cellCount property value. Number of cells in the range. Read-only.

Returns:

  • a integer



103
104
105
# File 'lib/models/workbook_range.rb', line 103

def cell_count
    return @cell_count
end

#cell_count=(value) ⇒ Object

Sets the cellCount property value. Number of cells in the range. Read-only.

Parameters:

  • value

    Value to set for the cellCount property.

Returns:

  • a void



111
112
113
# File 'lib/models/workbook_range.rb', line 111

def cell_count=(value)
    @cell_count = value
end

#column_countObject

Gets the columnCount property value. Represents the total number of columns in the range. Read-only.

Returns:

  • a integer



118
119
120
# File 'lib/models/workbook_range.rb', line 118

def column_count
    return @column_count
end

#column_count=(value) ⇒ Object

Sets the columnCount property value. Represents the total number of columns in the range. Read-only.

Parameters:

  • value

    Value to set for the columnCount property.

Returns:

  • a void



126
127
128
# File 'lib/models/workbook_range.rb', line 126

def column_count=(value)
    @column_count = value
end

#column_hiddenObject

Gets the columnHidden property value. Represents if all columns of the current range are hidden.

Returns:

  • a boolean



133
134
135
# File 'lib/models/workbook_range.rb', line 133

def column_hidden
    return @column_hidden
end

#column_hidden=(value) ⇒ Object

Sets the columnHidden property value. Represents if all columns of the current range are hidden.

Parameters:

  • value

    Value to set for the columnHidden property.

Returns:

  • a void



141
142
143
# File 'lib/models/workbook_range.rb', line 141

def column_hidden=(value)
    @column_hidden = value
end

#column_indexObject

Gets the columnIndex property value. Represents the column number of the first cell in the range. Zero-indexed. Read-only.

Returns:

  • a integer



148
149
150
# File 'lib/models/workbook_range.rb', line 148

def column_index
    return @column_index
end

#column_index=(value) ⇒ Object

Sets the columnIndex property value. Represents the column number of the first cell in the range. Zero-indexed. Read-only.

Parameters:

  • value

    Value to set for the columnIndex property.

Returns:

  • a void



156
157
158
# File 'lib/models/workbook_range.rb', line 156

def column_index=(value)
    @column_index = value
end

#formatObject

Gets the format property value. Returns a format object, encapsulating the range’s font, fill, borders, alignment, and other properties. Read-only.

Returns:

  • a workbook_range_format



179
180
181
# File 'lib/models/workbook_range.rb', line 179

def format
    return @format
end

#format=(value) ⇒ Object

Sets the format property value. Returns a format object, encapsulating the range’s font, fill, borders, alignment, and other properties. Read-only.

Parameters:

  • value

    Value to set for the format property.

Returns:

  • a void



187
188
189
# File 'lib/models/workbook_range.rb', line 187

def format=(value)
    @format = value
end

#formulasObject

Gets the formulas property value. Represents the formula in A1-style notation.

Returns:

  • a json



194
195
196
# File 'lib/models/workbook_range.rb', line 194

def formulas
    return @formulas
end

#formulas=(value) ⇒ Object

Sets the formulas property value. Represents the formula in A1-style notation.

Parameters:

  • value

    Value to set for the formulas property.

Returns:

  • a void



202
203
204
# File 'lib/models/workbook_range.rb', line 202

def formulas=(value)
    @formulas = value
end

#formulas_localObject

Gets the formulasLocal property value. Represents the formula in A1-style notation, in the user’s language and number-formatting locale. For example, the English ‘=SUM(A1, 1.5)’ formula would become ‘=SUMME(A1; 1,5)’ in German.

Returns:

  • a json



209
210
211
# File 'lib/models/workbook_range.rb', line 209

def formulas_local
    return @formulas_local
end

#formulas_local=(value) ⇒ Object

Sets the formulasLocal property value. Represents the formula in A1-style notation, in the user’s language and number-formatting locale. For example, the English ‘=SUM(A1, 1.5)’ formula would become ‘=SUMME(A1; 1,5)’ in German.

Parameters:

  • value

    Value to set for the formulasLocal property.

Returns:

  • a void



217
218
219
# File 'lib/models/workbook_range.rb', line 217

def formulas_local=(value)
    @formulas_local = value
end

#formulas_r1_c1Object

Gets the formulasR1C1 property value. Represents the formula in R1C1-style notation.

Returns:

  • a json



224
225
226
# File 'lib/models/workbook_range.rb', line 224

def formulas_r1_c1
    return @formulas_r1_c1
end

#formulas_r1_c1=(value) ⇒ Object

Sets the formulasR1C1 property value. Represents the formula in R1C1-style notation.

Parameters:

  • value

    Value to set for the formulasR1C1 property.

Returns:

  • a void



232
233
234
# File 'lib/models/workbook_range.rb', line 232

def formulas_r1_c1=(value)
    @formulas_r1_c1 = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# File 'lib/models/workbook_range.rb', line 239

def get_field_deserializers()
    return super.merge({
        "address" => lambda {|n| @address = n.get_string_value() },
        "addressLocal" => lambda {|n| @address_local = n.get_string_value() },
        "cellCount" => lambda {|n| @cell_count = n.get_number_value() },
        "columnCount" => lambda {|n| @column_count = n.get_number_value() },
        "columnHidden" => lambda {|n| @column_hidden = n.get_boolean_value() },
        "columnIndex" => lambda {|n| @column_index = n.get_number_value() },
        "format" => lambda {|n| @format = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookRangeFormat.create_from_discriminator_value(pn) }) },
        "formulas" => lambda {|n| @formulas = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "formulasLocal" => lambda {|n| @formulas_local = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "formulasR1C1" => lambda {|n| @formulas_r1_c1 = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "hidden" => lambda {|n| @hidden = n.get_boolean_value() },
        "numberFormat" => lambda {|n| @number_format = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "rowCount" => lambda {|n| @row_count = n.get_number_value() },
        "rowHidden" => lambda {|n| @row_hidden = n.get_boolean_value() },
        "rowIndex" => lambda {|n| @row_index = n.get_number_value() },
        "sort" => lambda {|n| @sort = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookRangeSort.create_from_discriminator_value(pn) }) },
        "text" => lambda {|n| @text = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "valueTypes" => lambda {|n| @value_types = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "values" => lambda {|n| @values = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::Json.create_from_discriminator_value(pn) }) },
        "worksheet" => lambda {|n| @worksheet = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::WorkbookWorksheet.create_from_discriminator_value(pn) }) },
    })
end

#hiddenObject

Gets the hidden property value. Represents if all cells of the current range are hidden. Read-only.

Returns:

  • a boolean



267
268
269
# File 'lib/models/workbook_range.rb', line 267

def hidden
    return @hidden
end

#hidden=(value) ⇒ Object

Sets the hidden property value. Represents if all cells of the current range are hidden. Read-only.

Parameters:

  • value

    Value to set for the hidden property.

Returns:

  • a void



275
276
277
# File 'lib/models/workbook_range.rb', line 275

def hidden=(value)
    @hidden = value
end

#number_formatObject

Gets the numberFormat property value. Represents Excel’s number format code for the given cell.

Returns:

  • a json



282
283
284
# File 'lib/models/workbook_range.rb', line 282

def number_format
    return @number_format
end

#number_format=(value) ⇒ Object

Sets the numberFormat property value. Represents Excel’s number format code for the given cell.

Parameters:

  • value

    Value to set for the numberFormat property.

Returns:

  • a void



290
291
292
# File 'lib/models/workbook_range.rb', line 290

def number_format=(value)
    @number_format = value
end

#row_countObject

Gets the rowCount property value. Returns the total number of rows in the range. Read-only.

Returns:

  • a integer



297
298
299
# File 'lib/models/workbook_range.rb', line 297

def row_count
    return @row_count
end

#row_count=(value) ⇒ Object

Sets the rowCount property value. Returns the total number of rows in the range. Read-only.

Parameters:

  • value

    Value to set for the rowCount property.

Returns:

  • a void



305
306
307
# File 'lib/models/workbook_range.rb', line 305

def row_count=(value)
    @row_count = value
end

#row_hiddenObject

Gets the rowHidden property value. Represents if all rows of the current range are hidden.

Returns:

  • a boolean



312
313
314
# File 'lib/models/workbook_range.rb', line 312

def row_hidden
    return @row_hidden
end

#row_hidden=(value) ⇒ Object

Sets the rowHidden property value. Represents if all rows of the current range are hidden.

Parameters:

  • value

    Value to set for the rowHidden property.

Returns:

  • a void



320
321
322
# File 'lib/models/workbook_range.rb', line 320

def row_hidden=(value)
    @row_hidden = value
end

#row_indexObject

Gets the rowIndex property value. Returns the row number of the first cell in the range. Zero-indexed. Read-only.

Returns:

  • a integer



327
328
329
# File 'lib/models/workbook_range.rb', line 327

def row_index
    return @row_index
end

#row_index=(value) ⇒ Object

Sets the rowIndex property value. Returns the row number of the first cell in the range. Zero-indexed. Read-only.

Parameters:

  • value

    Value to set for the rowIndex property.

Returns:

  • a void



335
336
337
# File 'lib/models/workbook_range.rb', line 335

def row_index=(value)
    @row_index = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/models/workbook_range.rb', line 343

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    super
    writer.write_string_value("address", @address)
    writer.write_string_value("addressLocal", @address_local)
    writer.write_number_value("cellCount", @cell_count)
    writer.write_number_value("columnCount", @column_count)
    writer.write_boolean_value("columnHidden", @column_hidden)
    writer.write_number_value("columnIndex", @column_index)
    writer.write_object_value("format", @format)
    writer.write_object_value("formulas", @formulas)
    writer.write_object_value("formulasLocal", @formulas_local)
    writer.write_object_value("formulasR1C1", @formulas_r1_c1)
    writer.write_boolean_value("hidden", @hidden)
    writer.write_object_value("numberFormat", @number_format)
    writer.write_number_value("rowCount", @row_count)
    writer.write_boolean_value("rowHidden", @row_hidden)
    writer.write_number_value("rowIndex", @row_index)
    writer.write_object_value("sort", @sort)
    writer.write_object_value("text", @text)
    writer.write_object_value("valueTypes", @value_types)
    writer.write_object_value("values", @values)
    writer.write_object_value("worksheet", @worksheet)
end

#sortObject

Gets the sort property value. The worksheet containing the current range. Read-only.

Returns:

  • a workbook_range_sort



371
372
373
# File 'lib/models/workbook_range.rb', line 371

def sort
    return @sort
end

#sort=(value) ⇒ Object

Sets the sort property value. The worksheet containing the current range. Read-only.

Parameters:

  • value

    Value to set for the sort property.

Returns:

  • a void



379
380
381
# File 'lib/models/workbook_range.rb', line 379

def sort=(value)
    @sort = value
end

#textObject

Gets the text property value. Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only.

Returns:

  • a json



386
387
388
# File 'lib/models/workbook_range.rb', line 386

def text
    return @text
end

#text=(value) ⇒ Object

Sets the text property value. Text values of the specified range. The Text value will not depend on the cell width. The # sign substitution that happens in Excel UI will not affect the text value returned by the API. Read-only.

Parameters:

  • value

    Value to set for the text property.

Returns:

  • a void



394
395
396
# File 'lib/models/workbook_range.rb', line 394

def text=(value)
    @text = value
end

#value_typesObject

Gets the valueTypes property value. Represents the type of data of each cell. The possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. Read-only.

Returns:

  • a json



401
402
403
# File 'lib/models/workbook_range.rb', line 401

def value_types
    return @value_types
end

#value_types=(value) ⇒ Object

Sets the valueTypes property value. Represents the type of data of each cell. The possible values are: Unknown, Empty, String, Integer, Double, Boolean, Error. Read-only.

Parameters:

  • value

    Value to set for the valueTypes property.

Returns:

  • a void



409
410
411
# File 'lib/models/workbook_range.rb', line 409

def value_types=(value)
    @value_types = value
end

#valuesObject

Gets the values property value. Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string.

Returns:

  • a json



416
417
418
# File 'lib/models/workbook_range.rb', line 416

def values
    return @values
end

#values=(value) ⇒ Object

Sets the values property value. Represents the raw values of the specified range. The data returned could be of type string, number, or a boolean. Cell that contain an error will return the error string.

Parameters:

  • value

    Value to set for the values property.

Returns:

  • a void



424
425
426
# File 'lib/models/workbook_range.rb', line 424

def values=(value)
    @values = value
end

#worksheetObject

Gets the worksheet property value. The worksheet containing the current range. Read-only.

Returns:

  • a workbook_worksheet



431
432
433
# File 'lib/models/workbook_range.rb', line 431

def worksheet
    return @worksheet
end

#worksheet=(value) ⇒ Object

Sets the worksheet property value. The worksheet containing the current range. Read-only.

Parameters:

  • value

    Value to set for the worksheet property.

Returns:

  • a void



439
440
441
# File 'lib/models/workbook_range.rb', line 439

def worksheet=(value)
    @worksheet = value
end