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
 From Origin to Excel

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
Luft Posted - 09/28/2011 : 4:45:23 PM
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: Windows XP

Hi guys,
I work with spectroscopy and the equipment saves the data in Origin format. Therefore, what I have is a .prj file with several workbooks.
Until now, I am exporting the data manually: I simply copy the data from each workbook to an Excel sheet.
I would like to export all the workbooks to excel or to matlab automatically.
I tried the matlab console, but as far as I know, I have to export each workbook separately. As I have more than 100 workbooks in one project, it is a lot of work.
Does anyone know how to do it?

Thanks a lot for helping me.

Luciane.
4   L A T E S T    R E P L I E S    (Newest First)
snowli Posted - 06/04/2024 : 2:36:19 PM
We support export a multi-sheet workbook into a multi-sheet excel file
https://www.originlab.com/doc/en/Origin-Help/Export-Wks-Mat#Exporting_worksheet.2Fworkbook_as_Excel_file
With workbook active, choose File: Export: Excel.
Set Export Sheets: as Whole Book.

Before you click OK, u can click the > button next to Dialog theme and choose Generate Script to dump the associated script.

Then if you put it inside doc -e W{ } to loop though all books, it will create multiple excel files for each book.

E.g. try
doc -e W {
expXLS path:="<User Files Folder>" sheets:=whole;
}

Thanks, Snow
66de250 Posted - 06/04/2024 : 10:59:57 AM
hello! Did you solve the problem? I had a similar problem.
Luft Posted - 09/29/2011 : 3:18:44 PM
Hi Greg,
thanks for your help.
I will try to do it.

Luciane.
greg Posted - 09/29/2011 : 3:13:11 PM
In order to do this automatically, you would have to do some programming.
Using Origin as the Client, you could write a program using Excel as a Server.
In pseudocode, it would look like

// For each Workbook
doc -e W {
pseudoStartExcel;
// For each Sheet in Workbook
for(iSheet = 1; iSheet <= page.nlayers ; iSheet++)
{
page.active = iSheet;
psuedoAddExcelSheetIfNotAlready;
pseudoCopyDataFromOriginToExcel;
}
psuedoSaveExcelAndClose;
}

See ..\Samples\COM Client\MS Office\ExcelImport.OPJ for an example of Origin using Excel as a COM Server.

Using Excel as the Client, you could write VBA code to open OPJ files and copy the data. The above pseudocode would still be a good starting point since it outlines how to quickly get through all workbooks in a project.
See the examples in ...\Samples\Automation Server\Excel

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