LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read a spreadsheet float with 15 significant digits?

I am reading data in from a spreadsheet and some of the data has the following floating point values:

xxxxxxxxx.yyyyyy

As in 208394912.392452

 

It seems no matter how I set the import syntax (ie - %9.6f, %_15f, etc.) it always gets truncated and shoved into SI format as such:

208394912.392452 -> 2.083949E+8

I have to retain every single value from the read, do you happen to know what syntax I would use to do such?

Thanks!

0 Kudos
Message 1 of 12
(4,319 Views)

Attach your VI and a data file.

 

Is it possible that you are reading the file correctly, but your display setting in whatever indicator you are viewing the data is set for fewer significant digits?

0 Kudos
Message 2 of 12
(4,305 Views)

Unfortunately, no.  If I probe directly after the spreadsheet read, the data is coming in as SI.
Screenshot 2015-07-30 17.01.58.png

0 Kudos
Message 3 of 12
(4,288 Views)

That still looks ok.

What are your Display Format settings for your Array Indicator for your EXT Array?

0 Kudos
Message 4 of 12
(4,276 Views)

The import format is irrelevant. All that matters is the display format of your array indicator. (As Ravens already said)

 

(Why is your array indicator EXT data type? that seems pretty useless since you import it as DBL)

 

 

0 Kudos
Message 5 of 12
(4,274 Views)

The display format is set to floating, 15 sig figs. I know the data values past the decimal point are not being read since I am doing some simple math afterwards such as subtracting index N from index N+1 from an array of these values and it's returning zero as it's only after the decimal that is changing, and that has no value so the math ends up as X-X=0.


0 Kudos
Message 6 of 12
(4,244 Views)

Don't keep us guessing. Attach your code and a typical datafile!

 

Does your computer country setting use a comma or period as decimal seperator?

0 Kudos
Message 7 of 12
(4,235 Views)

Will doshortly, thanks for the help so far... gotta cleanup things a bit and make them presentable/easier to read.

0 Kudos
Message 8 of 12
(4,227 Views)

@LabviewRules wrote:

Will doshortly, thanks for the help so far... gotta cleanup things a bit and make them presentable/easier to read.


This always gets me... why do people always wait until they have to show the code before cleaning it up when it's easier just to clean as you go?  Presentable/easy to read?  That sounds good whether or not I need to show the code to someone.

 

Like cleaning your living room, it's always easier to keep it clean than to clean it up when you are expecting guests.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 12
(4,163 Views)
Hi Bilko,
To be honest it is actually clean already and written with proper programming practices. It is just not in anyone's best interest for me to give a full and descriptive detail of my current application so I need to refactor and encapsulate to create a simple loading example data file and vi.

I've been using lv for over 15 years and do try to keep my code up to shape at all times.



Message 10 of 12
(4,143 Views)