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
 Ascii import
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gaba

USA
3 Posts

Posted - 07/13/2004 :  4:34:22 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi

I think this is a simple question.

I want to import data from ascii files, but the problem is that instead of being sorted into columns, all the ascii data is dumped into a single, long column, with data sweeps seperated by a space (stupid acquisition program.....). I need to import the data into origin, and have origin detect the spaces, then start a new column.

for example, the ascii data is organised

1
2
3
4
5

6
7
8
9
10

but need the data to be in the format

1 6
2 7
3 8
4 9
5 10

I can write labtalk script to do this if I manually enter the number of points per column, but this technique is very inflexible, and requires a lot of knowledge about the ascii data (which can vary).


can somebody please help

Thanks
Mark

Hideo Fujii

USA
1582 Posts

Posted - 07/14/2004 :  10:18:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mark,

If you set the "When non-numeric is found in numeric fields" option in the "ASCII Import Options" dialog to "Start new worksheet/Column", Origin automatically imports individual columns separately. Then, marging all columns(A) in worksheets (if your data is aa.dat, then aa, aa1, aa2,... are the worksheets) should be relatively easy by scripting, I think.

OriginLab Corp.
Hideo Fujii

Go to Top of Page

sammi.song

China
46 Posts

Posted - 07/15/2004 :  12:44:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mark,

There is way to import your data into multiple columns in one worksheet, but you have to tidy them manually later.
In the "ASCII Import Options" dialog, if you set the "When non-numeric is found in numeric fields" option to "Start new worksheet/Column", and set¡°Import Into Worksheet as¡± option to ¡°New Columns¡±. You can import those data into multiple columns in one worksheet.
If your data file is as below:
1
2
3
4
5

6
7
8
9
10

11
12
13
14
15
After import, the data seems to be:
1
2 6 11
3 7 12
4 8 13
5 9 14
10 15
Tidy them: You can copy all data in first column and paste them from the cell2 in first column. Then delete the first row of all columns.
1 6 11
2 7 12
3 8 13
4 9 14
5 10 15

Thanks,
Sammi
Go to Top of Page

easwar

USA
1965 Posts

Posted - 07/15/2004 :  09:51:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mark,

This issue of having to tidy up/move the data in subsequent columns occurs only if the separator is a blank line. If the separator has text characters such as:
1
2
3
4
5
some text
6
7
8
9
10

then the row order is maintained correctly.

The above problem is a bug and we will fix it in a future version.

Thanks,

Easwar
OriginLab


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