Storing Metrology Results Using Excel Automation
by Nelson Tarr
Machine Vision Consulting (MVC) often provides metrology applications for measurement of part features. Frequently, raw measurements are saved in simple file formats such as ‘csv’ or ‘txt’. These formats require additional programs for analysis and reporting of the data.
One convenient way MVC streamlines the analysis and reporting process is to store data in formatted Excel (xls) files using a process call Automation. Automation allows applications written in languages such as C# or VB.NET to control other applications. Using Automation, virtually all the actions you can perform manually through Excel’s user interface can also be performed programmatically. One downside of Excel Automation is it requires Excel to be installed on the deployment PC.
For Machine Vision applications, Excel provides powerful data analysis and presentation functionality. In addition to storing raw measurement data, Excel can create charts, such as histogram bar charts, pie charts, or scatter plots. One interesting feature of Automation is that once Excel has calculated, for instance, a 3D surface chart, an image of the chart can be returned to the original .NET application for display on its user interface.
Excel spreadsheets can hold image data as well. MVC has used this feature to store thumbnail images associated with measurement data for traceability. Associated bar codes or Data Matrix codes can be added to the Excel report. In fact, any Windows graphics object can be stored in an Excel spreadsheet.
Excel Automation provides many capabilities for formatting spreadsheets into attractive reports. After a spreadsheet is formatted, it is a simple matter to save the spreadsheet to file on the PC in Excel format. The resulting file can be viewed in Excel, or in any one of many free Excel viewers.
Tags: C#, Excel Automation, Machine Vision, Metrology, VB.NET



