LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read from text files instead of .csv files

Solved!
Go to solution

hi,

i have this .csv file

it reads something like this

Thermistor A0 A1 A2 A3  
M91157 3.99E-01 2.76E+02 1.15E+06 1.33E+08  
M91158 -2.02E+00 2.23E+03 6.15E+05 82247419  
M91159 7.82E+00 -6.86E+03 3.34E+06 -3.55E+08  
M92506 -5.56E+00 5.76E+03 -5.11E+05 3.45E+07  
M92507 1.49E+01 -1.28E+04 5.04E+06 -5.15E+08  
M101166 -3.63E+01 3.27E+04 -8.35E+06 7.96E+08  

 

the only problem is..if someone ever open this file and save it..the formatting of the numbers changed. i dont know why. 

so instead of allowing excel to open the csv file and might change the format of the file, i rather convert this file to text, therefore it will never ever change.

 

here is the current block diagram of reading this file.

untitled.PNG

 

Best regards,
Krispiekream
0 Kudos
Message 1 of 6
(4,039 Views)

like right now..i jsut open it and everything changed.

 

untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 2 of 6
(4,036 Views)

i need to read from the text file.

 

 

untitled.PNG

 

 

to labview

 

untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 3 of 6
(4,031 Views)
Solution
Accepted by topic author krispiekream

Can't you just rename it to *.txt and read it the same way you always do?

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.
Message 4 of 6
(4,024 Views)

OH WOW..its that simple..i swear I have done that before and it didnt work for me. but it works now! the solution is easier than I thought...

 

 

 

Actually I want a reason why the formatting change from .csv file?

does anyone have a clue on why this happens?

why is it when i set the cell FORMAT to text..

then when i open and close the CSV file..it changes..

 

I kinda wanna know why it does that so that I can write in my document on why I am moving .csv file to .txt file

Best regards,
Krispiekream
0 Kudos
Message 5 of 6
(4,018 Views)

I think it has to do with the number is correctly interpreted in Excel as scientific notation and the default for that format is two deccimal places.

 

[Edit] Seems like it would be somewhat difficult for someone to "accidentally" do this because Excel makes you jump trough hoops to save it in CSV file.  The default save format is xls(x).

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 6 of 6
(3,998 Views)