Import Variable Definitions (XLS/MDB)
ImportVariableData.fsi
Problem description
The use of variables includes the easy global update of terms that occur in a project multiple times. For terms that change from one project to another it also makes sense to use variables (e.g. product name, version or part number).
The editor can change these variables at the beginning of the project relatively easy in a FrameMaker document and import them to all documents using the format import.
In addition, in technical documentation variables are often used for software terms that are specified by the development department (e.g.display texts or menu terms). This ensures that the terms that are used in the documentation for a device or software are the same terms that are used in the software.
The change of such variable definitions is not possible with the FrameMaker format import without effort. In the production process, the inclusion of the terms from development always requires the corresponding conversion and an extended workflow.
During the translation process, the translated software terms often already exist and will be specified by the development department. The inclusion of the translated terms in the FrameMaker documents is connected with additional difficulties especially up to FrameMaker 7 because the code page-specific conversion of the Unicode terms must be taken into account.
Function description
The script creates variable formats in the current document or all documents of the current book based on the definitions in the data source. The variable definition will be refreshed if the corresponding variable formats already exist in the documents.
Microsoft Excel worksheets or Microsoft Access tables may serve as data sources. The data is read out using a dynamically generated
ODBCconnection.
The script requires the name (ID) of the variables in one column of the table. This does not have to be the first table column, although this is recommended. The other columns contain the variable definitions. With multilingual data, each table column contains the data for the corresponding language.
The description of the ID column should be ‘ID’. Otherwise, the script cannot recognize the ID column and will display a dialog to select the ID column.
The column titles must (with Excel tables) be located in the first row of the table.
The titles of the remaining columns are only important when the data is imported with FrameMaker 7 or lower.
After the script is started, the data file must be selected.
Avoid having the file open at this time (an Excel file may be open, but when a cell content is currently being edited, the script cannot read out the data).
If an Excel file contains multiple (filled-out) worksheets, you will be asked to select a worksheet.
If the table does not contain an ‘ID’ column, another dialog for the selection of the ID column with the variable names will appear.
If the table only contains one column in addition to the ID column, no additional dialogs will be displayed. Otherwise, you will be asked to select the desired column.
The entries on the list and their order correspond with the column titles in the table.
Special particularities with FrameMaker 7
FrameMaker7 and earlier versions are not Unicode capable.
Therefore, the script must convert the Unicode coded terms of the data source to the code page oriented FrameMaker encoding.
If the script cannot identify the language and thus the code page based on the column title, you will be asked to assign the corresponding language.
For an automatic identification of the language under FM7, use one of the following entries for the column IDs:
| de | deu | German | Deutsch |
| en-us | enu | English (US) | Englisch (US) |
| English, English US, USEnglish, US English, En, en | |||
| en-gb | eng | English (GB) | Englisch (GB) |
| British, English GB, GBEnglish, GB English | |||
| fr | fra | French | Französisch |
| French (France), Französisch (Frankreich) | |||
| fr-ca | frc | French (Canada) | Französisch (Kanada) |
| Canadian French, Kanada-Französisch, French Canadian | |||
| it | ita | Italian | Italienisch |
| pt | ptg | Portuguese | Portugiesisch |
| Portuguese (Portugal), Portugiesisch (Portugal) | |||
| pt-br | ptb | Portuguese (Brazil) | Portugiesisch (Brasilien) |
| Brazilian, Brasilianisch | |||
| es | esp | Spanish | Spanisch |
| Spanish (Spain), Spanisch (Spanien) | |||
| es-mx | esm | Spanish (Mexican) | Spanisch (Mexiko) |
| ca | cat | Catalan | Katalanisch |
| nl | nld | Dutch | Niederländisch |
| da | dan | Danish | Dänisch |
| fi | fin | Finnish | Finnisch |
| no | nor | Norwegian | Norwegisch |
| sv | sve | Swedish | Schwedisch |
| sq | sqi | Albanian | Albanisch |
| bs | bsb | Bosnian | Bosnisch |
| pl | plk | Polish | Polnisch |
| ro | rom | Romanian | Rumänisch |
| sr-lat | srl | Serbian (Latin) | Serbisch (lateinisch) |
| sr-cyr | srb | Serbian (Cyrillic) | Serbisch (kyrillisch) |
| sk | sky | Slovak | Slowakisch |
| sl | slv | Slovenian | Slowenisch |
| hr | hrv | Croatian | Kroatisch |
| cs | csy | Czech | Tschechisch |
| hu | hun | Hungarian | Ungarisch |
| tr | trk | Turkish | Türkisch |
| et | eti | Estonian | Estnisch |
| lv | lvi | Latvian | Lettisch |
| lt | lth | Lithuanian | Litauisch |
| el | ell | Greek | Griechisch |
| ru | rus | Russian | Russisch |
| bg | bgr | Bulgarian | Bulgarisch |
| uk | ukr | Ukrainian | Ukrainisch |
| mk | mki | Macedonian | Mazedonisch |
| be | bel | Belarusian | Weißrussisch |
| zh-hans | chs | Chinese (Simplified) | Chinesisch (vereinfacht) |
| zh-hant | cht | Chinese (Traditional) | Chinesisch (traditionell) |
| ja | jpn | Japanese | Japanisch |
| ko | kor | Korean | Koreanisch |
Requirements
- FrameMaker 6.0 or higher
- FrameScript/ElmScript 4.1 or higher
Note
The script works with structured and unstructured documents.



Klaus Müller
![[i]-frame Import Variable Data [i]-frame Import Variable Data](typo3temp/pics/c2031c3d72.png)
![[i]-frame Import Variable Data FrameScript Import Variable Data](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/ImportVariableData3.png)
![[i]-frame Import Variable Data [i]-frame Import Variable Data](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/ImportVariableData4.png)