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
 Forum for Origin C
 import xml-like 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

schuettlfy

Germany
Posts

Posted - 06/02/2005 :  09:47:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

I wan't to import xml-like data to a worksheet. The data looks like this:

\BEGIN:{Header}
[Distance&mm&DATA_DOUBLE&1];[X&mm&DATA_DOUBLE&1];[Y&mm&DATA_DOUBLE&1];[Z&mm&DATA_DOUBLE&1];[A&DEG&DATA_DOUBLE&1];[B&DEG&DATA_DOUBLE&1];[C&DEG&DATA_DOUBLE&1];[Fx&N&DATA_DOUBLE&1];[Fy&N&DATA_DOUBLE&1]
\END
\BEGIN:{Data}
0;517.3;-78.52;356.41;3.13287;0.00942478;-0.118682;-0.0017954;-0.00299337
0.00035464;517.3;-78.52;356.41;3.13287;0.00942478;-0.118682;0.000963839
0.000709372;517.3;-78.52;356.409;3.13287;0.00942478;-0.118682;0.000859114
...
(more data)
...
\END
\BEGIN:{Attributes}
[Startposition]&[XVALUE]&[1.188323]
...
(more aattributes)
...
\END

I can read the lines of the data file step by step and can decide if I want to add the line to the worksheet (all between \BEGIN:{Data} and \END) but unfortunately their is no way to add a single row to a worksheet (I think).

Thanks,
Frank


--- skip ---
Dr. Frank Schüttler
www.battenberg.biz





Mike Buess

USA
3037 Posts

Posted - 06/02/2005 :  10:55:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Frank,

Might be easiest to fill the wks by columns then convert to matrix, transpose matrix and convert back to wks.

Mike Buess
Origin WebRing Member
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/02/2005 :  7:31:29 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
if the file is really XML, then you can just load it into the Origin C Tree object, once in a tree, it is easy to manipulate.

CP


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