Class: Google::Apis::SheetsV4::CellData

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/sheets_v4/classes.rb,
generated/google/apis/sheets_v4/representations.rb,
generated/google/apis/sheets_v4/representations.rb

Overview

Data about a specific cell.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CellData

Returns a new instance of CellData



4294
4295
4296
# File 'generated/google/apis/sheets_v4/classes.rb', line 4294

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#data_validationGoogle::Apis::SheetsV4::DataValidationRule

A data validation rule. Corresponds to the JSON property dataValidation



4292
4293
4294
# File 'generated/google/apis/sheets_v4/classes.rb', line 4292

def data_validation
  @data_validation
end

#effective_formatGoogle::Apis::SheetsV4::CellFormat

The format of a cell. Corresponds to the JSON property effectiveFormat



4282
4283
4284
# File 'generated/google/apis/sheets_v4/classes.rb', line 4282

def effective_format
  @effective_format
end

#effective_valueGoogle::Apis::SheetsV4::ExtendedValue

The kinds of value that a cell in a spreadsheet can have. Corresponds to the JSON property effectiveValue



4237
4238
4239
# File 'generated/google/apis/sheets_v4/classes.rb', line 4237

def effective_value
  @effective_value
end

#formatted_valueString

The formatted value of the cell. This is the value as it's shown to the user. This field is read-only. Corresponds to the JSON property formattedValue

Returns:

  • (String)


4244
4245
4246
# File 'generated/google/apis/sheets_v4/classes.rb', line 4244

def formatted_value
  @formatted_value
end

A hyperlink this cell points to, if any. This field is read-only. (To set it, use a =HYPERLINK formula.) Corresponds to the JSON property hyperlink

Returns:

  • (String)


4262
4263
4264
# File 'generated/google/apis/sheets_v4/classes.rb', line 4262

def hyperlink
  @hyperlink
end

#noteString

Any note on the cell. Corresponds to the JSON property note

Returns:

  • (String)


4277
4278
4279
# File 'generated/google/apis/sheets_v4/classes.rb', line 4277

def note
  @note
end

#pivot_tableGoogle::Apis::SheetsV4::PivotTable

A pivot table. Corresponds to the JSON property pivotTable



4267
4268
4269
# File 'generated/google/apis/sheets_v4/classes.rb', line 4267

def pivot_table
  @pivot_table
end

#text_format_runsArray<Google::Apis::SheetsV4::TextFormatRun>

Runs of rich text applied to subsections of the cell. Runs are only valid on user entered strings, not formulas, bools, or numbers. Runs start at specific indexes in the text and continue until the next run. Properties of a run will continue unless explicitly changed in a subsequent run (and properties of the first run will continue the properties of the cell unless explicitly changed). When writing, the new runs will overwrite any prior runs. When writing a new user_entered_value, previous runs will be erased. Corresponds to the JSON property textFormatRuns



4256
4257
4258
# File 'generated/google/apis/sheets_v4/classes.rb', line 4256

def text_format_runs
  @text_format_runs
end

#user_entered_formatGoogle::Apis::SheetsV4::CellFormat

The format of a cell. Corresponds to the JSON property userEnteredFormat



4272
4273
4274
# File 'generated/google/apis/sheets_v4/classes.rb', line 4272

def user_entered_format
  @user_entered_format
end

#user_entered_valueGoogle::Apis::SheetsV4::ExtendedValue

The kinds of value that a cell in a spreadsheet can have. Corresponds to the JSON property userEnteredValue



4287
4288
4289
# File 'generated/google/apis/sheets_v4/classes.rb', line 4287

def user_entered_value
  @user_entered_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
# File 'generated/google/apis/sheets_v4/classes.rb', line 4299

def update!(**args)
  @effective_value = args[:effective_value] if args.key?(:effective_value)
  @formatted_value = args[:formatted_value] if args.key?(:formatted_value)
  @text_format_runs = args[:text_format_runs] if args.key?(:text_format_runs)
  @hyperlink = args[:hyperlink] if args.key?(:hyperlink)
  @pivot_table = args[:pivot_table] if args.key?(:pivot_table)
  @user_entered_format = args[:user_entered_format] if args.key?(:user_entered_format)
  @note = args[:note] if args.key?(:note)
  @effective_format = args[:effective_format] if args.key?(:effective_format)
  @user_entered_value = args[:user_entered_value] if args.key?(:user_entered_value)
  @data_validation = args[:data_validation] if args.key?(:data_validation)
end