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.



2413
2414
2415
# File 'generated/google/apis/sheets_v4/classes.rb', line 2413

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

Instance Attribute Details

#data_source_formulaGoogle::Apis::SheetsV4::DataSourceFormula

A data source formula. Corresponds to the JSON property dataSourceFormula



2347
2348
2349
# File 'generated/google/apis/sheets_v4/classes.rb', line 2347

def data_source_formula
  @data_source_formula
end

#data_source_tableGoogle::Apis::SheetsV4::DataSourceTable

A data source table, allowing to import a static table of data from the DataSource into Sheets. This is also known as "Extract" in the Sheets editor. Corresponds to the JSON property dataSourceTable



2353
2354
2355
# File 'generated/google/apis/sheets_v4/classes.rb', line 2353

def data_source_table
  @data_source_table
end

#data_validationGoogle::Apis::SheetsV4::DataValidationRule

A data validation rule. Corresponds to the JSON property dataValidation



2358
2359
2360
# File 'generated/google/apis/sheets_v4/classes.rb', line 2358

def data_validation
  @data_validation
end

#effective_formatGoogle::Apis::SheetsV4::CellFormat

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



2363
2364
2365
# File 'generated/google/apis/sheets_v4/classes.rb', line 2363

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



2368
2369
2370
# File 'generated/google/apis/sheets_v4/classes.rb', line 2368

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)


2374
2375
2376
# File 'generated/google/apis/sheets_v4/classes.rb', line 2374

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 in the userEnteredValue.formulaValue field.) Corresponds to the JSON property hyperlink

Returns:

  • (String)


2380
2381
2382
# File 'generated/google/apis/sheets_v4/classes.rb', line 2380

def hyperlink
  @hyperlink
end

#noteString

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

Returns:

  • (String)


2385
2386
2387
# File 'generated/google/apis/sheets_v4/classes.rb', line 2385

def note
  @note
end

#pivot_tableGoogle::Apis::SheetsV4::PivotTable

A pivot table. Corresponds to the JSON property pivotTable



2390
2391
2392
# File 'generated/google/apis/sheets_v4/classes.rb', line 2390

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 are erased. Corresponds to the JSON property textFormatRuns



2401
2402
2403
# File 'generated/google/apis/sheets_v4/classes.rb', line 2401

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



2406
2407
2408
# File 'generated/google/apis/sheets_v4/classes.rb', line 2406

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



2411
2412
2413
# File 'generated/google/apis/sheets_v4/classes.rb', line 2411

def user_entered_value
  @user_entered_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
# File 'generated/google/apis/sheets_v4/classes.rb', line 2418

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