Creating Hyperlinks (and other formulas) in Insight for Excel from a Pipeline Pilot protocol

When importing the protocol output into a worksheet, any text that begins with a quote character or an equals sign is "escaped" by adding another single quote character at the front. However, this prevents protocol authors from being able to use Excel equations and/or quote characters to create specific types of output.

To allow protocol authors to prevent the automatic escaping of strings that start with a single quote or equals sign, such strings can be prepended with an underscore character. When the results are imported into the Excel worksheet, these leading underscores will be removed and the rest of the string is copied "as-is" into the cell formula. This allows protocol authors to write protocols that return Excel formulas as their result.

When manually written directly into Excel, the syntax of formulas depends on the client's regional settings. Excel uses the list separator defined under regional settings in the Control Panel. The US English version of Excel uses a comma (,) for list separator by default, while other international versions may use a semicolon (;).

Regardless of the client's regional settings, formulas that are sent from a protocol should always us the comma as list separator.

For example, the protocol defines a couple of properties in Pilot Script and pass them to the Insight for Excel Data Writer:

Name := '3DS';
Link := 'http://www.3ds.com';
Hyperlink := '_=HYPERLINK("'.Link.'","'.Name.'")';
Hyperlink2 := '_=HYPERLINK("http://www.3ds.com","3DS")';
Calc := '_=12+21';
RubbishFormula := '_=adasd';

The above example will work regardless of the client's regional settings. Even if the client OS use semicolon as the list separator which is common for regions where the comma is used as decimal separator, Excel will automatically translate this when the formula is written into Excel.

The conclusion is to always use comma as list separator in Excel formulas when these comes from a Pipeline Pilot protocol.