From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting to a CSV file from Diadem does not produce a CSV file!

Solved!
Go to solution
Seems strange but exporting to a CSV file from Diadem does not produce a CSV file.  Diadem produces a tab delimited file which is obviously not a CSV file.  The Diadem help even says the "CSV" file is delimited by a tabulator.  Software expecting a comma as the delimiter does not read the Diadem created file properly.  Is it possible to specify the correct delimiter?
0 Kudos
Message 1 of 9
(7,694 Views)
Solution
Accepted by topic author carowjp

You can request the decimalpoint/delimiter you need if you start the CSV export from a script

 

Call DataFileSave( "<filename>C:\temp\EXAMPLE.csv</filename><decimalpoint>,</decimalpoint><delimiter>;</delimiter>", "CSV" )

 

see also http://forums.ni.com/ni/board/message?board.id=60&message.id=8851&query.id=146775#M8851

Message 2 of 9
(7,687 Views)
Thanks Sabcat, this process is also documented here.
Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 3 of 9
(7,673 Views)

Thanks for the responses. 

 

From document ID 3L9AKB4Y: "In Germany and the US, the comma has different meanings. Therefore, to avoid confusion by users from one country or another, CSV files are delimited by tabs."

 

Ironically this creates another confusion with the unconventional use of the file description "CSV" -- the user expects commas and gets tabs.  Smiley Indifferent

 

As an improvement suggestion why not have Diadem drop the "CSV" misnomer and call these files TXT or tab delimited similar to other software conventions?

0 Kudos
Message 4 of 9
(7,666 Views)

Hello carowip,

 

You have an interesting point there, and I have forwarded this thread to the group manager in R&D to have a look at and come up with an idea.

 

Thank you for making me aware of this,

Otmar D. Foehner
0 Kudos
Message 5 of 9
(7,658 Views)

Hello,

 

I am a Diadem-beginner. Can you tell me where to put this command, to get each file saved automatically?

 

Best regards

Wolfgang

0 Kudos
Message 6 of 9
(6,542 Views)

Hi Wolfgang,

 

There is no way in DIAdem 2010 or earlier to have this change automatically applied.  When you select the "File>>Save As" menu in the NAVIGATOR, you will always get the default "CSV" behavior of tab-delimited files.

 

What is listed above is the one command line you need to execute in a VBScript, which starts with "DataFileSave()", in order to programmatically save the CSV file with commas (or semicolons, or anything else) used as the delimiter character.  Note that this particular feature is broken in DIAdem 2010 and fixed in DIAdem 2010 SP1.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 7 of 9
(6,533 Views)

The script shown as written exports a file with a comma decimal separator and a semicolon delimiter.

Craig Condon
0 Kudos
Message 8 of 9
(4,757 Views)

Hi All,

 

DIAdem 2017 has a new ASCII Export feature where you can choose the separator and decimal characters, the datetime format and the ASCII encoding, all in a pop-up dialog, when exporting the Data Portal to "CSV" or other ASCII format.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 9 of 9
(4,743 Views)