Column:Fill Column With:A set of Numbers
Fill column with numeric data
Minimum Origin Version Required: 9.1 SR0
1. patternN irng:=col(A) from:=5 to:=1 inc:=-1;//Fill value 5, 4, 3, 2, 1 to the first 5 cells in column A
2. patternN irng:=[Book1]1!(1,2) from:=0 to:=1 inc:=0.5 mode:=1 size:=100;//Randomly fill values 0,0.5,1 to the first two columns of Book1 sheet1, each column will have 100 rows of data.
Please refer to the page for additional option switches when accessing the x-function from script
Display Name |
Variable Name |
I/O and Type |
Default Value |
Description |
---|---|---|---|---|
Input | irng |
Input Range |
|
Specifies the range of data columns you would like to fill values to. |
From | from |
Input double |
|
Specify the starting value of the generated data sequence. |
To | to |
Input double |
|
Specify the ending value of the generated data sequence. |
Increment | inc |
Input double |
|
Specify the increment within the generated data sequence. |
Mode | mode |
Input int |
|
Specify how the generated data should be arranged.
Option list:
|
Repeat Times for Each Value | onerepeat |
Input int |
|
This variable is only controllable when the Mode variable is 0:Repeat. It specifies how many times each value repeats itself in the generated data sequence. |
Repeat Times for The Sequence | seqrepeat |
Input int |
|
This variable is only controllable when the Mode variable is 0:Repeat. It specifies how many times each whole data sequence repeats itself in the generated dataset. |
Total Number of Whole Set | size |
Input int |
|
This variable is only writable when the Mode variable is 1:Random. It specifies the total number of values in the whole dataset which will be generated based on the current setting. |
For GUI access of this function, see this help file.
Create a new workbook and highlight the first column (column A), in the Script Window or Command Window, run the following script:
patternN from:=0 to:=100 inc:=10 onerepeat:=2 seqrepeat:=3;
This script repeatedly fills the active column with three sets of data sequences. The data sequence is defined in the form of 0 0 10 10...90 90 100 100, that each value repeats itself twice.