09-15-2010 09:40 PM
Hello
I have a csv file (attached) that has in the first column a time stamp in the format 11:35 (hh:mm)....so far so good.
I am reading the value from the file using the ReadCellFromExcell.vi (last row value only), but the value returned looks like 0.4826388888
After doing some searching on the forum and under LV help I'm no closer to understanding what is happening here, and would appreciate some clarification
There seems to be nothing out of the ordinary with my coding, as other cells are reading fine.
Could somebody enlighten me?
Thanks and regards
Ray
09-15-2010 09:52 PM
We would help if we knew what this ReadCellFromExcell VI is. Is this something you wrote? Is it something you got from the forum? If so please indicate where you got it. Better yet, upload your code so we can see what you're doing. In all likelyhood the VI is simply trying to convert the value into a number assuming a numerical format rather than some time format.
09-15-2010 09:56 PM
Vi attached....actually I picked it up off this forum
09-15-2010 09:58 PM
If you are using Excel to open a csv file, you are doing a lot of unnecessary work, it seems to me. Its a text file and all you need is Read From Speadsheet File.
Not sure exactly why the Excel rad does not work but Excel does store timestamps as hh:mm:ss string. It stores them as numer of seonds sine a date I can't remember offhand so if you used a timstamp format as the data type to read, the interpetation will probably fail.
09-15-2010 10:13 PM - edited 09-15-2010 10:13 PM
Using Read From Spreadsheet File would be far easier since you don't have to use ActiveX. If you select the string instance of that polymorphic VI you will get your data as a 2D array of strings which will allow you to easily parse the first column as a time. Something along these lines: