NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
RSenior
Posts: 22
0 Kudos
Accepted Solution

CSV Export with Units

How do I save the data in the portal to a CSV with channel units in the second row of the CSV? 

Member
RSenior
Posts: 22
0 Kudos

Re: CSV Export with Units

Perhaps I should clarify a little.  I am using diadem as a bridge between a custom MATLAB analysis tool and a AOP data store.  I need to save the file as a tab-delimited text file with an extension of .xls.  Using File->Save As with text file-Auto Detect, works as expected, except that I don't get the units of the data channels.  I have tried to use excel export to save it as an xls, but my custom MATLAB tool does not like the file. 

 

In case someone is going to suggest it, I have attempted to save my data as a *.mat file so MATLAB can open it's own format, but I get some odd behavior with the MATLAB variable names.  I am investigating how to correct this, but in the mean time, I need a bridge to save the file as a tab-delimited text file. 

 

Thanks. 

Member
AndreasK
Posts: 199
0 Kudos

Re: CSV Export with Units

I assume there is no way to add unit in second line.

Maybe access TDM/TDMS from Matlab may help you.

 

Greetings

Andreas

Member
RSenior
Posts: 22
0 Kudos

Re: CSV Export with Units

That's unfortunate... Diadem can read in units from a text file, but not write them?  I believe I could do this programatically with txt file write commands, but I feel like I would be re-inventing the wheel. 

 

Thanks for the link, I will read about getting MATLAB to open a TDM(S) file, but at that point, I think getting Diadem to export directly to a .mat file would probably be easier for me. 

Member
AndreasK
Posts: 199
0 Kudos

Re: CSV Export with Units

[ Edited ]
Member
RSenior
Posts: 22
0 Kudos

Re: CSV Export with Units

Not the first time Brad has provided a solution for my needs.  :smileyhappy:  

 

Thanks! 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page