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
 Origin Forum
 Read (import) hex data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kelsjc

Brazil
5 Posts

Posted - 09/04/2003 :  12:41:02 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello!

I am trying to read (import) hex data in colums but in the Origin v.5 doesn`t accept. How could I solve that?

There is some commands to do this by script?
Or another version support this?

Help me please
Thanks

Kelson

greg

USA
1379 Posts

Posted - 09/04/2003 :  4:11:02 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You should import the data as text. Then you can use this script to convert the hex values to numbers:

get col(1) -e end;
loop(jj,1,wks.ncols) {
loop(ii,1,end) {
%A=wcol(jj)[ii]$;
nn=hex(%A);
wcol(jj)[ii]$=$(nn);
}
};

(This script assumes all columns are hex values.)

Go to Top of Page

kelsjc

Brazil
5 Posts

Posted - 09/05/2003 :  09:44:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Greg,

On version 5, import hex files doesn`t work... When I try to import appears the following alert message: "File XXX does not seem to consist of ASCII data". First off, I set all colums as text, but still not works the import command.

I tested putting manually some hex values in a new worksheet and the script works fine! Great! This solved my conversion problem... but my data is over 100,000 lines! I really need to import it!

How to import as text in version 5?
I didn`t get yet.


Could you help me please?

Thanks

Kelson




Go to Top of Page

greg

USA
1379 Posts

Posted - 09/10/2003 :  11:20:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You just need to help the import by specifying column type(s) as Text and entering more info in the ASCII Options dialog (File : Import : ASCII Options).
If you know the separator, specify it.
If fixed, then enter a comma separated list of widths.
If you know the number of columns, check the box and enter the number.
You should specify the number of header lines and subheader lines - even if both are zero.


Go to Top of Page

kelsjc

Brazil
5 Posts

Posted - 09/10/2003 :  6:59:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

I already tried importing from ASCII options but still does not work! I tried several combination...

I think that version 5 its impossible to import hex data.
It doesn't recognize. This version just import decimal values.

I downloaded and test it in version 7 evaluation.
Now, the import works fine... I will need to buy this version.

Thanks so much for your help!
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