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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Running script after impExcel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ssegal

4 Posts

Posted - 06/28/2017 :  12:38:17 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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";

ssegal

4 Posts

Posted - 06/28/2017 :  1:30:10 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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!
Go to Top of Page

ssegal

4 Posts

Posted - 06/28/2017 :  2:33:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Got a response from Origin tech support: This function doesn't work. Bug submitted.
Go to Top of Page

ssegal

4 Posts

Posted - 06/28/2017 :  4:05:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Final post here: This is a documentation error. The actual call should be:

impExcel options.Scripts.ScriptAfterEachImport:="[insert some stuff]";
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000