3.3.2.65.1 Options for ColumnWorksheet_Options_for_Column
-a
Syntax: worksheet -a n
Add n columns to the active worksheet.
newbook; //Create a new workbook, default 1 sheet with 2 columns.
worksheet -a 3; //Add 3 columns to the workseet, now there are 5 columns in sheet1.
-c
Syntax: worksheet -c colName
Create a new Y column named colName and add it to the end of the worksheet
-f
Syntax: worksheet -f colRef colFormat
Set the colRef column to the given Format. colRef must be the column number.colFormat values: 1 = numeric, 2 = text, 3 = time, 4 = date, 5 = month, 6 = day of week, 7 = text & numeric.
col(B)=data(1,10); //Set col(B) value to be 1~10
worksheet -f 2 6; //Set col(B) format to be "day of week", see the change of the data.
-fd
Syntax: worksheet -fd colRef nDigits
Set the number of decimal digits (nDigits) to be used by the colRef column. ColRef must be the column number.
nDigits = -3 specifies free format.
Note: This option is only available for columns set to Numeric (see the -f option, above).
|
// New a workbook, fill col(B) with row #s
worksheet -f 2 1; // Change col(B) format to be ''Numeric''
worksheet -fd 2 2; // Set number of decimal digits to be 2
-fi
Syntax: worksheet -fi colRef internalType
Set the colRef column's internal type to the specified value. ColRef must be the column number. internalType: 1 = double, 2 = Real, 3 = short, 4 = long, 5 = Char, 6 = Byte, 7 = uShort, 8 = uLong, 9 = Complex.
Note: This option is only available for columns set to Numeric (see the -f option, above).
|
-i
Syntax: worksheet -i n name
Insert the name column as the n + 1 column in the worksheet.
worksheet -i 1 New; //Insert a column named "New" between col(A) and col(B)
-n
Syntax: worksheet -n colRef newName
Change the name of the colRef column to newName. ColRef must be the column number.
worksheet -n 2 NewNameB; // Rename col(B) to be "NewNameB"
This script renames each column as C1, C2, C3, etc., and fills each column with 100 values.
for (ii = 1; ii <= 20; ii++)
{
work -n $(ii) C$(ii);
work -t $(ii) 1;
wcol(ii)=data(ii, 100, ii);
}
-so D
Syntax: worksheet -so D
Delete the selected worksheet column.
-so I
Syntax: worksheet -so I
Insert a column in front of selected worksheet column.
-sou Y
Syntax: worksheet -sou Y X/Y/Z, etc.
Set the column designation of a single, selected column to X, Y, Z, etc. For designations, List Control Symbols in this table.
-t
Syntax: worksheet -t colRef colType
Set the colRef column as the given column type. ColRef must be the column number.
colType: 1 = Y, 2 = Disregard, 3 = Y Error, 4 = X, 5 = Label, 6 = Z, 7 = X Error, 8 = Grouping and 9 = Subject. If enter colType larger than 9, col would be set as ?? which is meaningless.
Note: If colRef does not exist currently, it would NOT add a new column automatically, instead, a command error message would shown. User should use existed columns only or add new column before run this command.
|
worksheet -a 1; // Add a third column to a new-created worksheet.
worksheet -t 3 3; // Set col(C) as Y-Error
This script renames each column as C1, C2, C3, etc., and fills each column with 100 values.
for (ii = 1; ii <= 20; ii++)
{
work -n $(ii) C$(ii);
work -t $(ii) 1;
wcol(ii)=data(ii, 100, ii);
}
-v
Syntax: worksheet -v colName
Verify that a named column exists. Create the column if it does not exist. Otherwise, do nothing.
Note: If the column is created, the end display range is set to row 0.
|
worksheet -v NewCol; // Create a new column named "NewCol" if there was no such one.
worksheet -v NewCol; // Because there is already such a col, nothing happens.
|