LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I review 30 days worth of spreadsheet files in labview?

Each file is named with the day month and year. I need to be able to read back 30 days work and process the data trends. The day of processing could be arbitrary i.e. any day of the month. So from that point backwards I need to open each file to process the data based on the serial numbers. Initially I will be just counting the total serial numbers, i.e. records, in the file, and the total unique or number of instances of serial numbers i.e. number of test passes run on a given serial number.
0 Kudos
Message 1 of 15
(3,119 Views)
Well it sounds like you have already accomplished the first step in the process--defining exactly what you need to do.

Having the date information in the file names should make it easy to locate the files you need. When you say these are spreadsheet files are they Excel formatted files, or tab-delimited files that Excel can open, or (heaven forbid) a mixture of the two?

Structurally, I would concentrate first of writing a VI that accepts a filename and path as an input and does all the required processing on that file. Once you have that function written, simply put it in a loop and do it 30 times with the appropriate filenames.

Are there specific things you are wanting to know how to do?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 15
(3,119 Views)
Yes, the files are tab delimited. They were created with the write to spreadsheet file vi. The file names are made using the get date time string vi with the abreviated option (Thu, Feb 27, 2003.txt).

My approach is to open one file at a time, read its contents and process it. Maintain theprocessed data and open the next file and do the same thing again. Repeating this for the previous 30 days. I guess my main question is how to best construct the filenames based on what the current date is.
0 Kudos
Message 3 of 15
(3,119 Views)
Ohhhh. Piece O' Cake..

There are a dozen ways of doing this, see the attached VI for an example that I have used in the past...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 15
(3,119 Views)
PS: an advantage of this format is that it's very easy to parse and convert into different forms...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 15
(3,119 Views)
Mike, here is what I am probably going to use. I came up with this today. It allows the user to select the start day. This is only a rough draft to be used in a larger program. This is just how I will be achieving the filenames.
There is more to it but this is the main jist. I copied and pasted this section out of my vi.
0 Kudos
Message 6 of 15
(3,119 Views)
Can you please repost the code in V6.0 format?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 15
(3,119 Views)
Unfortunately no. I don't have labview 6.0. Only 6.1. Unless you know a way to do a "retro" save.
0 Kudos
Message 8 of 15
(3,119 Views)
Mike I just figured out how to save in 6.0 format. Try this one.
0 Kudos
Message 9 of 15
(2,995 Views)
Here it is in 6.0

Flo . . .
You can "retro save" by selecting File / Save with Options. Then click on the Save As Previous radio button.

Where did you find the calendar control? I can't find it in my choices of Active X controls. I definitely have a use for it.

Thanks,
Tim
0 Kudos
Message 10 of 15
(3,119 Views)