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
 impASC to certain columns

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
BurningDaylight Posted - 08/30/2017 : 07:34:10 AM
I'm trying to specify the output range for impASC, but it continues to import data to the first column in the sheet. Is it possible to make it put the data in the columns 5:10, for example?
Here is what I tried:
impasc orng:=[Book1]Sheet1!2:6 Options.Names.FNameToBk:=0 Options.Names.FNameToSht:=0 Options.ImpMode:=0 ;

But it still fills columns 1:5
2   L A T E S T    R E P L I E S    (Newest First)
BurningDaylight Posted - 09/04/2017 : 1:10:25 PM
quote:
Originally posted by Hideo Fujii

move the imported columns to the destination by colmove x-function


Thank you! This is indeed a a viable workaround.
Hideo Fujii Posted - 08/30/2017 : 11:15:24 AM
Hi BurningDaylight,

It seems impASC was not designed to accept the column range for output, maybe because it is a risky operation
when the number of imported columns (which is unknown before importing) may be larger than the number of specified columns.
As alternative, you can import by setting the Import Mode to Start New Columns (options.ImpMode:=1),
and move the imported columns to the destination by colmove x-function such as:

nc1=wks.ncols+1;
impASC  ... options.ImpMode:=1 ;
nc2=wks.ncols;
colmove rng:=wcol(nc1):wcol(nc2) operation:=pos col:=col(2); //Note: Output column is only specified the starting position
Of course, you can also put this colmove line in options.Script.RunScriptAfterEachImport option, if you like.

Hope this helps.

--Hideo Fujii
OriginLab


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