LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

More decimal places for write to spreadsheet file .vi.

Right now it only shows to 4 decimal places. I want it to write all (or as many as possible) decimal figures and if necessary in scientific notation.

 

Please let me know if this can be done.

 

Thanks

 

mhaque

0 Kudos
Message 1 of 7
(6,584 Views)

What do you have wired up to the format input at the top of the VI?  If it is unwired, it defaults to %.3f which is 3 decimal places.  For other formats, check the help file.

0 Kudos
Message 2 of 7
(6,581 Views)

Use the 'format' input connection. Something like %.6f ought to do the trick.

See the help file for extra info..

0 Kudos
Message 3 of 7
(6,580 Views)

Is there any way to write exactly how the numbers and letters appear in the array prior?

 

Thanks

 

mhaque

0 Kudos
Message 4 of 7
(6,546 Views)

If you cannot format the data the way you want using the format string input to the Write to Spreadsheet File.vi, then format the data to a string yourself.  Use the Write to Text File.vi to write the formatted string to the file.  We wrote some rather complicated file formats long before the Write to Spreadsheet File.vi was available.

 

Lynn

0 Kudos
Message 5 of 7
(6,539 Views)

 


@mhaque wrote:

Is there any way to write exactly how the numbers and letters appear in the array prior?

 

Thanks

 

mhaque


 

Yes,

Format.png

(CCT would have done that differernt)

 

Use the format string property on an element of the array


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 7
(6,534 Views)

Note that a double has about fifteen digits of resolution (timestamps have about thirty). Make sure you save as much resolution as you need (max about fifteen digits for DBL data type - Excel will not handle any more, in any case).

0 Kudos
Message 7 of 7
(6,513 Views)