Hi,
The following is a simple example to show how to do this. We will first create a table with 2 columns and 3 rows on a graph by using the "add_table_to_graph" x-function. Then copy the values of the 1st column of Sheet1 (from row 3 to row 5) to the 1st column of the new created table. And copy the values of the 2nd column (from row 5 to row 7) to the 2nd column of the table. The following is the steps.
1. Create a new project. Fill the two columns of Sheet1 of Book1 with Row Numbers. Then create a line plot and make the graph activated.
2. Copy the following scripts to Command Window to execute it.
add_table_to_graph cols:=2 rows:=3; //Create a table
range b1 =[Book1]1!col(1);
range b2 =[Book1]1!col(2);
range a1=[table1]1!col(1);
range a2=[table1]1!col(2);
a1[1]=b1[3];
a1[2]=b1[4];
a1[3]=b1[5];
a2[1]=b2[5];
a2[2]=b2[6];
a2[3]=b2[7];
doc -u; //update the windows
For more details about the "add_table_to_graph" x-function, please refer to
http://wiki.originlab.com/~originla/wiki2/index.php?title=X-Function:Add_table_to_graph
Best regards,
Vincent
OriginLab Tech Services