T O P I C R E V I E W |
ONeilll |
Posted - 04/27/2020 : 08:38:07 AM Origin Ver. and Service Release: OriginPro 2020 (64-bit) SR1 Operating System: Windows 10
Hey guys, I have a file with four columns: A B C D
The first one is a time stamp.I would like to set it to zero by col(1)-cell(1,1)
The result should be written in the column next to the first one: A "new column" B C D Finally, I would like to have a plot of "new column" vs C.
I tried the following which did not fully work:
%A = page.info.system.import.filename$; //Get the filename %B = %[%A, '.']; wks.col = 1; //set column 2 as current page.xlcolname = 0; wks.insert = (Zeit); // Add a column in worksheet col(1) = col(1)-cell(1,1); // Calculate the log value of column B plotxy iy:=((1,2)) plot:=200 ogl:=[<new template:= XRR_Templat name:= %A>]; // Plot data, rename the graph window
This script replaces the first coloumn entirely, I would like to keep it though
I hope my question is clear. Thank you very much for your effort. Best ONeilll
|
2 L A T E S T R E P L I E S (Newest First) |
ONeilll |
Posted - 04/29/2020 : 02:26:20 AM Dear AmandaLu, thank you very much for your fast reply. This is exactly what I was looking for. Thanks for your support! Best ONeilll |
AmandaLu |
Posted - 04/27/2020 : 11:51:37 PM Hi,
I modify your scripts according to your description.
%A = page.info.system.import.filename$; //Get the filename %B = %[%A, '.']; wks.col = 2; //set column 2 as current page.xlcolname = 0; //Turn off "Spreadsheet Cell Notation" (SCN) wks.insert(Zeit); // Add a column in worksheet col(2) = col(1)-cell(1,1); // Calculate the log value of column B plotxy iy:=((2,3)) plot:=200 ogl:=[<new template:= XRR_Templat name:= %B>]; // Plot data, rename the graph window
wks.insert(name list) is a method, not a property. Please see details here:
https://www.originlab.com/doc/LabTalk/ref/Wks-obj#Methods
And you miss up the column index so the first column was placed.
Let me know if this is not what you want.
Thanks, Amanda OriginLab Technical Service
|
|
|