
Contents |
Set Column Values...
Apply the formula values onto the selected column
Minimum Origin Version Required: Origin 8.5 SR0. X-Function not designed for Auto GetN Dialog.
1. csetvalue formula:="int(rnd()*100)" //Set first column random number less than 100
2. csetvalue col:=col(b) formula:="sin(Col(A))" script:="Col(A) = Data(0.1,6.2,0.1)"
3. csetvalue col:=sheet1!A[3:10] formula:="i*i"
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Column | col |
Input Range | | Specify the target column in which the values will be input. |
| Formula | formula |
Input string | | Specify the formula to compute the values for the target column. |
| Before Formula Script | script |
Input string | | Specify LabTalk scripts and the scripts will be executed before the Formula has been executed. |
| Recalculate Mode | recalculate |
Input int | | Specify the Recalculate mode.
Option list:
|
This X-Function is designed for realizing the same ability of the Set Column Values tool in LabTalk environment, which are used to fill a column with data.
This example is similar to the Quick Start Set Column Values example, which shows you how to use the csetvalue example to input values for two columns in a worksheet. To use the following scripts, please first create a new project to make sure there is a worksheet called Sheet1 in Book1.
csetvalue col:=[Book1]Sheet1!col(A) formula:="{-1:0.03:5}" //Input values for Column A csetvalue col:=[Book1]Sheet1!col(b) formula:=" 1 + (5/(1.5*sqrt(PI/2)))*exp(-2*((col(a)-2)/1.5)^2)" script:="c1=1;c2=2;" //Input values for Column B