jennifer Posted January 26, 2008 Report Share Posted January 26, 2008 Hi, in this attached vi, i want to read data from a csv file. The problem is, that i can not picture the right format. In the first coloum i only get the the 19, in the second 14 and so on of 19.02.2004 13:00:00,14.5500,2.6120,423.5600,1.2561,1.9590 Couldn't upload the csv file. Would be great, if anybody could help. Thanks, Jennifer Quote Link to comment
Tim_S Posted January 26, 2008 Report Share Posted January 26, 2008 QUOTE(jennifer @ Jan 25 2008, 06:04 AM) Hi,in this attached vi, i want to read data from a csv file. The problem is, that i can not picture the right format. In the first coloum i only get the the 19, in the second 14 and so on of 19.02.2004 13:00:00,14.5500,2.6120,423.5600,1.2561,1.9590 Couldn't upload the csv file. Would be great, if anybody could help. Thanks, Jennifer It would help if you'd attached a sample of your csv file. Based on your description, processing the file as a double won't give you the proper first value as it's a timestamp and not a double. You'd have to process everything as a string array to preserve the timestamp. After that you'll have to process the strings. Depending on what you're doing, there may be better ways of processing the csv file. Quote Link to comment
jennifer Posted January 29, 2008 Author Report Share Posted January 29, 2008 QUOTE(Tim_S @ Jan 25 2008, 01:12 PM) It would help if you'd attached a sample of your csv file.Based on your description, processing the file as a double won't give you the proper first value as it's a timestamp and not a double. You'd have to process everything as a string array to preserve the timestamp. After that you'll have to process the strings. Depending on what you're doing, there may be better ways of processing the csv file. Hi, this new vi contains a few lines of the csv file. It works better now with strings. Thanks for your hint. I want to show the first two strings in a row in a diagram. How can this be realized? Thanks for your support. Quote Link to comment
Steve_Brooks Posted January 29, 2008 Report Share Posted January 29, 2008 QUOTE(jennifer @ Jan 28 2008, 11:58 AM) I want to show the first two strings in a row in a diagram. How can this be realized? Jennifer, I made a few additions to your VI. I don't know if this is exactly what you were looking for but the VI now lets you select a row then gives you the first two elements that are comma seperated. Hope this helps. Steve Quote Link to comment
Tim_S Posted January 29, 2008 Report Share Posted January 29, 2008 QUOTE(jennifer @ Jan 28 2008, 11:58 AM) Hi,this new vi contains a few lines of the csv file. It works better now with strings. Thanks for your hint. I want to show the first two strings in a row in a diagram. How can this be realized? Thanks for your support. You could open the file and use "Read from Text File" to read n number of lines. You'll have to right-click on the primative function and check Read Lines to do this. The Spreadsheet String to Array primative would also be useful. Tim Quote Link to comment
Rolf Kalbermatter Posted January 30, 2008 Report Share Posted January 30, 2008 QUOTE(Tim_S @ Jan 28 2008, 07:53 PM) You could open the file and use "Read from Text File" to read n number of lines. You'll have to right-click on the primative function and check Read Lines to do this. The Spreadsheet String to Array primative would also be useful.Tim Why do sara and jennifer post quite similar requests here. I get this feeling that sara learned from the reactions and now got an identity change and tries to at least show that she did a little work before asking questions. Still!! Rolf Kalbermatter Quote Link to comment
TobyD Posted January 30, 2008 Report Share Posted January 30, 2008 QUOTE(rolfk @ Jan 29 2008, 10:55 AM) Why do sara and jennifer post quite similar requests here. I get this feeling that sara learned from the reactions and now got an identity change and tries to at least show that she did a little work before asking questions. Still!!Rolf Kalbermatter That's exactly what I thought! It must either be the same person, or they have the same professor. :gathering: Quote Link to comment
Rolf Kalbermatter Posted January 30, 2008 Report Share Posted January 30, 2008 QUOTE(TobyD @ Jan 29 2008, 02:55 PM) That's exactly what I thought! It must either be the same person, or they have the same professor. :gathering: And if the first is true I wonder if the name is just to try to get more likely help as a HH :laugh: Rolf Kalbermatter Quote Link to comment
jennifer Posted February 1, 2008 Author Report Share Posted February 1, 2008 QUOTE(Steve_Brooks @ Jan 28 2008, 07:35 PM) Jennifer,I made a few additions to your VI. I don't know if this is exactly what you were looking for but the VI now lets you select a row then gives you the first two elements that are comma seperated. Hope this helps. Steve Hi Steve, yes, that helps. Thanks a lot. I tried to display the values in a graph with the date as the x-scale and the temperature as the y-scale. Didn't worked out. Do you have a solutuion? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.