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
 LabTalk Forum
 import .dat files and del one column

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
Skaytex Posted - 02/12/2014 : 12:58:37 PM
Origin Ver. 8,6

My folder name is 77. It has (12) R*.dat files and one excel file

Im imported 12 R*.dat files in 12 workbooks with 3 cols
with this command
string path$ = system.path.program$ + "samples\\script\77";
findfiles ext:=R*.dat;
impASC;

and then imported excel file impExcel fname:="C:\77\a.xlsx";

Is it possible to import 12 R*.dat files to one workbook wich has named folder name (77) in 12 worksheets with first two cols and their names and than import excel file in 13 worksheet with his name.




KF
1   L A T E S T    R E P L I E S    (Newest First)
lkb0221 Posted - 02/12/2014 : 1:53:04 PM
Hi,

you can try to use some control options to specify the import, for example:

impASC options.ImpMode:=4 options.FileStruct.NumericSeparator:=0 options.Cols.NumCols:=2 options.Names.FNameToBk:=0 orng:=[B77];
impExcel fname:="C:\77\a.xlsx" firstmode:=sheet desig:=<Unchanged> options.names.FNameToBk:=0 orng:=[B77]13!;

The first one will import only 2 columns to multiple worksheets in workbook called "B77". Notice that we cannot use pure numeric to be book name.
The second one will import a excel file to the 13th sheet.

Since I don't have your files, so these two command might not be exactly what you need.

To learn more about import X-functions, please see the following pages:
http://www.originlab.com/doc/X-Function/ref/impASC
http://www.originlab.com/doc/X-Function/ref/impExcel

Zheng
OriginLab

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