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
 Running script after impExcel

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
ssegal Posted - 06/28/2017 : 12:38:17 PM
Origin Ver. and Service Release (Select Help-->About Origin): Pro 2016 (64-bit) Sr2
Operating System: Win7

I'm using X-Function impExcel to import data with no trouble at all, except for one thing: The option "options.Script.RunScriptAfterEachImport" doesn't seem to work at all. It does appear to work if accessed through the impExcel dialog box, but not when run from the command line. There's no error message other than "Failed to execute script". Has anyone managed to make this work? Here's my script:

impExcel firstmode:=book template:="HHLspectrumExcel template.ogw" subheader:=1 lname:=1 desig:=<Unchanged> allsheets:=1 options.Sparklines:=1 options.names.FNameToBkLnOnly:=1 options.names.FPathToComm:=0 options.PartImp.Partial:=1 options.PartImp.LastCol:=2 options.Script.RunScriptAfterEachImport:="win -ra";
3   L A T E S T    R E P L I E S    (Newest First)
ssegal Posted - 06/28/2017 : 4:05:36 PM
Final post here: This is a documentation error. The actual call should be:

impExcel options.Scripts.ScriptAfterEachImport:="[insert some stuff]";
ssegal Posted - 06/28/2017 : 2:33:18 PM
Got a response from Origin tech support: This function doesn't work. Bug submitted.
ssegal Posted - 06/28/2017 : 1:30:10 PM
Additional info-- There IS an error message, actually... It was suppressed when I was running my script from within a programming control button.

If I run directly from the script window, I get:

impExcel:X-Function failed to execute!Failed to resolve tree node, VarName = options, VarValue = <unassigned>, fail to get node from path: Script.RunScriptAfterEachImport
#Command Error!

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