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
 Origin Forum
 Automatically import .cdf files, export to excel
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Corsa88

7 Posts

Posted - 07/01/2016 :  10:44:35 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2015 64 bit
Operating System: Windows 10 Home 64 bit

Hi

I have a bunch of .cdf files that I need to extract its data from. Since Excel does not natively support .cdf, I rely on Origin to view and extract the data stored in the .cdf file and manually copy and paste them into Excel.

Since I have quite many of these .cdf files, is there any way for me to automatically import them into Origin and to extract its contents into Excel?

Thank you all in advance.

Regards
Ben

Shirley_GZ

China
Posts

Posted - 07/05/2016 :  01:38:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Corsa88,

You can import multiple CDF files to Origin and then export them as CSV files from Origin. To do this automatically, please try the script lines below:

string fns, path$="C:\CDF\";
findfiles fname:=fns$ ext:="*.cdf";
impCDF fname:=fns$; //Import all CDF files in folder C:\CDF
//Export each worksheet in current project as CSV files
doc -e LB
{
expASC type:=csv path:="C:\CSV\[%H]%(page.active$).CSV";  
}


It might take some time if there are many cdf files and each file is large.

Once these data been exported as CSV files, you can do further analysis in Excel.

Thanks,
Shirley


Originlab Technical Service Team

Edited by - Shirley_GZ on 07/05/2016 03:54:38 AM
Go to Top of Page

gregorybelger52

USA
1 Posts

Posted - 07/07/2016 :  05:29:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Oh it's really timing that we got the same issue, I expect the use and effectivenessof of this script. When I got home I'll try this. Thank you so much!

http://www.safeharborfi.com/about-us/
Go to Top of Page

Corsa88

7 Posts

Posted - 07/07/2016 :  05:36:31 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Shirley

Thank you for the script. Is it possible to only add in certain data columns to import, in order to reduce the file size and processing time?

Also, I have tried the script and it works. Would it be possible to name the output file as the input file name?

Edited by - Corsa88 on 07/07/2016 11:25:18 AM
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