T O P I C R E V I E W |
Andreas_D |
Posted - 05/28/2010 : 10:22:55 AM Origin Ver. and Service Release (Select Help-->About Origin): 8.0988 Operating System:WinXP Pro SP3
Hi everyone,
I'm trying to do some calculations on an active graph consisting of a fluorescence spectrum. I would like to import some reference data from an ascii file into a new worksheet of the corresponding workbook, but when I run the following script:
workbook$=%[%C,'_']; run -xf newsheet book:=workbook$ active:=1; impASC fname:= system.path.program$+"File.dat";
the ascii file which consists of 5 columns is imported into the new worksheet but also in the original one, thus overwriting my spectral data.
How can I leave the original data untouched by the ascii import?
Any help is much appreciated.
Andreas |
2 L A T E S T R E P L I E S (Newest First) |
Andreas_D |
Posted - 05/28/2010 : 11:32:04 AM Hi,
thanks for that, life is so simple when you just know...
Have a nice weekend, Andreas |
easwar |
Posted - 05/28/2010 : 10:56:13 AM Hi Andreas,
As the graph window is still the active window, your import statement is importing data into the graph and replacing the original dataset. You can specify the 2nd sheet as the destination for the import such as:
impASC orng:= [workbook$]2! fname:= system.path.program$+"File.dat";
Then the data will only go into sheet2. And if you then want to graph that newly imported data into the same graph, you can use the plotxy X-Function to add the new data to the existing plot.
Easwar OriginLab |
|
|