取消
显示结果 
搜索替代 
您的意思是: 

read from text files instead of .csv files

已解决!
转到解答

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 项奖励
1 条消息(共 6 条)
4,775 次查看

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

 

untitled.PNG

Best regards,
Krispiekream
0 项奖励
2 条消息(共 6 条)
4,772 次查看

i need to read from the text file.

 

 

untitled.PNG

 

 

to labview

 

untitled.PNG

Best regards,
Krispiekream
0 项奖励
3 条消息(共 6 条)
4,767 次查看
解答
接受人 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.
4 条消息(共 6 条)
4,760 次查看

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 项奖励
5 条消息(共 6 条)
4,754 次查看

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 项奖励
6 条消息(共 6 条)
4,734 次查看