NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
mhaque
Posts: 108
0 Kudos

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

Knight of NI
RavensFan
Posts: 15,663
0 Kudos

Re: More decimal places for write to spreadsheet file .vi.

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.

Active Participant
_Ian_
Posts: 334
0 Kudos

Re: More decimal places for write to spreadsheet file .vi.

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

See the help file for extra info..

Member
mhaque
Posts: 108
0 Kudos

Re: More decimal places for write to spreadsheet file .vi.

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

 

Thanks

 

mhaque

Proven Zealot
johnsold
Posts: 9,941
0 Kudos

Re: More decimal places for write to spreadsheet file .vi.

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

Proven Zealot
Jeff·Þ·Bohrer
Posts: 7,715
0 Kudos

Re: More decimal places for write to spreadsheet file .vi.

 


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

8-Ball Consulting advertising banner

Certified LabVIEW Consultant. The partner you can bank on when you're behind the 8-ball.
Trusted Enthusiast
DFGray
Posts: 2,782
0 Kudos

Re: More decimal places for write to spreadsheet file .vi.

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).

Using LabVIEW 2011 - 2013 on Windows 7 64-bit