OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                           
 

2.2.3.55 wproperties

Brief Information

Get or set worksheet properties using a tree

Additional Information

X-Function not designed for Auto GetN Dialog.

Command Line Usage

1. wproperties execute:=get iotrgui:=tr; tr.TextControl.ApplyTo$="Comments"; wproperties execute:=set iotrgui:=tr;

2. wproperties execute:=get iotrgui:=tr; tr.TextControl.Merge=1; wproperties execute:=set iotrgui:=tr;

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Worksheet iw

Input

Worksheet

<active>

Specified the input worksheet.

Execute Mode execute

Input

int

get

Decide to get or set the worksheet property.
Option list

  • get:Get Properties
    Get the worksheet properties.
  • set:Set Properties
    Set the worksheet properties.
GUI Tree iotrgui

Input/Output

TreeNode

guitree

The worksheet property tree.
See more details in Description table

Description

This X-Function can be used to get the worksheet properties tree iotrgui(exectute:=0), or set the worksheet properties tree iotrgui(exectute:=1).

The descriptions of each variables in the tree are given as follows (Suppose GUI Tree is GuiTree.):

View

Syntax: GuiTree.View.TreeNode=<value>;

Example: GuiTree.View.GridLines.DrawBounds=1;

TreeNode Default Description
RowLabels.LabelNames 1 Control the display of the row labels for the column label rows.
Headings.ColHeader 1 Control the display of the column headers.
Headings.RowHeader 1 Control the display of the row headers.
GridLines.ColGrids 1 Control the display of the column grids.
GridLines.RowGrids 1 Control the display of the row grids.
GridLines.DrawBounds 0 Control the display of the preview lines of page break.

Please refer to View tab of Worksheet Properties.

SheetSize

Syntax: GuiTree.SheetSize.TreeNode=<value>;

Example: GuiTree.SheetSize.ColNam=50;

TreeNode Default Description
RowNum 32 Specify the number of rows in the worksheet.
ColNum 2 Specify the number of columns in the worksheet.

Please refer to the Size section of Size tab of Worksheet Properties.

WksMeasure

Syntax: GuiTree.WksMeasure.TreeNode=<value>;

Example: GuiTree.WksMeasure.TopGap=2;

TreeNode Default Description
ColHeaderHeight 150 Specify the height of the column header.
RowHeaderWidth 128 Specify the width of the row header.
TopGap 0 Specify the height of gap between the workbook window title bar and the worksheet.
AllRowHeight 100 Specify the height of cells in the worksheet.
AllColWidth 100 Specify the width of cells in the worksheet.

Please refer to the Worksheet Measurement (% of Test Height) section of Size tab of Worksheet Properties.

TextControl

Syntax: GuiTree.TextControl.TreeNode=<value>;

Example: GuiTree.TextControl.ApplyTo$="Comments"; GuiTree.TextControl.OriginTextControl=1;

TreeNode Default Description
ApplyTo Data Specify the range that the format setting used to apply to, options including Standard, Column Labels, Data, Column Header, Row Header, Long Name, Units and Comments.
OriginTextControl 0 Specify whether rich text formatting (for example, superscript and subscript) is enabled for the selected cells.
AllowEnter 1 Whether allow "enter" to be used in the specified cell. If it is set to 1, double-clicking or pressing F2 in the specified cell will allow you to edit the cell content and you can use SHIFT + ENTER to separate the text into different rows.
WrapText 1 If 1, Origin will not wrap in the middle of words in a cell. If 0, Origin will wrap in the middle of words in a cell.
Float 1 Specify whether allows text in a cell to overflow into the cell on its right.
ReadOnly 0 Whether allow to type in the cells or make any changes to the worksheet content. It is accessible only when the ApplyTo is set to Standard, Data or Column Labels.
Ellipsis 2 If neither floating (Float) nor wrapping (WrapText) is used, ellipsis (### (2), by default) could be displayed to tell the user that the whole text cannot be fully shown. Also, It can display None (0) or ... (1).
Merge 0 Specify the direction to merge adjacent cells that contain the same text. Options include:
  • 0: None
  • 1: Horizontal
  • 2: Vertical
  • 3: Both
BlankMissing 0 By default, missing value in a cell is displayed as "--". By setting this to 1, you can hide the "--" symbols and show the cells with missing values as empty.
Type 0 Specify the formatting of the cells. Options include:
  • 0: Text & Numeric
  • 1: Time
  • 2: Date
Display 0 Specify numeric data display form. Options for numeric data include:
  • 0: Decimal: 1000
  • 1: Scientific 1E3
  • 2: Engineering: 1K
  • 3: Decimal: 1,000
DigitsMode 0 Specify decimal number for numeric data. Options include:
  • 0: Default Decimal Digits
  • 1: Set Decimal Places =: It can be used to specify number of decimal places.
  • 2: Significant Digits =: It can be used to specify the number of significant digits.
FontControl.Face 0 Specify the font of worksheet.
FontControl.Size 9 Specify the font size.
ColorControl.Color 0 Specify the text color in the worksheet cells.
ColorControl.FillColor 17 Specify the color used to fill the cells.

Please refer to Format tab of Worksheet Properties.

Other

Syntax: GuiTree.Other.TreeNode=<value>;

Example: GuiTree.Other.AutoAddRows=0;

TreeNode Default Description
AutoAddRows 1 Specify whether rows should be added automatically.
AutoResizeCell 0 Specify whether or not to change the worksheet size to make it fit with the window size when the workbook is resized.

Please refer to Miscellaneous tab of Worksheet Properties.

 

© OriginLab Corporation. All rights reserved.