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
 impOPJ function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Francesco84

Italy
21 Posts

Posted - 08/04/2016 :  10:59:47 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello to all,
this is my first message on this forum.

I use OriginPro 216 and I have a project with 2 workbook, called Book1 and Book2, both with a single worksheet.

I want to import into a new project some columns of Book1.

This is the script I use:
impOPJ fname: = C:\Users\francesco\Desktop\file.opj info.wkspage:=Book1 info.cols:={0,1} options.FirstMode:=1 orng:=[Book1]Sheet1!(1 ,2);

The problem is that the columns imported are from Book2, and not from Book1.

I can not understand where I'm wrong.
Thanks for the answers.

Francesco

cpyang

USA
1406 Posts

Posted - 08/05/2016 :  6:44:55 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can try first from GUI, and when the dialog opens, choose the popup menu near the top, which has the last entry as "Generate Script". This will produce the needed LabTalk code on the command window. For your case, the likely problem is with the sheet is needed, so maybe the following


impOPJ fname: = C:\Users\francesco\Desktop\file.opj info.wkspage:=Book1 info.wks:=Sheet1 info.cols:={0,1} options.FirstMode:=1 orng:=[Book1]Sheet1!(1 ,2);



CP
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