The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Save the columns of a imported file into datasets

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jvpiera Posted - 10/16/2006 : 03:28:26 AM
Origin Version (Select Help-->About Origin): 5.0
Operating System: windows xp

Hi,

I tried to assign the name of a file column saved in a string to a dataset but it doesn't work.

getfile *.ASC; // %A contain the name of the file.
%P=%[%A,'.'];
%P=%P_B; // Now %P contain FileName_B without the
// extension ASC.
create A50_D 651; // I created a new dataset.
for (i=0;i<652;i++)
{
A50_D=(%P); // This doesn't work.
}

[i]
[i]
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 10/16/2006 : 07:55:25 AM
The create command creates numeric datasets and there is no way change the format of a hidden dataset. Try this instead...

getfile *.ASC;
%P=%[%A,'.'];
%P=%P_B;
win -t D; // create new worksheet
wks.col2.name$=D; // change name of column 2 to D
wks.col2.format=2; // change format of column 2 to text
set %H -er 651; // create 651 rows
win -r %H A50; // change wks name to A50
loop(i,1,651)
{
A50_D[i]$=%P; // set row i of col D to %P
};

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000