4.1.2 What is Saved with the Workbook Template (*.OTW or *.OTWU) File?


Historically, the concept of an Origin workbook template was fairly narrow. These were files of type *.OTW and *OTWU and they did not store data or operations of any kind. More recently, the concept of "workbook template" has been expanded to include such things as a workbook file that contains some baseline data that is used repeatedly in some analysis or graphing operation; or a workbook that contains no data but does contain a sequence of analysis operations that are stored with the workbook -- a configuration known as an Analysis Template.


The user should note that these three types of "workbook templates" are saved in different ways:

  • To save a *.OTW or *.OTWU file, activate the window and choose File: Save Template As.
  • To save a workbook file (*.OGWU) that contains some data and possibly some operations, activate the window and choose File: Save Window As.
  • To save an Analysis Template (*.OGWU) that contains no data but contains one or more analysis operations, activate the window and choose File: Save Workbook as Analysis Template.


The remainder of this topic refers to things that are stored in *.OTW and *OTWU files.

Worksheet Properties dialog box

Settings in the Worksheet Properties dialog box are saved with the workbook template:

  • Displaying/hiding of row and column heading labels.
  • Displaying/hiding of worksheet grid lines.
  • The number of rows and columns in the worksheet.
  • Auto addition of worksheet rows, when needed.
  • Creation and naming of worksheet column heading user-defined parameters.
  • The order of worksheet column heading row labels.


To open the Worksheet Properties dialog box:

  1. Double-click in the empty cell in the upper-left corner of the worksheet.

or

  1. Right-click on the empty area of the workbook and choose Properties from the short-cut menu.


To learn more, see Reference: The Worksheet Properties Dialog Box.

Column Properties dialog box

Settings in the Column Properties dialog box are saved with the workbook template:

  • Edit column Short Name, Long Name, Units and Comments.
  • Enter a Formula which sets column values (note that the Set Values dialog box accomplishes the same and offers more power -- see below).
  • Set column width.
  • Specify how column data are to be treated when plotting (as X, as Y, as Label, etc.), column data Format (text, numeric, date, etc.), how column numbers should Display (decimal, scientific, engineering), the number of column Digits and data storage requirements.


To open the Column Properties dialog box:

  1. Select Format: Column when a worksheet column is selected.

or

  1. Double-click on the title of a worksheet column.


To learn more, see Reference: The Column Properties Dialog Box.

Set Values dialog box

Column formulae defined with the Set Values dialog box or entered directly into the F(x)= column label row, are saved in the workbook template.

Additionally, scripts or variables defined in the Before Formula Scripts panel of Set Values are saved with the workbook template.


To open the Set Values dialog box:

  1. Select a worksheet column, then select Column: Set Column Values.


To learn more, see:

Dialog boxes associated with any worksheet annotations

As is the case with graph windows, you can add annotations (text, drawing objects, buttons) to the worksheet. Any annotations along with the settings associated with the following dialog box controls, are saved with the workbook template.

Import Options Saved to the <Sheet>

The X-Function based dialog boxes that open from the Data: Import from File menu support saving your import options to the worksheet.

  1. Click Data: Import from File and choose the file format.
  2. Browse to your file(s) and Add Files for import.
  3. Enable Show Options Dialog and click OK.
  4. When the dialog box opens, choose your import options.
  5. Click OK to close the dialog and import your file(s). Customized import settings will be automatically saved to the data sheet.
  6. With the sheet active, choose File: Save Template As and save your .OTW file.

Note:

  1. Each sheet in the book can be saved with its own import options but each sheet can save only one set of import options (e.g ASCII or Excel but not both).
  2. If you want to import data file by drag-n-drop, you will need to click the Button Select Dialog Theme.png button to the right of the Dialog Theme box in the import options dialog and choose Save Settings for Drag and Drop.

Origin Import Filter (*.OIF) file

When you use the Import Wizard to import data, you have the option of creating and saving an Origin Import Filter. These filters contain parsing instructions for header information and data and may contain instructions for handling variables associated with a file and/or post-import data processing instructions. Such filters can be saved as a standard OIF files, or -- as concerns in this case -- they may be saved with an Origin workbook template. This template would be configured specifically for importing your data files.

To learn more, see Import Wizard and Import Filter Manager.

Variables Defined on Import using the Import Wizard

When importing data with the Import Wizard, you have the option of extracting and storing file header values in the page.info area of the workbook. These values are stored with the workbook template.

Worksheet Query dialog box

The equations in the Worksheet Query dialog box are saved with the template.


To open the Worksheet Query dialog box:

  1. Select Worksheet: Worksheet Query.


To learn more, see Worksheet Query.

Scripts associated with the workbook/worksheet

Scripts can be associated with the worksheet in several ways. As mentioned, they can be entered into the Before Formula Scripts panel of the Set Values dialog box. You can attach an text, drawing or button object and associate a script with the object via the Programming Control dialog box, mentioned above.

Scripts can also be added by entering them into:

Database access queries

A key feature of the ADO (database connectivity) tool is that it allows you to save a query with the worksheet. When you do so, you have the option of saving the query with the workbook template. This allows you to open a copy of your worksheet template, connect to your database, and automatically import only the data that you want.

For more information on creating and saving a query with the ADO tool, see Building and Saving a Query.