You can get the value of a particular named cell (or several named cells) in an Excel spreadsheet, and assign its value to a !groupname!(s) using the following command:

E.g., <<*Get*!DecedentName!>>

Anatomy: <<*Get*!groupname!>> (colors are for emphasis and reference only)

<<*Get* = the command

!groupname! = either (1) the named cell in the spreadsheet or (2) the column title in a two row spreadsheet in the target spreadsheet. A 'named cell' can be anywhere in the spreadsheet. The column title must be in row 1, and the value that Pathagoras returns much be in the cell immediately beneath that title.

Groupname represents the groupname (in both the document and the spreadsheet) to which you wish to assign a value. This is just an alternative way to assign the answer to an <<*Options* . . . .>> block. But instead of asking the question during processing, the answers are read in from an Excel spreadsheet.

(1) an 'X(Y)' value representing selected values X (or X1, X2, etc.) of Y options. The X part represents the 'position' of a corresponding <<*Options*!groupname!* .  .  .>> block in the document. The Y part represents the total number of choices presented in the document's <<*Options*!groupname!* .  .  .>> block.

A typical value might look like this: '2(4)' (no quotes). '2' is the selected choice and '4' is the number of possible choices in the document.

Multiple selections are possible. Just separate with commas. 1,4,7(9). The selected choices 1, 4 and 7 of 9 possible choices.

(If you just include the position(s), but not the number of possible choices, Pathagoras can still process the item. It may take a split second longer.')

(2) a 'boolean' ('True' or 'False') value representing a 'keep' or 'delete' value for a corresponding <<*Optional*!groupname! . . .>> command. The value must be 'True' or 'Yes' or 'False' or 'No.'

(3) a numeric value representing the number of 'repeats' to be applied to a corresponding <<*Repeat*!groupname!* . . . >> command.

(4) a <<document call>>. The spreadsheet term must include the boundary markers '<<' and '>>' to denote the call..

The target spreadsheet

oIf no other target is provided, the target spreadsheet is the one set in 'Settings | All Settings | Excel' The 'presumption is that you have set a static spreadsheet which you will fill with new information before each document assembly session. This default reflects the early origins of this feature, which was single, static, flat (two column) spreadsheet. Most CRM's and other 3rd party programs could be programmed to export data to an Excel file following a templated pattern, and Pathagoras was programmed to 'get' data only from such a record. Now Pathgoras can read any field in any Excel spreadsheet.

oYou can designate any spreadsheet as the target inserting the <<*GetFrom*. . . .>> command immediately before the <<*Get* . . .>> command. Type the name of the spreadsheet immediately after *Get* and close the command with '>>'. If the spreadsheet is in the default Excel folder set in the 'Settings | All Settings | Excel' screenage, you need not 'qualify' -- i.e., add drive and folder information -- the spreadsheet. Otherwise, you must qualify the spreadsheet with full drive and path information. E.g.,

oActually, referencing the target spreadsheet is optional. If no spreadsheet is provided e.g., <<*Get*!DecedentName!>>, Pathagoras will look in the 'default' spreadsheet that is set in the 'Settings | All settings | Excel' screenage.

oIf "*.*" is stated as the spreadsheet name, e.g., <<*Get*!DecedentName!*.*>>, Pathagoras will present a navigation screen to let you select a spreadsheet.


    Use it as the 'position' in an <<*Options* . . .>> block.

<<*Get*!discount!>> resides in the interview section.

The value of !discount! in the target spreadsheet is '2(3)'.

This text is in the document body:
    Your purchase entitles you to a <<*Options*!discount!*ten/twenty/thirty>> percent discount."

the resulting text (after processing) will read:
    Your purchase entitles you to a twenty percent discount.

Note: The positional value can be used with the '(cumulative)' argument as well.

    Use it as the true/false value in an <<*Optional* . . . >>

<<*Get*!discount!>> resides in the interview section.

The value of !discount! is 'True'.

The text in the document body is:
        <<*Optional*!discount!Your purchase entitles you to a 10% discount.>>

the optional text will remain in the document. If the value is 'False' (or 'No'), the clause will be deleted.

    Use it as the value for a <<*Repeat* . . . >>block

<<*Get*!Shareholders!>> resides in the interview section.

The value of !shareholder! is 4.

The text in the document body is:
        <<*Repeat(and,)*!Shareholders!*[Shareholder Name]>>

The resulting text will be:
      [Shareholder Name@1], [Shareholder Name@1], [Shareholder Name@1] and [Shareholder Name@1]

    Return a document:

<<*!groupname!>> will place the value of the groupname in the document.

If the groupname is 'color' and its value in the spreadsheet is 'orange.docx', the word 'orange.docx' will replace the groupname, and the surrounding << and>> tell Pathagoras to call the target document in place of the <<document call>>.

If the groupname is 'sigblock" and its value in the spreadsheet is, let's say '<<sigblockJPQ>>, the text <<sigblockJPQ>>' will temporarily replace the call. However, it being a document call, Pathagoras will immediately search for the document 'sigblockJPQ' and insert it into the document at this location.

     Use it in an AskTable

Compare the 'gotten' value with another value using the <<*If*>> command.

Analyze it using Pathagoras 'range' function. (In this case, Pathagoras will process the result and return an appropriate block of text associated with the 'gotten' value. Perfect for psychologists and others who need to provide information associated with a particular score on a test. Lots of other applications possible.)


Getting multiple values: to save a bit of time, you can request multiple values from the same spreadsheet. Just list the target names as part of a 'long' groupname, separating the individual names with commas. E.g.

<<*Get*!DecedentName,DecedentCity,PRName!jones probate.xlsx>>

Alternative ways to set source spreadsheet:

You can set the source spreadsheet using the <<*GetFrom*(fullpath\name.xlsx)>> command. Of course, the <<*GetFrom* command must precede the <<*Get* . . .>>.

E.g., <<*GetFrom*c:\datacenter\trustdata\jones probate.xlsx>>