Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter EightData Functions (continued)

DataSheetGetCell Function

Overview

The DataSheetGetCell function returns all the available properties for a cell in the form of a string array.

Syntax/Parameters

Syntax

string[] = DataSheetGetCell ( handle hSheet, int row, int column );

string[] = DataSheetGetCell ( handle hSheet, string row, string column );

string[] = DataSheetGetCell ( handle hSheet, string address );

Parameters

hSheet

A handle to a Data Sheet Object.

row

An int or string specifying a zero-based row or Y position for the cell.

column

An int or string specifying a zero-based column or X position for the cell.

address

A string specifying the cell position by cell address such as “A1”.

Return Value

Returns a string array containing various data fields related to the cell or an empty array on failure. Use the GetLastError function to retrieve error information.

Remarks

The DataSheetGetCell function does not return the display text associated with the cell. The returned array will have the following fields (as represented by key names) present even if the fields do not contain data or if the cell does not physically exist:

  Element Key Name   Description  
         
  RowIndex   The zero-based row index of the cell. Same as the address specified in call.  
  ColumnIndex   The zero-based column index of the cell. Same as the address specified in call.  
  Display   Display data. This is normally the native data unless the content is formatted. This field can be up to 1 MB in size.  
  Flags   A hex representation of the bitwise cell flags in the form of DS_CF_. See introduction to this section for details.  
  Attributes   Aggregate attributes in the form of a CSV list. These are further disassembled below. This field can be up to 1 MB in size.  
  ColumnSpan   Zero-based column span.  
  RowSpan   Zero-based row span.†  
  ContentHeight   Measured content height in pixels.  
  ContentWidth   Measured content width in pixels.  
  StyleIndex   Style index for display.  
  DisplayFlags   Extended display flags in the form of DS_CD_. The value depends on the underlying type and bits share positions across types. See introduction to this section for details.  

 

Attribute fields will be present if the cell has aggregate attribute data (even if the attribute fields are empty):

  FieldTypeData   Extended field data for non-text style cells.  
  NativeData   Native data for non-text style cells. For example, the text of a radio style button.  
  Name   The name of the cell.  
  Description   The description of the cell.  
  Tip   An optional popup tip. Tips are only displayed if the host view supports tooltip popups.  
  Comment   A general comment.  
  Review   A review note.  
  PrivateA   General caller private data.  
  PrivateB   General caller private data.  
  Events   Script Events.  

 

Because the function can return empty fields or an empty array on error if the cell does not exist or if the cell is empty, the GetLastError function should be used to determine if an error occurred.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic

Page revised 2024-12-13