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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 multi import into rows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

msacher

Germany
Posts

Posted - 02/01/2006 :  01:26:08 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Mike Buess

USA
3037 Posts

Posted - 02/01/2006 :  07:51:46 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000