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
 multi import into rows

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
msacher Posted - 02/01/2006 : 01:26:08 AM
Hi,

I want to use the LabTalk multiple import function (getfile -m *.*;). The selected files shall be imported into one wks. The datasets must be one BELOW the other (new rows and NOT into new columns). Furthermore the first 37 rows of each file must be ignored, because they include header information.

This task seems to be very easy, but I have no idea, how to solve / program it.

I hope, someone has an idea.
Thank you
Marc
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 02/01/2006 : 07:51:46 AM
Hi Marc,

The first step is to prepare the worksheet's ASCII Options...

1. Open a new worksheet from the main toolbar.
2. Select File > Import > ASCII Options
3. In the File Header section at bottom set Skip main header... value to 37.
4. Select Import Into Worksheet as New Rows.
5. Select any other options that seem appropriate.
6. Click the Update Options button.
7. Click the Save Template button on the main toolbar.
8. Test it out by importing from the File > Import menu and adjust your ASCII Options as needed for proper results.

If you search this forum you'll find many scripts for multiple-file importing with LabTalk so I'll just give you a simple example that uses getfile -m and the template you just prepared...

getfile -m *.*; // open multiple-file dialog
if(count==0) return; // quit if cancelled
win -t Data; // open a worksheet from your default template
for(ii=1;ii<=count;ii++) {
getfile -g ii; // %A = iith file path\name
open -w %A; // import to active worksheet
};

Mike Buess
Origin WebRing Member

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