Author |
Topic |
|
sarastokes
11 Posts |
Posted - 05/02/2016 : 04:07:06 AM
|
Origin Ver. and Service Release (Select Help-->About Origin): b9.3.226 (Student Version) Operating System: Windows 10
I would like to export all of the workbooks (and all of the worksheets inside each workbook) into .dat or .csv format. I would like each workbook at least to be a separate file. I would also like to retain the full precision (like copying with Ctrl+Alt+C). Is there an easy way to do this?
Thank you. |
|
KenLefebvre
USA
66 Posts |
Posted - 05/03/2016 : 10:43:44 AM
|
Hi Sara,
It seems there isn't a way of doing this from the expASC GUI at this time so you'll need to use a Labtalk script to do this. One of my colleagues was able to put this together-
loop(ii, 1, page.nlayers) {range rr = $(ii)!; expASC iw:=rr path:=C:\path\Sheet$(ii).dat};
In order to modify it to your needs, you'll have to change the path to whatever folder you would like to save your .dat files in and you can also change the name "Sheet", as it is only a word appended to the value of each worksheet ($(ii)). To execute this script open the script window (Window>Script Window), paste it in, make any changes to the path and with your workbook open in the background, highlight this script and press enter.
Let me know if this works for you
Ken Lefebvre Technical Service Engineer OriginLab |
Edited by - KenLefebvre on 05/03/2016 10:45:10 AM |
|
|
sarastokes
11 Posts |
Posted - 05/06/2016 : 02:17:37 AM
|
This does work, thank you. Is there a way to loop it over all workbooks in a project? I have around 100+ projects, each with a workbook per recording.
Alternatively, would it be easier to do this via the Matlab console? I recently switched to a student version and it seems students are only allowed a certain number of workbooks per project. Most of my workbooks are locked now so I'm just looking for a time efficient way to get my data out of Origin. Thank you. |
|
|
KenLefebvre
USA
66 Posts |
Posted - 05/06/2016 : 09:39:11 AM
|
You're welcome, glad to hear it worked.
Also you're correct insofar as the student version only allows OPJ's to have up to 30 windows and this includes workbooks, graphs, any other items that would show up in the Project Explorer.
That said if your OPJs have less than 30 workbooks in each (worksheets don't count for this limit), Labtalk contains some commands for looping that script and others like it across multiple objects. I would recommend starting with this documentation first- http://www.originlab.com/doc/LabTalk/guide/Looping-Over-objs#Looping_over_Workbooks_and_Worksheets
Hope this helps! |
|
|
sarastokes
11 Posts |
Posted - 05/13/2016 : 12:58:22 PM
|
Thank you. Why is there a workbook limit on the student licenses? |
|
|
|
Topic |
|
|
|