02-18-2016 09:46 AM - edited 02-18-2016 09:51 AM
DIAdem has the option to 'save as' on a data set and one of the options is a "Textfile - Auto detect (*.csv)"....now correct me if I'm wrong, but doesn't CSV stand for comma-separated values? Why, then, does the file get saved with tabs as the delimiter?
Opening the file with Excel gives me this:
(So I then have to use the 'text import wizard' and import the data manually with tabs as the delimiter...)
I'd consider this to be a bug as it's not the expected behaviour when saving as a *.csv file format. Expected behaviour: Use commas as the delimiter when saving as a .csv file. Either allow me to select the delimiter, or use one of the commonly used file extensions for tab-separated value files (e.g. .tsv / .tab) as a separate entry in the file type 'save as...' dropdown.
Edit: This is in DIAdem 2015
02-18-2016 11:38 AM
Hi Sam, I thought that was odd as well, but this is due to international confusion, since in Germany, the comma has different usage.
Here is some more information, and a workaround:
http://forums.ni.com/t5/DIAdem/Exporting-to-a-CSV-file-from-Diadem-does-not-produce-a-CSV-file/td-p/...
02-18-2016 02:03 PM
Sam, Russell,
We apologize that you have run into this issue, I can confirm that I find this equally frustrating and dissatisfying. This is a function that causes confusion more often then we like, and I have been told by the DIAdem R&D team that we are going to address this in an upcoming release (with more than a change to the file extension).
One way to avoid this issue right now is to download the Excel TDM/TDMS file import Add-In from this link, which will allow you to directly load TDM/TDMS files into Excel, without having to create CSV files as an intermediate step: http://www.ni.com/example/27944/en/
Another workaround for now is to rename the file from *.CSV to *.TXT and then load it into Excel (which then uses the import wizard).
We will report back to the forum once we have a better solution, within the next few weeks.
Best regards,
Otmar
02-19-2016 04:33 AM
There is a standard that defines "csv" as comma deperated.
Microsoft Excel defined it as "character seperated values".
Thas done because of decimal point is different in the world
https://en.wikipedia.org/wiki/Decimal_mark#/media/File:DecimalSeparator.svg
So for example in german it is ";" as character and "," as decimal point.
If excel exports to CSV in germany it uses ";" as seperator.
02-19-2016 04:31 PM - edited 02-19-2016 04:39 PM
@AndreasK wrote:There is a standard that defines "csv" as comma deperated.
Microsoft Excel defined it as "character seperated values".
Thas done because of decimal point is different in the world
https://en.wikipedia.org/wiki/Decimal_mark#/media/File:DecimalSeparator.svg
So for example in german it is ";" as character and "," as decimal point.
If excel exports to CSV in germany it uses ";" as seperator.
I appreciate that different languages use different decimal separators (and I believe DIAdem was originally a German product - I've noticed there are a few unlocalised strings in places!) - but I am using DIAdem in the English language and when I create a .csv file, it doesn't open as a comma-separated or a character separated values file - it appears as a jumbled up mess!
In fact, having just looked at my copy of Excel, CSV is 'comma delimited':
Saving as 'text' then becomes tab-delimited as one of the defaults.
I was aware of the workarounds - but it doesn't stop it from being a bit frustrating - I would have used TDMS but, as is very common in the corporate-IT world, the end-user didn't have the TDMS plugin installed, nor did they have admin rights on their machine to install it. I also shouldn't have to use scripting just to export my data to a simple text file!
I'm sure it was just one of those oversights that happens when internationalising software, and I'm happy that it looks like R&D are addressing the issue - I look forward to hearing an update soon! 🙂
Edit: Also my apologies - I tried searching for similar threads but couldn't find any - including the one linked. A real shame the issue still hasn't been addressed in nearly 6 years!!
07-01-2016 02:50 PM
If you save the extension as .tsv instead of .csv it will open perfectly in Excel without any wizard.
You can use Irfan view to quickly change the extensions of all your files, and you can also write a DIAdem script to save the channels you need into a TSV file:
Option Explicit If "IDOk" = PathDlgShow("Select folder to save TSV output files", "C:\") Then Call DataFileSaveSel(OutPutPath&Data.Root.Name&".tsv","CSV","'[1]/[1]' - '[1]/["&GroupChnCount(1)&"]'") Else AutoQuit ("User terminated the script.") End If
The script above can be easily modified to include multiple groups with the use of a loop.