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
 custom import

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
Weldon Posted - 02/20/2005 : 11:09:57 AM
Origin Version (Select Help-->About Origin): 7.5
Operating System: w2k

I have a lot of data to incorperate into worksheets. Each set of data is in a folder that also provides the worksheet name. Each folder has approximately 100 different text files. They're poorly named, but the column names I want are in each file name, (they're also in the header), in fact they're the last 6 characters.

The first column in each file is the same data repeated, I only want to import it once and then for every other file, I want only the second column.
I did a file by hand using the import wizard as a starting point, It took over an hour to clean it all up. I have dozens of such folders and probably many more to come. A customised import function is definitely the way to go. I'm hoping I can find some code that I can modify for my purposes as a jumping off point. I've done some C++ programming before si I should be able to work out the mecessary modifications.
Thanks,
Weldon
2   L A T E S T    R E P L I E S    (Newest First)
Weldon Posted - 02/20/2005 : 10:30:33 PM
A good start, thanks.
Mike Buess Posted - 02/20/2005 : 11:57:29 AM
The Origin C code I suggested in your LabTalk forum topic is as good a starting point as any. You should only need to replace the column naming statement wFin.Columns(j).SetName(sCol) with wFin.Columns(j).SetName(sCol.Right(6)).

...Worksheet::ImportASCII does pretty well at importing ASCII data. See the Get/Set ASCII Import Structure example here for hints about tweaking the ASCII settings.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 02/20/2005 12:11:41 PM

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