OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis                     
 

4.8.4 Batch Processing with Word Template for Reporting

Summary

Origin can perform batch analysis of multiple files and output cell-linked analysis results to an external Word template for reporting.

Minimum Origin Version Required: Origin 2016 SR0

What you will learn

This tutorial will show you how to:

  • Add bookmarks from a Word template to a specific Analysis Template
  • Link analysis results to bookmarked cells in Word template and adjust the sizes of graphs to be exported
  • Sending one time results to Word template for reporting
  • Perform batch analysis of multiple files and export results to Word/PDF files

Steps

In this tutorial we will use a built-in Word template Sensor Analysis Report.dotx which is located at <Origin EXE folder>\Samples\Batch Processing\ folder. To view the bookmark labels on the Word template, with the file open go to File: Options to open Word Options dialog. Then select Advanced on the left panel and scroll down to section Show document content on the right panel and check Show bookmarks checkbox there.

Batch Processing with Word Template for Reporting 01a.png

Add Bookmarks to Analysis Template

  1. Start Origin. Click File: Open and browse to <Origin EXE>\Samples\Batch Processing\ folder and select the file Sensor Analysis.ogw (NOT "Sensor Analysis.ogwu") and open it.
  2. Activate worksheet Data, click the button Button Import ASCII.png and browse to <Origin EXE folder>\Samples\Curve Fitting\ folder and select file Sensor01.dat to import data for analysis.
  3. Go to menu File: Add Word Bookmarks to Analysis Template... to open dialog. Click the browse button Tutorial Import 005.png to the right of the Word template box and browse to <Origin EXE folder>\Samples\Batch Processing\ folder to select Sensor Analysis Report.dotx.
  4. Click to select all bookmark entries in the Bookmarks list under Select Bookmarks and click OK to add a Bookmarks sheet to the active analysis template.
    Batch Processing with Word Template for Reporting 01.png

Link Analysis Results to Word Template

  1. Click on the Bookmarks tab.
  2. In the Links column, right-click the cell to the right of FileName and select Insert Variables.
  3. In the Insert Variables dialog, click the Info tab, expand the SYSTEM.IMPORT node and highlight FILENAME. Click the Insert button to insert the file name into the worksheet cell.
  4. Right-click the cell beside FileDate and again choose Insert Variables, expand the SYSTEM.IMPORT node, highlight FILEDATE and click the Insert button to insert the file date into the worksheet cell. Note that the value that is inserted is a Julian Day value, the number that Origin uses internally to store date-time data. To display in a more familiar date format, right-click the cell and select Format Cells.
  5. From the Format drop-down list, select Date and click OK to close the dialog.
  6. Right-click the cell beside the FittedGraph cell and select Insert Graph. Click the browse button Tutorial Import 005.png to the right of the Graphs box to open Graph Browser dialog. Check the Show Embedded Graph box to display a list of worksheet-embedded graphs. Click to select the FitLine graph and add it to panel on the right. Click OK twice to insert the graph into Bookmarks worksheet. In the GraphWidth column to the right, enter 250 (units = point size) to specify the size of the graph that will be exported to Word.
  7. Batch Processing with Word Template for Reporting 02.png

  8. Repeat the last step for the row ResidualPlot.
  9. For bookmarks related to parameter values, we will copy and paste link values from the report sheet FitLinear1. Click the report sheet FitLinear1 and locate the Parameters table. Click on the data cell at the intersection of Intercept and Value, right-click and select Copy. Return to the Bookmarks sheet, right-click the cell to the right of InterceptValue and select Paste Link to create a link between bookmarks in the Word template and values in report sheet.
  10. Repeat this "Copy and Paste Link" operation to fill in the rest of cells in the Links column (you'll find the RSquare value beside Adj. R-Square in the Statistics table). When done, click File: Save Workbook as Analysis Template... to save the analysis template as Sensor Analysis Template.ogw or .ogwu .
    Batch Processing with Word Template for Reporting 04.png

You can follow the steps in the previous tutorial "Creating a Custom Report Sheet" to learn how to copy and paste results as link to desired cell.

Sending One Time Results to Word Template to Create Word Report

Sometimes we may just want to analyze one data file and quickly create one Word report. Continue from the example above, suppose we have all results linked to Word bookmarks as shown in Bookmarks worksheet, to create an one time Word report for active sheet you can simply click Export to Word button Button Create Word Report.png on the top left corner to create it.

You can further specify where to output the Word report in appeared Export Path dialog.

Batch Process and Export Results to Word/PDF Files

  1. Start with a new project.
  2. Click on the Batch Processing button Button Batch Processing.png.
  3. Make sure Load Analysis Template is selected as Batch Processing Mode. In the Analysis Template drop-down, select the Sensor Analysis Template.ogw(u) file we created earlier (you may need to click the button to the right of the list and browse to the created file).
  4. Select PDF from Export to drop-down list to export report as PDF file.
  5. Click the browse button Tutorial Import 005.png to the right of the Word template box and browse to <Origin EXE folder>\Samples\Batch Processing\ folder to select Sensor Analysis Report.dotx.
  6. Optionally you can click browse button Tutorial Import 005.png on the right of Export Path to specify another path for export.
  7. Click on the browse button Tutorial Import 005.png to the right of File List, browse to the <Origin EXE Folder>\Samples\Curve Fitting folder and select all sensor files Sensor0#.dat.
  8. Click Add File(s), then click OK.
  9. Select File Name as Dataset Identifier.
  10. Make sure the Data Sheet drop-down is set as Data.
  11. Make sure the Result Sheet drop-down is set as Result.
  12. Make sure that Delete Intermediate Workbook is cleared.
  13. Click OK to close the dialog and process the "Sensor" data files.

  14. Batch Processing with Word Template for Reporting 05.png

    If you forget where to look for your exported PDF files, the location is output to Messages Log.

    A sample of exported PDF version report is as following:
    Batch Processing with Word Template for Reporting 07.png

 

© OriginLab Corporation. All rights reserved.