If you are using the Report Generation Toolkit:
Use the Save Report to File.vi
, located in Functions » Report Generation
palette. This VI requires a report reference input for the Excel Report that you want to save. It also requires a report file path input containing the location and filename of the report you want to save. This will not prompt for a file path or overwrite.If you are not using the Report Generation Toolkit:
Microsoft provides an ActiveX method that you can modify to disable the prompts when saving your Excel document.
- After opening a reference the Excel application using Automation Open , create a new property node
- Add an element to the property node and select DisplayAlerts. Connect a Boolean false constant to this element (see the screenshot below)
Figure 1: Setting the DisplayAlerts
For examples of using ActiveX to interface with Microsoft Excel, review the Excel examples available in the NI Example Finder that ships with LabVIEW:
- From any LabVIEW Window, select Help » Find Examples...
- In the Search tab, enter excel to find the examples