LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView and Excel

I want to store simple characters (measurement data) to a .txt file. These
data are used for spreadsheet (e.g. Excel) test protocols. What I am
looking for is the possibility to launch a test protocol print out from
LabView with the stored data.
How can I launch easlily the print out with the stored data?

Thanks
Mike
0 Kudos
Message 1 of 2
(2,631 Views)
This is very easy with ActiveX. Just create an Excel template file with the raw data on Sheet1 and your report on Sheet2. If you need complex analysis of the data, include that on a separate sheet. I have used Excel as a report generator for several projects.

Using ActiveX you need to:
1. Open Excel
2. Open the data file (Workbooks.OpenText)
3. Copy the data (Sheets(1).CurrentRegion.Copy)
4. Open the template file (Workbooks.Open)
5. Paste the data (Application.Paste "Sheet1!A1")
6. Send Sheet2 to the printer (Worksheet.PrintOut)
7. Optionally Save As... to a new xls file
8. Close both Workbooks (Workbook.Close SaveChanges=False)
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 2 of 2
(2,631 Views)