Hi DiPs,
You have several options when reading data from an Excel file. The simplest one is to read from a delimited text file, which is directly readable by both LabVIEW and Excel. For this, you can use the Read From Spreadsheet File VI, taking advantage of the read offset input. This function can read in all of the data in a file and let you know what location in the file it stopped at. In subsequent calls to the function, you can tell it to start reading where it stopped the last time. In this way, you can check for new data:
This method can be used while the file is open in Excel, since it accesses the file in a read-only manner. Caveats: It doesn't work well with .xls files, since Excel adds quite a bit of extra formatting to the file, and the file must be saved before LabVIEW can see the new data
You can also read data from Excel using Excel's ActiveX interface - this will allow you to retrieve data directly from a .xls file, but programming it is not quite as simple if you're new to LabVIEW. We do have good documentation on how to accomplish this on our website and in the LabVIEW help - I'd recommend the article
Using LabVIEW as an Automation Client with Microsoft Excel as a good starting point, as it contains links to several other useful resources for you.
Message Edited by MattP on 03-16-2007 08:36 AM
Message Edited by MattP on 03-16-2007 08:37 AM
Cheers,
Matt Pollock
National Instruments