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
 Origin Forum
 How do i merge workbooks?

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
verv Posted - 02/07/2017 : 08:48:39 AM
Origin Ver. and Service Release: OriginPro 8.5.0 SR1
Operating System: Windows 8.1

I have muliple .opj files with the following structure: only one workbook with three sheets, which are: Graph, Data (table), and Note.

I want the result file to consist of the table with columns from multiple "Data" sheets from different .opj files, preferably with the column comments equiled to the names of .opj files.

How can I do it in an automatic way without any open/drug/drop/copy/past/etc? Or, if there is no way, more simple: how do I merge many workbooks in one to play with their sheets in one place?
7   L A T E S T    R E P L I E S    (Newest First)
Aaron03 Posted - 02/17/2017 : 12:54:22 AM
That's the thing that I was missing.
verv Posted - 02/11/2017 : 3:12:15 PM
In Origin 2017 the bag is fixed. Thanks
Chris D Posted - 02/10/2017 : 4:45:22 PM
Hi,

Can you download the demo of Origin 2017 and see if it is fixed? There is an issue in our bug-tracking database that is related to info.wks not working properly and being fixed in Origin 2017.

Thanks,
Chris Drozdowski
Originlab Technical Support
verv Posted - 02/10/2017 : 12:53:18 PM
quote:
string sFiles$;
{dlgfile g:="*.opj" multi:=1 fname:=sFiles$;}
if (sFiles.GetLength() > 0)
{
for (int ii = 1; ii < sFiles.GetNumTokens(CRLF); ii)
{
string sFile$ = sFiles.GetToken(ii);
sFile$=;
//impOPJ fname:=sFile$ -t "MyTheme";
}
}


I hope this helps.


Thanks, this helps a lot

However there is a problem
Any impOPJ script, as well as impOPJ -t, works only with the first worksheet even if there is the pointer to the another one. Even the generated script like this one:
impOPJ fname:=ะก:\somewaytofile\1.opj info.wkspage:=Book1 info.wks:=Sheet2 info.cols:={1} options.FirstMode:=1;
returnes the column 2 from Sheet1, not from Sheet2

Worth mentioning that the page from which this script was generated works as it should, importing the column from second worksheet.
I cheked this on two different machines with Windows 8.1 with two different Origins - 2016 SR0 and 2015 SR1 - and the problem stands in both
Chris D Posted - 02/09/2017 : 10:20:25 AM
Hi,

You can automate the process of immporting multiple same-structured OPJs as follows:

1. From the File menu, select Import->Origin Project.
2. Select one of your OPJs.
3. In the impOPJ dialog that pops up, specify your import settings but don't click OK.
4. You will see a little arrow button in the top right of the dialog.
5. Click the button and save your settings as a theme with a unique name (e.g. MyTheme).
6. Click OK in dialog to see that it imports as you like.

To automate the process:
1. From the Window menu, select Script Window.
2. Paste the following code into the Script Window.
*** Make sure to change the value of -t "MyTheme" to the name of the theme you saved.
3. Select all of the script and hit the Enter key on your keyboard.
4. Select one or more same-structured OPJs to import.
5. The script will then import them one after the other using the settings from your theme.

string sFiles$;
{dlgfile g:="*.opj" multi:=1 fname:=sFiles$;}
if (sFiles.GetLength() > 0)
{
	for (int ii = 1; ii < sFiles.GetNumTokens(CRLF); ii)
	{
		string sFile$ = sFiles.GetToken(ii);
		sFile$=; 
		//impOPJ fname:=sFile$ -t "MyTheme";
	}
}


I hope this helps.

Thanks,
Chris Drozdowski
Originlab Technical Support
verv Posted - 02/09/2017 : 08:37:28 AM
Okay, thanks
Is there a way (in the newer version) to automate the import from the same-structured .OPJs (like multiple ASCII import) so there will not be the need to repeat the process of importing many times?
Hideo Fujii Posted - 02/07/2017 : 12:05:21 PM
Hi verv,

Origin is capable to import the worksheet data in an Origin project file (.OPJ) by "File: Import: Origin Project"
menu. Here, you can specify the Import Mode to "Start New Column" so that you can accumulate the import data
into a single worksheet.
Unfortunately, this feature is available since Origin 9.x version. Still you can append other OPJ file's contents
("File: Append" menu), but you need the task of copy-and-pasting.

Hope this helps.

--Hideo Fujii
OriginLab

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