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
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.