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

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

Overview

Data about a specific cell.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CellData

Returns a new instance of CellData.



2539
2540
2541
# File 'lib/google/apis/sheets_v4/classes.rb', line 2539

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



2469
2470
2471
# File 'lib/google/apis/sheets_v4/classes.rb', line 2469

def data_source_formula
  @data_source_formula
end

#data_source_tableGoogle::Apis::SheetsV4::DataSourceTable

A data source table, which allows the user 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



2476
2477
2478
# File 'lib/google/apis/sheets_v4/classes.rb', line 2476

def data_source_table
  @data_source_table
end

#data_validationGoogle::Apis::SheetsV4::DataValidationRule

A data validation rule. Corresponds to the JSON property dataValidation



2481
2482
2483
# File 'lib/google/apis/sheets_v4/classes.rb', line 2481

def data_validation
  @data_validation
end

#effective_formatGoogle::Apis::SheetsV4::CellFormat

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



2486
2487
2488
# File 'lib/google/apis/sheets_v4/classes.rb', line 2486

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



2491
2492
2493
# File 'lib/google/apis/sheets_v4/classes.rb', line 2491

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)


2497
2498
2499
# File 'lib/google/apis/sheets_v4/classes.rb', line 2497

def formatted_value
  @formatted_value
end

A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field will be empty. This field is read-only. To set it, use a =HYPERLINK formula in the userEnteredValue.formulaValue field. A cell- level link can also be set from the userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the textFormatRun.format.link field that spans the entire cell. Corresponds to the JSON property hyperlink

Returns:

  • (String)


2507
2508
2509
# File 'lib/google/apis/sheets_v4/classes.rb', line 2507

def hyperlink
  @hyperlink
end

#noteString

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

Returns:

  • (String)


2512
2513
2514
# File 'lib/google/apis/sheets_v4/classes.rb', line 2512

def note
  @note
end

#pivot_tableGoogle::Apis::SheetsV4::PivotTable

A pivot table. Corresponds to the JSON property pivotTable



2517
2518
2519
# File 'lib/google/apis/sheets_v4/classes.rb', line 2517

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. Properties of a run start at a specific index in the text and continue until the next run. Runs will inherit 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



2527
2528
2529
# File 'lib/google/apis/sheets_v4/classes.rb', line 2527

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



2532
2533
2534
# File 'lib/google/apis/sheets_v4/classes.rb', line 2532

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



2537
2538
2539
# File 'lib/google/apis/sheets_v4/classes.rb', line 2537

def user_entered_value
  @user_entered_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
# File 'lib/google/apis/sheets_v4/classes.rb', line 2544

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