DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you save CSV file without eliminating zeros

I have been tryring to save data in CSV format as they are, but DIAdem seems to eliminates all the trailing zeros in the process. For exampled if I have a value that is originally expressed as 101.2000 then it saves 101.2 in the csv instead...

 

Is there a way to not to get tid of these zeros?

 

Regards

 

Hiro

0 Kudos
Message 1 of 5
(5,030 Views)

Hello Hiro!

 

It might be possible to use text channels for this but I can't see any reason to do this. IMO it is correct to write just the value to a CSV. If you want to import and display the data into an other application like Excel you should use the formating options provided by this to get the format you like.

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 5
(5,022 Views)

Hi Matthias,

 

 Thanks for your reply. I understand IMO is doing the right thing to compress the data - but is there a way to stop it. In this situation I would like to keep the format itself...

 

Thanks for your thoughts.

 

Regards

 

Hiro

0 Kudos
Message 3 of 5
(5,019 Views)
Hello Hiro!

I hope you allow me two last comments:
  • CSV is a data storage format - that it is human readable in some way was no format request
  • What you see in DIAdem is data rendered to a text representation with an user definable format

Back to your question. AFAIK is there no build in way to solve your request. You have the two options to convert the channels to text channels (not sure if this is easy possible, it wasn't in the past) or to write a CSV exporter in script. I would prefer the last option and would use the str command with the display format string to format the values.

Hope this helps a little bit

Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 4 of 5
(5,008 Views)

Hi Hiro,

 

How big are your data files and what header information do you want at the top of the CSV file?  I have sveral VBScript solutions to offer, and which one I send you will depend on your answers to these questions.

 

Better yet, could you send me a representative TDM/TDX data set?

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 5 of 5
(4,991 Views)