Word template with Bookmark for Report Creation in Batch Processing

ORG-13009 ,  ORG-13010

Video on YouTube

By creating a work template with Bookmarks and adding such bookmarks in Origin's Workbook Analysis template, Origin can perform batch analysis of multiple files and create PDF or Word reports with such Word template for each file. 

 

How to

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.

To add bookmarks to analysis template

  1. Open File: Open and browse to <Origin EXE folder>\Samples\Batch Processing\ folder, select file Sensor Analysis.ogw.
  2. Click File:Add Word Bookmarks to Analysis Template. Select <Origin EXE folder>\Samples\Batch Processing\ folder to select Sensor Analysis Report.dotx. Select all Bookmarks and click OK.
  3. A bookmarks worksheet is added to the end of Sensor Analysis workbook. 
  4. Right click cell next to FileName bookmark in Links column (Long Name) and select Insert Variable. In appeared dialog, click Info tab and select FILEName under SYSTEM.IMPORT treenode. Click Insert button to insert it.
  5. Do the same to insert info variable for bookmark FileDate. To make it display as normal date, right click that cell and select Format Cells. Select Date from Format drop-down list and click OK button to close dialog.
  6. For graph bookmark FittedGraph, right click the cell in Links column (Long Name) in newly generated worksheet Bookmarks to select Insert Graph to open dialog. In appeared dialog, click the browser button Tutorial Import 005.png to the right of the Graphs box to open Graph Browser dialog. Check Show Embedded Graph checkbox on the bottom left to make embedded graphs available in panel on the left. Click to select desired graph and add it to panel on the right. Click OK to insert graph toBookmarks worksheet. Set the graph width as 250.
  7. Do the same to insert graph for bookmark ResidualPlot
  8. For bookmarks related to parameter values, you can copy and paste values as link from report sheet. To do it, click report sheet Linear Fit of Data B "Sensor Output"and locate the Parameters table. Click the corresponding data cell and right click to select Copy. Return to Bookmarks sheet, right click desired cell in Links column and select Paste Link to build the connection between bookmarks in Word template and values in report sheet.
  9. Repeat this "Copy and Paste Link" operation to fill in the rest of bookmark links. When done, select menu File: Save Workbook as Analysis Template... to save the analysis template as Sensor Analysis Template.ogw .And then save to .ogw by using "Save Workbook As Analysis Template". Now the template can be used to output analysis result into a word template.


To do batch processing to generate report based on Word template

  1. Open Batch Processing dialog. In the Analysis Template drop-down, select the Sensor Analysis Template.ogw file we created earlier 
  2. Select PDF from Export to drop-down list to export report as PDF file.
  3. Click the browser 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. Optionally you can click browser button Tutorial Import 005.png on the right of Export Path to specify another path for export.
  5. Click on the Browse button Tutorial Import 005.png in the File List section and select the Sensor01.datSensor02.dat and Sensor03.dat from the <Origin EXE Folder>\Samples\Curve Fitting folder.
  6. Select File Name as Dataset Identifier.
  7. Make sure the Data Sheet drop-down is set as Data.
  8. Make sure the Result Sheet drop-down is set as Result.
  9. Make sure that Delete Intermediate Workbook is cleared.
  10. A sample of exported PDF version report is as following: