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
 Forum for Origin C
 problem in importing .csv files

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
blt2si Posted - 01/23/2003 : 04:48:39 AM
Hi all,
i used the following labtalk code to import .csv files and this is activated by a button.It is working as i expected but the problem is some columns are disappearing which are in last.i tried to import many .csv files i found the same problem in all files.why this is happening?
if my code was wrong to import .csv files please suggest me how to import them with an example.
[Main]
// type -b $General.Userbutton;

win -t data C:\Program Files\OriginLab\Origin7Server\datareadY.otw;
getfile *.csv;
open -w %a;

Thank you,
Blank

7   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 01/28/2003 : 4:01:39 PM
That's a rather irregular format and you might be better off writing your own import routine in Origin C. But before you give up on the ASCII Options try skipping the "Somedata" header...

Skip main header, number of lines= ?

If that's not enough, keep that setting and try my previous two suggestions as well...

1) Automatic determination of column types= OFF
2) # of columns= 8? // or whatever is the correct number

Mike Buess
Origin WebRing Member
blt2si Posted - 01/28/2003 : 08:25:07 AM
Hi Mike Buess,
The following is the example csv file.It has some data in the starting of the file which is indicated here as SomeData(i.e:the details of the Project and etc). here below the text1.text2...there is a space to decalre the units of the values.

Somedata somedata
somedata
somedata
somedata


A B C D E F G H ...........
text1 text2 text3 text4 text5 text6 text7 text8...


**** 1805 8,8 986 1,66 0,16 0,86 1....
**** 1804 8,9 987 1,68 0,22 0,85 1....
**** 1802 8,8 989 1,65 0,16 0,83 1....
**** 1807 8,9 987 1,68 0,16 0,86 1....
**** 1802 8,8 988 1,66 0,14 0,87 1....
**** 1810 8,7 988 1,65 0,16 0,85 1.....
**** 1811 9 986 1,7 0,16 0,85 1.....
**** 1812 8,9 989 1,69 0,16 0,86 1.....
**** 1812 9 987 1,71 0,16 0,85 1....
**** 1812 8,9 985 1,69 0,16 0,85 1.....
**** 1812 9 985 1,7 0,14 0,85 1.....
**** 1811 8,9 987 1,69 0,21 0,86 1,.........
**** 1812 8,8 989 1,66 0,16 0,85 1...........
**** 1812 8,4 988 1,59 0,34 0,86 1...........

Thank You,
Blank


Edited by - blt2si on 01/28/2003 08:28:49 AM

Edited by - blt2si on 01/28/2003 08:30:36 AM
Mike Buess Posted - 01/24/2003 : 6:28:30 PM
Hi Blank,

Are there any missing values in the first few rows of the data file? If so, try this with your ASCII Options...

Turn OFF "Automatic determination of column types" and specify the exact number of columns.

If that doesn't work you might post a few lines of a typical CSV file to give us a little more to go on.

Mike Buess
Origin WebRing Member
blt2si Posted - 01/24/2003 : 04:42:28 AM
Hi Mike Buess,
i put the quote to the path but the result is same as in the previous case.Everytime the last column is missing when i imported,so i included a dummy column to the original csv file .now the dummy column is missing and the rest are appearing.
only the last column is missing whatever it is..
Thank you,
Blank
Mike Buess Posted - 01/23/2003 : 11:21:52 AM
Hi Blank,

I don't think you're opening the correct template the way your win -t command is written. (It opens the default template instead.) You should quote the template path because it contains a space...

win -t data "C:\Program Files\OriginLab\Origin7Server\datareadY.otw";

Actually, you could probably just omit the path since it appears to be the Origin program folder...

win -t data datareadY;

Mike Buess
Origin WebRing Member
blt2si Posted - 01/23/2003 : 08:22:56 AM
Hi Mike Buess,

i didn't found any difference. If i import .csv files using both of the options there is no difference ,still some columns are missing same as with the labtalk script code.

Thank you,
Blank
Mike Buess Posted - 01/23/2003 : 07:57:32 AM
Hi Blank,

Open the ASCII Options for your template "datareadY.otw" and make sure "# of columns" is correct.

Mike Buess
Origin WebRing Member

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