Tedds Excel Link Error "Expression contains an unexpected delimiter"
Issue
When calculating a Tedds Excel Link field you get the error "Expression contains an unexpected delimiter",
The error occurs because of different number and expression settings used by Tedds and Excel which are conflicting with each other. The error can be resolved by modifying these settings so they are consistent.
Background
This issue is related to the characters used in Windows for numbers and lists etc. and in Tedds for numbers and mathematical expressions that are calculated. It is necessary to use a fixed and specific set of characters to represent decimal places, list separators (for lists of numbers and function arguments) and delimiters (which denote the beginning/ end of mathematical expressions).
For Tedds and Tedds for Word, the characters used for calculating are specified in Tedds Options > Calculating > Regional Settings as shown in the picture below. While any set of consistent characters can be used for your own calculations, the calculations in the Tedds Library are written using a specific set and will only work when these are set. This is the character set for English (United Kingdom).
The characters used for these purposes by other programs, such as Excel, are generally inherited from the Windows Region Settings which are shown below. In Excel Options you can check and if necessary set overrides for the characters used.
So by default the Decimal separator used in Excel = the Decimal Symbol set in Windows Region Settings. For many Regions this is a period “.”. However for some regions it may be a comma “,” and it is this that causes problems with the Tedds-Excel link, since when the comma is set as a decimal symbol in Excel, Tedds cannot ‘make sense’ of the Tedds-Excel link field producing the resulting calculation error.
Solution
The following steps should be followed for troubleshooting:
- To rule out potential errors in the original calculation document, check in a new Tedds for Word document if the calculation that causes the error is OK with the existing language setting - i.e. make a copy of the calculations that include the Excel link to a new Tedds for Word document and calculate this.
- If that causes an error, check the Microsoft Windows language settings as this controls what settings Office/Excel will be using.
3. If the number format is not standard (e.g. decimal separator is a comma) then go to the Tedds settings page, as shown below, and change the number and expression format to match.* Please note that you will then need to edit the document directly by replacing the existing characters in the Excel link function argument with the desired ones or simply re-create the Excel link field after changing the settings.
Alternatively, you can change your Windows Regional and Excel number format settings to match those set in Tedds.
- *You should also be aware that if you change the Number and expression format in Tedds so that it is different to the default English (United Kingdom) set, none of the Tedds Engineering Library calculations will work. This is because these are written using the English (United Kingdom) character set for decimal symbol, list separator and expression delimiter - hence a warning to this effect is issued when you change the settings as shown in the picture below.