LabVIEW 2013 Report Generation Toolkit for Microsoft Office Help
»View Product Info
You can use the MS Office Report Express VI to create a report from a Microsoft Word or Microsoft Excel template. Word and Excel templates contain placeholders for data and components that are common to all reports. The MS Office Report Express VI inserts data into the placeholders so you can display, print, or save the resulting report.
The LabVIEW Report Generation Toolkit for Microsoft Office includes basic templates for Word documents and Excel worksheets. These templates are located in the labview\templates\Report directory.
Complete the following steps to use the MS Office Report Express VI to create a report from a basic Word template.
- Place the MS Office Report Express VI on the block diagram.
- In the configuration dialog box that appears, select Basic Report for Word from the Template pull-down list.
||Note Do not change the Report Generation Toolkit basic templates for Word and Excel. If you want to edit the basic templates, save them with different filenames and select Custom Report for Word or Custom Report for Excel in the configuration dialog box of the MS Office Report Express VI.
- Click the Author_Name item in the Bookmarks in the Selected Template list. Each item in this list represents a placeholder in the template.
- Select Fixed Value from the Value Source pull-down list.
- In the Fixed Value text box that appears, enter your name.
- Repeat steps 3 through 5 for the Company_Name and Report_Title_Main items in the Bookmarks in the Selected Template list. Enter My First Report for the Report_Title_Main item.
- Click the Graph1_Data_Input item in the Bookmarks in the Selected Template list. Verify that the Value Source for this item is Input and that the Input Appearance in Report is Graph.
- In the Report Destination pull-down list, select Open in Microsoft Office.
- Click the OK button to close the configuration dialog box. The Express VI icon on the block diagram displays inputs for all the bookmarks configured with a Value Source of Input.
- Place the Simulate Signal Express VI on the block diagram.
- Click the OK button in the configuration dialog box that appears.
- Wire the Sine output of the Simulate Signal Express VI to the Graph1_Data_Input input of the MS Office Report Express VI.
- Run the VI. Notice that the generated report opens in Microsoft Word and contains the text you entered for each placeholder in the template as well as the sine wave you created with the Simulate Signal Express VI.
Refer to the following VIs for other examples of using the MS Office Report Express VI to generate reports from templates.
- labview\examples\office\Excel Reports.llb\Generate Report From Template (Excel).vi
- labview\examples\office\Word Reports.llb\Generate Report From Template (Word).vi
You can create custom report templates in Word and Excel to ensure a consistent appearance in multiple reports. Use templates to define page size, text formatting, and other aspects of report appearance. You also can specify placeholders for text, tables, graphs, and images. Both Word and Excel provide ways to insert placeholders into documents and worksheets. Use bookmarks in Word and named ranges in Excel to define placeholders.
Refer to the Microsoft Word Help or Microsoft Excel Help for more information about creating templates.