The 1-2-3 and Freelance Graphics File Translator

The 1-2-3 and Freelance Graphics File Translator converts spreadsheet and presentation graphics files between the OS/2 and Windows file formats. When you translate .WG2 files, you can also convert 1-2-3 for OS/2 macros to 1-2-3 for Windows format.

Note	The Translator will not convert .PRZ files created using Freelance Graphics 96.

Converting 1-2-3 and Freelance Graphics files

Overview: The 1-2-3 and Freelance Graphics File Translator

Converting a 1-2-3 file

Converting a Freelance Graphics file

Translating 1-2-3 for OS/2 macros

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Troubleshooting 1-2-3 for OS/2 macro translation

Overview: Macro command and keystroke translation

Identifying macros that are not fully translated

Using the MACTRANS.WK4 worksheet file

Editing translated 1-2-3 macros

Replacing all or part of a translated macro


Overview: The 1-2-3 and Freelance Graphics File Translator

The 1-2-3 and Freelance Graphics File Translator converts spreadsheet and presentation graphics files between the OS/2 and Windows file formats.

You can convert:

•	To and from the 1-2-3 .WG2 and .WK4 file formats.

The Translator converts .WG2 files created using Lotus1-2-3 for OS/2 release 2.x and .WK4 files created using Lotus 1-2-3 for Windows release 4.x or 5.x. It converts data and worksheet styles and retains most formulas, @functions, fonts, borders, and colors. When you translate .WG2 files, you can also convert 1-2-3 for OS/2 macros to 1-2-3 for Windows format.

•	To and from the Freelance Graphics .PRS and .PRE file formats.

The Translator converts .PRS files created using Lotus Freelance Graphics for OS/2 release 2.x and .PRE files created using Lotus Freelance Graphics for Windows release 2.1. It converts data and SmartMaster styles and retains most fonts, borders, and colors.

Note	The Translator will not convert .PRZ files created using Freelance Graphics 96.

 See related topics


Related topics :

Converting a 1-2-3 file

Converting a Freelance Graphics file

Overview: Translating 1-2-3 for OS/2 macros

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Classic menu

The 1-2-3 Classic menu is the command menu of 1-2-3 for DOS Release 3.x, available in 1-2-3 for Windows. To activate it, press / (slash) or < (less-than symbol). To use 1-2-3 for DOS Release 3.x Wysiwyg commands, press : (colon). To use add-ins, press ALT+F10.

When you complete a command, the 1-2-3 Classic menu disappears. To close the 1-2-3 Classic window without completing a command, either press CTRL+BREAK or press ESC until you reach the main menu and then press ESC again.


Details: Converting a 1-2-3 file

The 1-2-3 and Freelance Graphics File Translator attempts to convert the contents of the entire file. However, where there are differences in functionality between the 1-2-3 for OS/2 and 1-2-3 for Windows releases, some content may be disregarded or altered during the translation process. Some of the differences are described below.

Colors

Colors may not be identical when the files are converted. Since 1-2-3 for Windows supports 256 colors and 1-2-3 for OS/2 supports 16, the Translator adjusts the colors to most closely match the original colors.

Column widths

Column widths may not be identical when the files are converted. Since 1-2-3 for Windows and 1-2-3 for OS/2 calculate column widths differently, the Translator converts column widths based on the default font and the width of the column in inches or millimeters, not on the width of the characters.

DDE

DDE links are not maintained, since link commands in 1-2-3 for Windows and 1-2-3 for OS/2 are implemented in different ways. The Translator converts DDE links to labels.

See also the section on @functions in Details: Converting from WK4 to WG2 format.

Draw layer objects

The Translator does not convert draw layer objects such as arrows and circles.

Fonts

The Translator converts standard fonts available in both 1-2-3 for Windows and 1-2-3 for OS/2, such as Helvetica, Times Roman, and Courier. It converts other fonts into available fonts that most closely match the original font faces.

Graphics

The Translator does not convert bitmaps, metafiles, or other graphics embedded in the worksheet.

Graphs

The Translator converts embedded graphs. However, it disregards graph names in a .WK4 file, since there is no equivalent functionality in 1-2-3 for OS/2.

The Translator disregards graphs in a .WG2 file saved as separate .GPH files.

Macros

Macros are treated differently depending on whether you are converting .WG2 files to .WK4 format or you are converting .WK4 files to .WG2 format.

When you convert 1-2-3 for Windows files to 1-2-3 for OS/2, the Translator does not convert macros in the .WK4 files to 1-2-3 for OS/2 macros. Since macro commands in 1-2-3 for Windows and 1-2-3 for OS/2 are not always identical, macros that perform correctly in the original .WK4 file may not work correctly in the translated worksheet file.

The Translator can convert 1-2-3 for OS/2 macros to 1-2-3 for Windows Release 5 macros. However, because of differences between the menus and macro commands in 1-2-3 for OS/2 and 1-2-3 for Windows, not all macros can be completely translated.

Password-protected files

The Translator does not convert 1-2-3 files that are password-protected. You must remove the passwords in the files before you convert them.

Print margins

Print margins may not be identical when the files are converted. You can modify them when you open the converted files.

Row heights

Row heights may not be identical when the files are converted, since row heights are based on font sizes. See also the section on Fonts above.

 See related topics

 Go to procedure


Related topics :

Details: Converting from WG2 to WK4 format

Details: Converting from WK4 to WG2 format

Overview: Translating 1-2-3 for OS/2 macros

Translating 1-2-3 for OS/2 macros


Converting a 1-2-3 file

You can use the 1-2-3 and Freelance Graphics File Translator to convert files between the 1-2-3 for OS/2 file format (.WG2) and the 1-2-3 for Windows file format (.WK4). When you translate .WG2 files, you can also convert 1-2-3 for OS/2 macros to 1-2-3 for Windows format.

1.	Double-click the Translator icon.

2.	Under Translation Type, select "1-2-3 OS/2 (.wg2) to 1-2-3 Windows (.wk4)" or "1-2-3 Windows (*.wk4) to 1-2-3 OS/2 (*.wg2)."

3.	(Optional) Under Source Directory, click Browse to specify the drive and directory for the file(s) and click OK.

4.	Under File Name(s), select the file(s) you want to convert.

5.	(Optional) Under Destination Directory, click Browse to specify the drive and directory where the translated file(s) should be stored and click OK.

6.	(Optional) Select Translate Macros to translate 1-2-3 macros in .WG2 file(s).

7.	Click Translate.

8.	Click Exit when the Translator finishes converting the file(s).

Note	If you installed the Translator on a network drive, multiple users can run it from the same location. If multiple users concurrently attempt to translate same-named worksheets to the same destination directory, the Translator displays a message about overwriting an existing file.

 See related topics

 See details


Related topics :

Details: Converting from WG2 to WK4 format

Details: Converting from WK4 to WG2 format

Overview: The 1-2-3 and Freelance Graphics File Translator

Overview: Translating 1-2-3 for OS/2 macros

Translating 1-2-3 for OS/2 macros


Details: Converting a Freelance Graphics file

The 1-2-3 and Freelance Graphics File Translator attempts to convert the contents of the entire file. However, where there are differences in functionality between the Freelance Graphics for OS/2 and Freelance Graphics for Windows releases, some content may be disregarded or altered during the translation process. Some of these differences are described below.

Charts

If a .PRE file contains a chart whose legend was positioned at the top of the chart with the Chart Legend dialog box, the Translator moves the legend to the right of the chart.

Chart notes, including annotations, lines, and arrows, are discarded.

Chart titles and axis labels may not be positioned identically when the files are converted.

Chart types may not be identical when the files are converted. Since Freelance Graphics for Windows supports more chart types than Freelance Graphics for OS/2, the Translator converts the chart type to one that most closely matches the original. For example, Freelance Graphics for Windows supports some 3D chart types that Freelance Graphics for OS/2 does not. In this case, the Translator converts the 3D charts to their corresponding 2D charts.

Colors

Colors may not be identical when the files are converted. Since Freelance Graphics for Windows supports 256 colors and Freelance Graphics for OS/2 supports 120, the Translator adjusts the colors to most closely match the original colors.

DDE and OLE

DDE links and OLE objects are not maintained, since link commands in Freelance Graphics for Windows and Freelance Graphics for OS/2 are implemented in different ways.

Fonts

The Translator converts standard fonts available in both Freelance Graphics for Windows and Freelance Graphics for OS/2, such as Helvetica, Times Roman, and Courier. It converts other fonts into available fonts that most closely match the original font sizes.

The default font face for PRE files is Arial MT, and the default font face for PRS files is Helv.

Graphics

The Translator discards all clipboard bitmap objects and imported Windows Format bitmaps in the presentation.

The Translator translates other graphics formats, such as OS/2 BMP bitmaps and black-and-white TIF files. However, OS/2 does not support all the graphics formats that Windows supports. If an object in a .PRE file is in a format that OS/2 does not support, the Translator inserts a placeholder in the corresponding location in the .PRS file.

Lines

Line styles and widths, including lines used in line charts and chart gridlines, may not be identical when the files are converted. If the Translator cannot match a line style exactly, it picks one that most closely matches the original.

Patterns

Fill patterns for charts and drawn objects may not be identical when the files are converted. If the Translator cannot match a pattern exactly, it picks one that most closely matches the original.

Print margins

Print margins may not be identical when the files are converted. You can modify them when you open the converted files.

Text blocks

When you create a default text block in a translated file, Freelance Graphics for OS/2 ignores the default settings for font face.

When you create a default text block in a translated PRE file, Freelance Graphics for Windows uses Arial MT as the default font. When you create a default text block in a translated PRS file, Freelance Graphics for OS/2 uses mixed font faces.

 See related topics

 Go to procedure


Related topics :

Details: Converting from PRE to PRS format

Details: Converting from PRS to PRE format


Converting a Freelance Graphics file

You can use the 1-2-3 and Freelance Graphics File Translator to convert between the Freelance Graphics for OS/2 release 2.x file format (.PRS ) and the Freelance Graphics for Windows release 2.1 file format (.PRE). The Translator converts data and SmartMaster styles and retains most fonts, styles, and colors.

Note	The Translator will not convert .PRZ files created using Freelance Graphics 96.

1.	Double-click the Translator icon.

2.	Under Translation Type, select  "FL Windows (.PRE) to FL OS/2 (.PRS)" or "FL OS/2 (.PRS) to FL Windows (.PRE)."

3.	(Optional) Under Source Directory, click Browse to specify the drive and directory for the existing Freelance Graphics file(s) and click OK.

4.	Under File Name(s), select the file(s) you want to convert.

5.	(Optional) Under Destination Directory, click Browse to specify the drive and directory where the translated file(s) should be stored and click OK.

6.	Click Translate.

7.	Click Exit when the Translator finishes converting the file(s).

Note	If you installed the Translator on a network drive, multiple users can run it from the same location. If multiple users concurrently attempt to translate same-named presentation graphics files to the same destination directory, the Translator displays a message about overwriting an existing file.

 See related topics

 See details


Related topics :

Details: Converting from PRE to PRS format

Details: Converting from PRS to PRE format


Details: Converting from PRE to PRS format

The 1-2-3 and Freelance Graphics File Translator attempts to convert the contents of the entire file. However, where there are differences in functionality between the Freelance Graphics for Windows and Freelance Graphics for OS/2 releases, some content may be disregarded or altered during the translation process. Some of these differences are described below.

Freelance Graphics for Windows content that cannot be translated

The 1-2-3 and Freelance Graphics File Translator ignores the following content in Freelance Graphics for Windows files because there is no equivalent functionality in Freelance Graphics for OS/2:

•	 DDE and OLE links

•	 Doc info

•	 Organization charts

•	 Screen show buttons and effects

•	 Speaker notes

•	 Tables

Screen show

Freelance Graphics for Windows lets you specify a different delay time for each page of a presentation during a screen show. Freelance Graphics for OS/2 lets you specify only a single delay time between pages during a screen show. The Translator converts multiple delay times to a single, common delay time.

Styles and attributes

Some style elements in Freelance Graphics for Windows, such as shadows, arrow size, bullets that are larger than text, and curved text, are not available in Freelance Graphics for OS/2. The Translator disregards such elements.

Text blocks

If you do not have Adobe Type Manager (ATM) running on your computer, the appearance of text blocks may be altered when the Translator converts a file that contains them. If a text block and a graphic appear on the same page, the text may write over the graphic in the converted file. Similarly, if a text block appears at the bottom of a page, it may flow over onto the next page in the converted file.

You can fix the appearance of text blocks when you open the PRS file. Simply select the text block and change its font size.

 See related topics

 Go to procedure


Related topics :

Details: Converting a Freelance Graphics file

Details: Converting from PRS to PRE format


Details: Converting from PRS to PRE format

The 1-2-3 and Freelance Graphics File Translator attempts to convert the contents of the entire file. However, where there are differences in functionality between the Freelance Graphics for Windows and Freelance Graphics for OS/2 releases, some content may be disregarded or altered during the translation process.

File names

Freelance Graphics for Windows cannot open files with names that contain more than 8 characters and a 3-character extension. You should shorten .PRS file names so that they conform to this convention before you convert the files.

 See related topics

 Go to procedure


Related topics :

Details: Converting a Freelance Graphics file

Details: Converting from PRE to PRS format


Details: Converting from WG2 to WK4 format

The 1-2-3 and Freelance Graphics File Translator attempts to convert the contents of the entire file. However, where there are differences in functionality between the 1-2-3 for Windows and 1-2-3 for OS/2 releases, some content may be disregarded or altered during the translation process. Some of the differences are described below.

File names

1-2-3 for Windows cannot open files with names that contain more than 8 characters and a 3-character extension. You should shorten .WG2 file names so that they conform to this convention before you convert the files.

Macros

When the Translator cannot translate a macro completely, it creates a comment label {--} in each untranslated cell and creates a log file that contains a list of each cell address whose contents could not be fully translated, along with the original contents of that cell. Macros that contain cells listed in the log file may not work correctly unless you edit the translated macros.

Multi-line headers and footers

1-2-3 for Windows does not support multi-line headers or footers. Multi-line headers and footers in 1-2-3 for OS/2 files are converted to single-line headers and footers in 1-2-3 for Windows files. The tilde (~) characters that indicate new lines are preserved.

Note utility

The Note utility in 1-2-3 for OS/2 is not available in 1-2-3 for Windows. The Translator disregards notes.

User-defined formats

The Translator does not translate user-defined cell formats. Cells in 1-2-3 for OS/2 worksheets that have user-defined formatting are formatted with the Automatic worksheet format in the translated worksheet file.

 See related topics

 Go to procedure


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WK4 to WG2 format

Details: Identifying macros that are not fully translated

Details: Macro commands that cannot be translated

Editing translated 1-2-3 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros


Details: Converting from WK4 to WG2 format

The 1-2-3 and Freelance Graphics File Translator attempts to convert the contents of the entire file. However, where there are differences in functionality between the 1-2-3 for Windows and 1-2-3 for OS/2 releases, some content may be disregarded or altered during the translation process.

1-2-3 for Windows content that cannot be translated

The Translator ignores the following content in 1-2-3 for Windows files because there is no equivalent functionality in 1-2-3 for OS/2:

•	Doc info

•	Maps

•	Multiple currency formats (the currency format in the .WG2 file is determined by the default country setting)

•	Range routing

•	Version manager

•	Worksheet tab names

@Functions

1-2-3 for Windows releases 4 and 5 have many new @functions that are not available in 1-2-3 for OS/2. If the Translator does not recognize an @function in the source file, it places a label in the corresponding cell in the .WG2 file. The label is appended with a semicolon and the value: '@function name(arguments);current value (last calculated value saved in source file). You can find cells that contain '@ and decide whether to leave the label or use the current value.

See also the section on DDE in Details: Converting a 1-2-3 file.

Macros

The Translator does not convert macro commands in .WK4 files to .WG2 format. All macros in .WK4 files are unaltered during the translation process. Macros in the converted file may not work correctly, since macro commands in 1-2-3 for Windows and 1-2-3 for OS/2 are not always identical.

Styles and attributes

Some style elements in 1-2-3 for Windows, such as Designer Frames, are not available in 1-2-3 for OS/2. The Translator disregards such elements.

 See related topics

 Go to procedure


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WG2 to WK4 format


Details: Copy and Move commands

/Copy and /Move command translation

The 1-2-3 and Freelance Graphics File Translator translates all /Move commands. It translates all /Copy commands except those involving collections (discontiguous ranges) or copy options.

In 1-2-3 for OS/2, you can copy ranges and collections. In 1-2-3 for Windows, you can copy only ranges. To copy a collection, you must  select a single range.

In 1-2-3 for OS/2, you can specify various attributes of the cell or range you want to copy. In 1-2-3 for Windows, you cannot copy cell attributes without also copying cell contents. However, you can use the Fast Format SmartIcon to apply the style of the current range to other ranges.

For a complete list of the 1-2-3 for OS/2 /Copy and /Move commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Custom menus

Translating custom menu macros

In both 1-2-3 for Windows and 1-2-3 for OS/2, you can create your own menus with the {MENU-CREATE} command. In 1-2-3 for OS/2, you can create menus that have more than two levels. However, in 1-2-3 for Windows, you cannot create menus with more than two levels. The 1-2-3 and Freelance Graphics File Translator will translate menus with more than two levels, but only the first level menu will function.

 See related topics

 Go to procedure


Related topics :

Overview: Macro command and keystroke translation

Using the MACTRANS.WK4 worksheet file


Details: Data commands

/Data command translation

/Data commands in 1-2-3 for OS/2 create, sort, and manipulate data in 1-2-3 worksheets and external databases. 1-2-3 for Windows commands in the Range Tools Database menu or in the 1-2-3 Classic menu /Data commands perform similar operations.

The 1-2-3 and Freelance Graphics File Translator completely translates most 1-2-3 for OS/2 /Data commands. Some /Data Fill options are not available in 1-2-3 for Windows. The Translator does not translate macros that contain unavailable options. Commands that manipulate databases (/Data Query and /Data External) are translated to 1-2-3 Classic menu commands.

The following table lists some additonal /Data commands that theTranslator cannot directly translate and describes commands you can use in 1-2-3 for Windows to achieve similar effects.

.WG2 command	What it does	.WK4 substitute
/Data Fill	If the fill series is omitted, 1-2-3 for OS/2 uses the most recently used series.	In 1-2-3 for Windows, the default series is always "Linear." Edit the macro and change the units.
/Data Fill	In 1-2-3 for OS/2, you can perform a data fill on a range or a collection.	In 1-2-3 for Windows, you can only perform a data fill on a range.
/Data Parse	Divides a single column of long labels into multiple columns and assigns formats to each column.	Range Parse works similarly to Data Parse. However, when you open a text file in 1-2-3 for Windows, it parses the file automatically, eliminating the need to parse using a macro.
For a complete list of the 1-2-3 for OS/2 /Data commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: DDE macros

DDE macro translation

The 1-2-3 and Freelance Graphics File Translator translates 1-2-3 for OS/2 macros that use DDE (Dynamic Data Exchange) to 1-2-3 for Windows macros. However, because the data paths and applications available in the Windows environment are likely to differ substantially from the OS/2 environment, the translated macros may not work correctly.

You should not run any translated DDE macros until you have verified all linked applications and data.

For example, suppose a 1-2-3 for OS/2 macro calls for Lotus Word Pro. The 1-2-3 for OS/2 macro could call either the Windows or the OS/2 version of Word Pro. Once translated into 1-2-3 for Windows, however, the macro will only be able to call the Windows version of Word Pro. To make the macro work correctly, you would have to refer specifically to the Windows version of Word Pro.

Similarly, a 1-2-3 for OS/2 macro might reference an OS/2 spreadsheet with a WG2 extension. The translated macro would be unable to retrieve the .WG2 worksheet file. To make the macro work correctly, you would have to translate the referenced worksheet file and change the extension of the reference from .WG2 to .WK4.

 See related topics

 Go to procedure


Related topics :

Overview: Macro command and keystroke translation

Using the MACTRANS.WK4 worksheet file


Details: Dialog box macros

Translating {DIALOG-CALL} commands

In both 1-2-3 for OS/2 and 1-2-3 for Windows you can create your own dialog boxes. In 1-2-3 for OS/2, you use the {DIALOG-CALL} macro command to display a dialog box, while in 1-2-3 for Windows you use the {DIALOG} macro command.

Both commands require that you specify a data range as a parameter to describe the dialog box. However, the data range required by the 1-2-3 for Windows {DIALOG} command is larger than the corresponding range in the 1-2-3 for OS/2 command.

To avoid overwriting data, the Translator inserts a new worksheet at the end of the file and places the data range for the translated macro in this worksheet. If a worksheet file has more than one {DIALOG-CALL} macro command, the Translator uses the same new worksheet for the additional data ranges.

 See related topics

 Go to procedure


Related topics :

Overview: Macro command and keystroke translation

Using the MACTRANS.WK4 worksheet file


Documenting macros

To document a macro, insert comments in adjacent cells that explain what each line of the macro does and insert comments above subroutines that explain the overall purpose and design of the subroutine.

Documenting what each section of a macro does before translation makes it easier for you to understand the translated macros, should it be necessary to modify them.


Dynamic macros

Dynamic macros change during execution, usually as the result of evaluating a string formula.


Details: Dynamic macros

Most dynamic macros can be translated. However, they may require additional editing so that they work as expected. The 1-2-3 and Freelance Graphics File Translator does not attempt to evaluate the run-time state of a 1-2-3 for OS/2 macro. If a portion of a macro depends on evaluating the contents of a cell or formula or relies on spreadsheet or graph elements that are not defined within the macro itself (such as a graph type selected before the macro is run), the Translator will not attempt to translate this part of the macro or the macro may not run correctly without manual editing.

Tip	Sometimes you can create a more efficient or easier to understand 1-2-3 for Windows macro by using 1-2-3 for Windows macro commands instead of translating 1-2-3 for OS/2 dynamic macros.

Dynamic macro

The following 1-2-3 for OS/2 macro opens a file whose name (test1) is specified in the range named FILENAME:

Label	Displays as	Cell contents
\a	/fotest1~	+"/fo"&FILENAME&"~"
The 1-2-3 and Freelance Graphics File Translator translates this macro to the same keystroke sequences in 1-2-3 for Windows. When the macro runs, it uses the 1-2-3 Classic menu. However, due to differences between 1-2-3 for OS/2 and 1-2-3 Release 3.x for DOS, the macro cannot open the specified file. The translated macro requires an additional tilde (~) to work correctly:

Label	Displays as	Cell contents
\a	/fo~test1~	+"/fo~"&FILENAME&"~"
An alternative way to create a functionally equivalent macro takes advantage of a 1-2-3 for Windows macro command that is not available in 1-2-3 for OS/2. The following macro, which uses the {FILE-OPEN} command instead of dynamic macro techniques, is easier to understand than the translated 1-2-3 for OS/2 macro. There is no difference between the cell contents and the way they are displayed.

Label	Displays as	Cell contents
\a	{file-open FILENAME}	{file-open FILENAME}
You can also use the Translator to create this macro. For example, you could edit the 1-2-3 for OS/2 file and convert the dynamic macro +"/fo"&FILENAME&"~" to its displayed value, /fotest1~. The Translator translates the converted dynamic macro as {file-open test1}. After macro translation, you can edit the macro in the 1-2-3 for Windows file and manually change test1 to FILENAME.

Note	For the translated macro to work, the specified file must also be a 1-2-3 for Windows file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Example: Translating macro commands with different arguments

The commands to display a message in 1-2-3 for OS/2 and in 1-2-3 for Windows have a somewhat different structure. For example, the 1-2-3 for OS/2 macro command:

     {ALERT This is an alert message. Do you want to continue,3,1}

is translated to the following 1-2-3 for Windows macro command:

     {ALERT This is an alert message. Do you want to continue;2;"stop"}

The following tables show the {ALERT} macro command syntax and the mapping that the 1-2-3 and Freelance Graphics File Translator uses when it translates a 1-2-3 for OS/2 {ALERT} macro to a 1-2-3 for Windows {ALERT} macro.

{ALERT} macro command syntax

1-2-3 for OS/2	1-2-3 for Windows
{ALERT message,[type],[icon]}	{ALERT message;[button];[icon]}
type=Button type (1=OK, 2=OK and Cancel, 3=Yes and No)	button=Button type (1=OK, 2=OK and Cancel)
icon=display icon (1=NO, 2=Explanation point, 3=Question mark, 4=Information)	icon=display icon ("note," "caution," "stop")
{ALERT} macro command parameter mapping

The Translator maps the 1-2-3 for OS/2 parameters to the following 1-2-3 for Windows parameters:

1-2-3 for OS/2	1-2-3 for Windows
type parameter	button parameter
1	1
2	2
3	2
icon parameter	icon parameter
1	stop
2	caution
3	note
4	note
 See related topics


Related topics :

Details: Partially translated macro commands

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros


Details: Editing translated 1-2-3 macros

Static macros are the most common type of macro. Static macros can contain macro commands, keystrokes, and cell addresses. They do not change as they are executed and are the easiest macros for the 1-2-3 and Freelance Graphics File Translator to translate.

The Translator translates keystroke sequences either into the equivalent 1-2-3 for Windows macro commands, if available, or to 1-2-3 Classic menu keystrokes. The Translator translates macro commands into the equivalent 1-2-3 for Windows macro commands, if available.

Some 1-2-3 for OS/2 menu commands and macro commands are not available in 1-2-3 for Windows, and others are different enough so that mechanical translation is not reliable. The Translator does not attempt to convert these cells. Instead, it creates a log file that documents the cell addresses and contents of untranslated cells and converts the commands themselves into comments in the .WK4 file. You must complete the translation manually.

Incompletely translated static macros contain one or more of the following:

•	Keystroke sequences unavailable in 1-2-3 for Windows

The Translator cannot fully translate macros that contain keystroke sequences that are not available in 1-2-3 for Windows. For example, the 1-2-3 for OS/2 keystroke sequence /WRH~ hides the currently highlighted row or rows. 1-2-3 for Windows does not have such a command, so the Translator does not attempt to translate that keystroke sequence.

•	Keystroke sequences that execute differently in 1-2-3 for Windows

The Translator cannot fully translate macros that contain keystroke sequences that execute differently in 1-2-3 for Windows. In some cases, it will not attempt translation, while in others it will make an approximate translation. In either case, you will have to manually edit your macro to ensure that it executes correctly. For example, 1-2-3 for OS/2 allows you to set certain graphical attributes before you create a target graph. In 1-2-3 for Windows, you must first create the chart and then set the attributes.

•	Macro commands unavailable in 1-2-3 for Windows

The Translator cannot fully translate macros that contain macro commands that are not available in 1-2-3 for Windows. To make 1-2-3 for OS/2 macros that use such macro commands perform approximately the same task in 1-2-3 for Windows, you must manually edit the macros. For example, 1-2-3 for OS/2 allows you to remove menu options from the system menu. 1-2-3 for Windows only allows modifications to custom menus.

•	Macro commands that execute differently in 1-2-3 for Windows

The Translator cannot fully translate macros that contain macro commands that execute differently in 1-2-3 for Windows. In some cases, it will not attempt translation, while in others it will make an approximate translation. In either case, you will have to manually edit your macro to ensure that it executes correctly. For example, in 1-2-3 for OS/2, macro execution after an {ALERT} message depends on what the user selected. In 1-2-3 for Windows, macro execution is unaffected by the {ALERT} command.

•	Macro commands that use different arguments in 1-2-3 for Windows

The Translator cannot fully translate macros that contain macro commands with different arguments or macro commands with arguments of different types than those available in the corresponding macro commands in 1-2-3 for Windows. For example, both 1-2-3 for OS/2 and 1-2-3 for Windows contain macro commands for modifying the choices in the menu bar and for displaying a message to the user, but the arguments to the macro command are of different types. When it can, the Translator will make an approximate translation. However, you may have to manually edit your macro to ensure that it executes correctly.

 See related topics

 Go to procedure


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WG2 to WK4 format

Details: Dynamic macros

Example: Translating Graph Tool macros

Example: Translating macro commands with different arguments

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Replacing all or part of a translated macro

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Editing translated 1-2-3 macros

The 1-2-3 and Freelance Graphics File Translator translates most 1-2-3 for OS/2 macros easily.

Macros that the Translator cannot translate completely usually contain menu commands, global worksheet defaults, or macro commands for which there is no direct equivalent in 1-2-3 for Windows release 5. Dynamic macros may also be incompletely translated.

You must manually edit macros that the Translator cannot fully translate before they will run correctly in 1-2-3 for Windows.

Note	For a complete listing of 1-2-3 for Windows release 5 macro commands, see the 1-2-3 for Windows Macro Help file (123WMAC.HLP).

To edit a translated macro

1.	Open the log file in a text editor and display or print it. You can use the log file as a reference while you are editing the partially translated macro.

2.	Open the translated worksheet file in 1-2-3 for Windows.

3.	Move the cell pointer to the first cell that was not fully translated.

4.	Temporarily insert a {BREAK} command in the cell immediately below the untranslated cell.

5.	Edit the cell. As required, delete the original cell contents and replace them with 1-2-3 for Windows menu commands, macro commands, or 1-2-3 Classic menu commands that perform approximately the same functions as the original 1-2-3 for OS/2 commands.

6.	Save the changes you have made to this cell.

7.	(Optional) Save the worksheet file.

8.	Run the macro to test it up to the cell you have just edited.

9.	When the macro runs correctly up to the point you have edited, remove the {BREAK} command.

10.	Move the cell pointer to the next cell in this macro that is indicated in the log file, and repeat steps 3 - 9 until you have edited, saved, and tested all your changes to this macro.

11.	(Optional) Make any necessary changes to previous or later cells to accommodate the changes you make to edited cells.

When you are satisfied that the translated macro works correctly, repeat the above process for any other incompletely translated macros in the file.

Tip	In some cases it may be easier to rewrite all or part of an incompletely translated macro in 1-2-3 for Windows rather than editing the untranslated cells one-by-one.

 See related topics

 See details


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WG2 to WK4 format

Details: Dynamic macros

Example: Translating Graph Tool macros

Example: Translating macro commands with different arguments

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Replacing all or part of a translated macro

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Edit commands

/Edit command translation

/Edit commands in 1-2-3 for OS/2 rearrange data and manage links. The Edit commands in 1-2-3 for Windows perform similar functions.

The 1-2-3 and Freelance Graphics File Translator translates most 1-2-3 for OS/2 /Edit commands. However, because of differences between the way the two products and operating systems handle links between files and applications, some /Edit commands are not translatable.

For example, /Edit Link commands in 1-2-3 for OS/2 set up and maintain dynamic links among worksheet files and files created with other tools. To create the same effect in 1-2-3 for Windows, use the Edit Link menu to create new DDE links.

For a complete list of the 1-2-3 for OS/2 /Edit commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: File commands

/File command translation

1-2-3 for OS/2 /File commands organize and maintain worksheet files. They also allow you to move data between files and to print files.

The 1-2-3 and Freelance Graphics File Translator translates most 1-2-3 for OS/2 /File commands. Commands that save multiple files, modify file links, move data between files, and manage desktop files may not be translated.

The following table lists some of the /File commands that the Translator cannot directly translate and suggests ways to achieve the same effect in a 1-2-3 for Windows macro. For a complete list of the 1-2-3 for OS/2 /File commands and their translations, see the MACTRANS.WK4 worksheet file.

.WG2 command	What it does	.WK4 substitute
/File New Tool Name and Template Name	Specifies which tool (Worksheet or Graph) to use when creating a new file and a template file to base the new file on.	To create a graph, you must first create a worksheet file and then create a graph within the worksheet. 1-2-3 for Windows uses SmartMasters instead of templates. To create new 1-2-3 for Windows files based on a 1-2-3 for OS/2 template, translate the template to a .WK4 file, open that file in 1-2-3 for Windows, and save it as a SmartMaster. You can then create new files based on the new SmartMaster.
/File Save File by File	Cycles through all open files, prompting to save each one	Either save all files by using      {FILE-SAVE-ALL} or do not save any files until the termination of the session. At the end of the session, 1-2-3 for Windows will prompt you to save unsaved files.
 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Graph commands

/Graph command translation

/Graph commands in 1-2-3 for OS/2 create and display graphs based on worksheet data.

Although 1-2-3 for Windows commands perform similar functions, creating graphs in 1-2-3 for OS/2 is significantly different than creating graphs (called charts) in 1-2-3 for Windows.

In 1-2-3 for OS/2, the Graph Tool has its own menu structure, is displayed in a window which is independent of the spreadsheet window, and creates a file which can be saved separately from the worksheet file. In 1-2-3 for Windows, a chart is part of the worksheet file and is displayed in the spreadsheet. In addition, in 1-2-3 for OS/2, by default, data is graphed by row. 1-2-3 for Windows determines the orientation of the graph based on the number of rows and columns in the range to be graphed.

Because of these differences, macros that create even simple graphs are likely to require editing once they have been translated to 1-2-3 for Windows.

Tip	1-2-3 for Windows has more charting options than 1-2-3 for OS/2, and you can often create better-looking charts with a native 1-2-3 for Windows macro than you can from a translated 1-2-3 for OS/2 macro.

Graph Tool commands that are not translated

The primary untranslatable Graph Tool commands include commands that:

•	Create overlapping bar graphs (/Type Overlapped Bar after /Graph View)

•	Save a graph to a file (/File Save after /Graph View)

•	Create, modify, or save named graph settings (/Graph Name)

•	Modify settings for axis position and legend text position (/Settings Position after /Graph View)

•	Reset all the current graph settings (/Graph Reset)

•	Perform clipboard operations on graphs (Copy, Cut, Paste)

•	Create graph links (/Edit Link, /Edit Paste Link)

•	Modify settings for arrowheads (/Settings Arrow Heads after /Graph View)

For a complete list of the 1-2-3 for OS/2 Graph Tool commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Example: Translating Graph Tool macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Replacing all or part of a translated macro

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: How the 1-2-3 and Freelance Graphics File Translator translates macros

How the Translator translates 1-2-3 for OS/2 macros

Understanding how the 1-2-3 and Freelance Graphics File Translator translates1-2-3 for OS/2 macros can help you achieve better macro translations.

The Translator operates on the macros as static text and does not evaluate formulas.

When you run a macro, 1-2-3 is aware of everything in its environment:  the contents of each cell, the recalculation status, the current menu, and so on. The Translator, on the other hand, works strictly from macro cell contents. It may not accurately translate macros which depend on formulas that are evaluated at runtime, menu choices made from anything other than the Worksheet menu, or cell contents that are intended to be part of a macro but that are located in other parts of the worksheet file.

When you begin translation, the Translator scans the worksheet file for typical ways to invoke a macro:  a / or {MENU} command, or a macro command. When it  finds a macro, it then continues to translate until it encounters a blank line, indicating the end of the current macro. The Translator picks up translation again when it finds another indicator of a macro command.

If you review your 1-2-3 for OS/2 macros and see that they contain macro or keystroke commands that the Translator will not be able to fully translate, consider making a copy of the worksheet file and editing it so the Translator will do a more complete translation.

For a complete list of the 1-2-3 for OS/2 commands and their translations, see the MACTRANS.WK4 worksheet file.

When the Translator inserts a new sheet in the worksheet file

There are two circumstances in which the Translator inserts a new sheet in order to completely translate a macro. They are:

•	The macro cell contains a dialog description range.

The dialog description range in 1-2-3 for Windows is larger than the dialog description range in 1-2-3 for OS/2. The Translator inserts a new sheet and puts the new dialog description range in the new sheet.

•	The 1-2-3 for OS/2 macro cell would be translated to a 1-2-3 for Windows macro cell that is greater than 511 characters in length.

The Translator creates a subroutine that contains the translated macro cell and adds a new sheet to the file. This subroutine is added to the new sheet.

If the Translator inserts a new sheet, it creates a message in the log file that states that a new sheet has been added.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Identifying macros that are not fully translated

If the 1-2-3 and Freelance Graphics File Translator cannot fully translate one or more macros in a file, it displays a warning dialog box and creates a log file in the Destination Directory for each file that was not completely translated. This log file contains a list of each cell address whose contents could not be fully translated, along with the original contents of that cell.

If the Translator creates a log file:

1.	Open the log file in a text editor and display or print it. You can use the log file as a reference while you are working with the partially translated macros.

2.	Open the corresponding worksheet file in 1-2-3 for Windows.

3.	Move the cell pointer to the first cell address indicated in the log file. This cell will contain the characters {--}.

4.	(Optional) Edit and debug the translated macro(s).

5.	Repeat the above steps for each worksheet file that contains macros which the Translator did not fully translate.

Note	The Translator creates a log file only if you have selected Translate Macros and the Translator could not completely translate one or more macros.

 See related topics

 See details


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WG2 to WK4 format

Editing translated 1-2-3 macros

Overview: Translating 1-2-3 for OS/2 macros

Replacing all or part of a translated macro

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Identifying macros that are not fully translated

If the 1-2-3 and Freelance Graphics File Translator encounters one or more macros that cannot be fully translated, it creates a log file in the Destination Directory with the same name as the translated file and the extension .LOG. For example, if the file you are translating is named BUDGET.WG2 and the Translator encounters problems translating macros in this file, it creates the files BUDGET.WK4 and BUDGET.LOG in the Destination Directory. If the Translator does not encounter any macro translation problems or you have not selected Translate Macros, the Translator creates only BUDGET.WK4.

Log file contents

The log file contains an introductory paragraph that briefly explains why problems may have occurred during translation. The log file then lists one or more cell addresses in the Destination File and displays the cell contents which the Translator could not convert. For example:

[B:B5]  /WRH~

[B:B10] /UUPA~

Translated worksheet file contents

The translated worksheet file contains a macro comment consisting of a double hyphen enclosed in curly braces:  {--}

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros


Overview: Translating 1-2-3 for OS/2 macros

The 1-2-3 and Freelance Graphics File Translator can translate macros in 1-2-3 for OS/2 release 2.x files into 1-2-3 for Windows release 5 format. The Translator stores the translated macros with the worksheet file's data in a new .WK4 worksheet file.

Macros that cannot be completely translated

Not all 1-2-3 for OS/2 macros can be fully translated into 1-2-3 for Windows macros. Macros that cannot be completely translated use features in 1-2-3 for OS/2 for which there is no direct equivalent in 1-2-3 for Windows. A macro may not be completely translated if:

•	A 1-2-3 for OS/2 keystroke sequence is unavailable in 1-2-3 for Windows

•	A 1-2-3 for OS/2 keystroke sequence is executed differently in 1-2-3 for Windows

•	A 1-2-3 for OS/2 macro command is unavailable in 1-2-3 for Windows

•	A 1-2-3 for OS/2 macro command is executed differently in 1-2-3 for Windows

•	Macro command arguments do not match between 1-2-3 for OS/2 and 1-2-3 for Windows

When the Translator fails to fully translate a macro, it creates a log file that identifies untranslated or partially translated cells. You must then manually modify the translated macro before it will execute properly. Alternatively, you can recreate the macro in 1-2-3 for Windows. This latter approach often allows you to take advantage of features in 1-2-3 for Windows that are not available in 1-2-3 for OS/2.

 See related topics

 Go to procedure


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WG2 to WK4 format

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Preparing 1-2-3 for OS/2 macros for translation

Replacing all or part of a translated macro

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Macro commands that cannot be translated

The following macro commands are not translated:

Macro command	What it does in .WG2 file
{DIALOG-UPDATE}	Updates dialog box items.
{GRAPHOFF}	Hides a Graph window.
{GRAPHON}	Opens and optionally displays a Graph window.
{LIBRARY-ATTACH}	Attaches an application that contains custom @functions, macro commands, or both.
{LIBRARY-DETACH}	Detaches an application that contains custom @functions, macro commands, or both.
{MENU-ITEM-DELETE}	Removes a menu item from the standard 1-2-3 menu or a customized menu.
{MENU-ITEM-DISABLE}	Disables a menu item on the standard 1-2-3 menu or a customized menu.
{MENU-ITEM-ENABLE}	Reactivates a menu item disabled either by {MENU-ITEM-DISABLE} or by entering @NA in a menu description range.
{MENU-UPDATE}	Updates the appearance of a customized menu.
{WAITDIALOG}	Suspends macro execution to let the user complete a dialog box.
REXX integration commands	Run REXX programs from 1-2-3.
 See related topics

 Go to procedure


Related topics :

Details: Partially translated macro commands

Details: Translated macro commands

Details: Translating macros that use REXX integration or load DLLs or libraries

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


MACTRANS.WK4

The MACTRANS.WK4 worksheet file is a 1-2-3 for Windows spreadsheet that lists 1-2-3 for OS/2 menu commands, keystrokes, and macro commands and their 1-2-3 for Windows equivalents. The spreadsheet also lists other correspondences between the two products, such as chart types, fonts, and colors. MACTRANS.WK4 is installed in the Translator directory.


Details: Partially translated macro commands

Some macro commands work differently in 1-2-3 for OS/2 and 1-2-3 for Windows. The Translator attempts to translate these as faithfully as possible. The following table lists these commands and describes how the translated result differs from the original.

Macro command	.WG2 macro action	.WK4 macro action
{ALERT}	Displays a message box and presents command buttons that let a user specify an action. Execution continues depending on what the user selects.	Displays a message box and waits for the user to select OK or Cancel. 1-2-3 continues with the next instruction immediately following the {ALERT} regardless of the user's selection.
{DIALOG-CALL}	Displays a custom dialog box.	Replaced with {DIALOG}. Data range that describes the dialog box is inserted in a new worksheet. The edit argument is not translated.
{FRAMEOFF} and {FRAMEON}	Turns the display of the worksheet frame off or on.	{FRAMEOFF} and {FRAMEON} have no effect in 1-2-3 Release 4 or later.
{MENU-APPEND}	Appends custom menu items to the 1-2-3 main menu.	Replaced with {MENU-INSERT}. The menu-name argument is not translated.
{SYSTEM}	Executes the specified OS/2 command.	Executes the specified DOS command.
{TONE}	Sounds a tone of a specified frequency for a specified duration.	Translated to {BEEP}, which emits a single tone.
{WSIZE} and {WMOVE}	Size and move the active window using inches or millimeters as the unit of measurement.	Size and move the active window using pixels as the unit of measurement.
DDE macro commands	Manipulate links between 1-2-3 and other applications.	Source files and applications in the OS/2 environment may not exist in the Windows environment.
 See related topics

 Go to procedure


Related topics :

Details: Custom menus

Details: DDE macros

Details: Dialog box macros

Editing translated 1-2-3 macros

Example: Translating macro commands with different arguments

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Preparing 1-2-3 for OS/2 macros for translation

You can translate many macros in 1-2-3 for OS/2 files without making any changes to the files or macros. However, there are some changes you must make, and others that will make working with the translated macros easier.

1.	Unprotect password-protected files. The 1-2-3 and Freelance Graphics File Translator does not translate macros in password-protected files.

2.	If you are translating complex macros, document  the macros before you translate them. If someone else wrote the macros, have that person document them.

3.	Look at the list of macro commands, keystroke equivalents, and menu commands that are not translated or are not completely translated and consider rewriting the 1-2-3 for OS/2 macro so that it uses commands that are completely translated instead.

4.	Consider converting dynamic macros to static macros.

 See related topics


Related topics :

Details: How the 1-2-3 and Freelance Graphics File Translator translates macros

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Print commands

/Print and /File Print command translation

/Print and /File Print commands in 1-2-3 for OS/2 print data to files on disk or to a printer. They also set print options that determine how a printed page will look.

Although 1-2-3 for Windows commands perform similar functions, printing in 1-2-3 for OS/2 is significantly different than printing in 1-2-3 for Windows. Macros that create complex reports or that include graphs are likely to require editing once they have been translated to 1-2-3 for Windows.

The primary untranslatable /Print or /File Print commands include commands that:

•	Print to a file (/Print File, /Print Encoded, /File Print Destination)

•	Map colors to black and white (/File Print Color Map)

•	Control printing of borders, colors, and shading

•	Print multiple ranges

•	Printi multiple-line headers or footers

The following table lists some additional printing commands that the Translator cannot directly translate and suggests ways to achieve a similar effect in a 1-2-3 for Windows macro.

Note	Each of these commands in the table below has an equivalent command in the /File Print Print Worksheet or the /File Print menu.

.WG2 command	What it does	.WK4 substitute
/Print Printer Options Density	Specifies draft resolution (ASCII text printout) or final resolution	Printing through the Classic menu produces an ASCII text printout.
/Print Printer Format output, As displayed or Formulas	Specifies whether to print the worksheet data or the formulas that underlie the data, and other cell information	Use the Classic menu in 1-2-3 for Windows to create an ASCII printout of the formulas in a worksheet file.
/Print Printer Line or Page	Insert a line, insert a page	Available in 1-2-3 for Windows only through the Classic menu when creating an ASCII printout.
/Print Printer Go	Sends the current selection to the preview window or print queue. Note that printing does not occur until Quit is selected. This allows multiple ranges to be sent to the preview window/printer queue before printing begins.	Not available in 1-2-3 for Windows. Preview and print each range separately.
/Print Printer Display Options, Side frame and Top frame	Lets you print the Side frame, the Top frame, or both	In 1-2-3 for Windows there is no distinction between the top and side frames. You either print both frames or no frames.
For a complete list of the 1-2-3 for OS/2 /Print and /File Print commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Range commands

/Range command translation

/Range commands in 1-2-3 for OS/2 change the display and organization of data in ranges and collections in worksheet files.

The 1-2-3 and Freelance Graphics File Translator translates most 1-2-3 for OS/2 /Range commands. Primary exceptions include user-created formats (/Range Format User) and some of the /Range Attributes, /Range Name Labels, and /Range Label commands. Equivalents to the 1-2-3 for OS/2 /Range commands can be found in the 1-2-3 for Windows Style, Edit, and Range menus. 1-2-3 for Windows commands do not support collections (non-contiguous ranges).

The following table lists some of the /Range commands that the Translator cannot completely translate and describes their effect on a translated macro.

.WG2 command	What it does	.WK4 substitute
/Range Attributes Font	Sets the screen and printer fonts	The Translator converts standard fonts available in both 1-2-3 for Windows and 1-2-3 for OS/2, such as Helvetica, Times Roman, and Courier. It converts other fonts into available fonts that most closely match the original font sizes.
/Range Attributes Color	Sets the color for data and cell background	Colors may not be identical when the files are converted. Since 1-2-3 for Windows supports 256 colors and 1-2-3 for OS/2 supports 16, the Translator adjusts the colors to most closely match the original colors.
For a complete list of the 1-2-3 for OS/2 /Range commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Details: Worksheet commands

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Replacing all or part of a translated macro

In some cases, it is easier to rewrite all or part of an incompletely translated 1-2-3 for OS/2 macro than it is to edit the untranslated cells one-by-one. You can create a macro by recording macro commands in the 1-2-3 for Windows Transcript window.

1.	Open the .WG2 file that has the original macro in 1-2-3 for OS/2 and print the original macro to use as a guide.

2.	Start 1-2-3 for Windows and open the .WK4 file that contains the incompletely translated macro.

3.	Choose Tools - Macro - Record to start the 1-2-3 for Windows macro recorder.

4.	Perform the tasks that you want the new macro to perform.

5.	Choose Tools - Macro - Stop Recording to stop the macro recorder.

6.	Choose Tools - Macro - Show Transcript to display the Transcript window. The Transcript window contains the macro commands and keystrokes that you just recorded.

7.	Select the contents of the Transcript window and copy them.

8.	Paste the contents into a new area of the worksheet file.

9.	Use the information you just pasted into this new area as the starting point either for a new 1-2-3 for Windows macro or as a replacement for an untranslated section of the incompletely translated macro.

Note	For more information about recording or creating macros in 1-2-3 for Windows, see the 1-2-3 for Windows online documentation.

 See related topics


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Translating 1-2-3 for OS/2 macros


Selecting files

The number of file names you can select at one time depends on the length of the file name. You can select up to approximately 200 file names at one time.


Static macros

Static macros can contain macro commands, keystrokes, and cell addresses. They do not change as they are executed.


Details: Translated macro commands

The 1-2-3 and Freelance Graphics File Translator translates the following macro commands. Commands marked with an asterisk (*) may perform somewhat differently in 1-2-3 for Windows than they do in 1-2-3 for OS/2. See the MACTRANS.WK4 worksheet file in the Translator directory for detailed descriptions of translated commands.

Translatable 1-2-3 for OS/2 macro commands

{?}	{FILESIZE}	{PANELOFF}
*{ALERT}	{FOR}	{PANELON}
{APPENDBELOW}	{FORBREAK}	{PUT}
{APPENDRIGHT}	{FORM}	{QUIT}
{BEEP}	{FORMBREAK}	{READ}
{BLANK}	*{FRAMEOFF}	{READLN}
{BRANCH}	*{FRAMEON}	{RECALC}
{BREAKOFF}	{GET}	{RECALCCOL}
{BREAKON}	{GETLABEL}	{RESTART}
{CLOSE}	{GETNUMBER}	{RETURN}
{CONTENTS}	{GETPOS}	{SETPOS}
*{DDE-ADVISE}	{IF}	*{SYSTEM}
*{DDE-CLOSE}	{INDICATE}	*{TONE}
*{DDE-EXECUTE}	{LAUNCH}	{WACTIVATE}
*{DDE-OPEN}	{LET}	{WAIT}
*{DDE-POKE}	{LOOK}	{WINDOWSOFF}
*{DDE-REQUEST}	*{MENU-APPEND}	{WINDOWSON}
*{DDE-TABLE}	{MENUBRANCH}	*{WMOVE}
*{DDE-UNADVISE}	{MENUCALL}	{WRITE}
*{DDE-USE}	{MENU-CREATE}	{WRITELN}
{DEFINE}	{MENU-RESET}	*{WSIZE}
*{DIALOG-CALL}	{ONERROR}
{DISPATCH}	{OPEN}
 See related topics

 Go to procedure


Related topics :

Details: Macro commands that cannot be translated

Details: Partially translated macro commands

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Overview: Macro command and keystroke translation

The 1-2-3 and Freelance Graphics File Translator translates many 1-2-3 for OS/2 macros completely. However, because of fundamental differences in the way 1-2-3 for OS/2 and 1-2-3 for Windows perform certain operations, some 1-2-3 for OS/2 macros cannot be translated and others are translated only partially. You will need to edit, and possibly to redesign, 1-2-3 for OS/2 macros that use untranslatable or partially translatable commands to make them work in 1-2-3 for Windows.

The following Help topics describe the types of macro commands and keystrokes that the Translator cannot fully translate and give some suggestions for modifying the translated macros.

For a complete listing of 1-2-3 for OS/2 macro and menu commands and how the Translator handles them, use 1-2-3 for Windows to open the MACTRANS.WK4 worksheet file in the Translator directory.

Menu commands

File commands

Edit commands

Worksheet commands

Range commands

Print commands

Graph commands

Data commands

Utility commands

Copy and Move commands

Macro commands

Translated macro commands

Untranslated macro commands

Partially translated macro commands

Interactive macros

Custom menus

Dialog box macros

Other macros

DDE macros

Dynamic macros

 See related topics


Related topics :

Details: How the 1-2-3 and Freelance Graphics File Translator translates macros

Editing translated 1-2-3 macros

Replacing all or part of a translated macro

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Translating 1-2-3 for OS/2 macros

When you translate a 1-2-3 for OS/2 file, you can also translate the macros in the file.

1.	(Optional) Prepare the 1-2-3 for OS/2 files for translation.

2.	Double-click the Translator icon.

3.	Under Translation Type, select "1-2-3 OS/2 (.wg2) to 1-2-3 Windows (.wk4)."

4.	(Optional) Under Source Directory, click Browse to specify the drive and directory for the existing 1-2-3 for OS/2 file(s) and click OK.

5.	Under File Name(s), select the file(s) you want to translate.

6.	(Optional) Under Destination Directory, click Browse to specify the drive and directory where the translated file(s) should be stored and click OK.

7.	Select Translate Macros.

8.	Click Translate.

Any 1-2-3 for OS/2 macros in the selected .WG2 files are translated into 1-2-3 Release 5 for Windows macros in the corresponding .WK4 files.

9.	Click Exit when the Translator finishes converting the file(s).

10.	(Optional) If you receive a message from the Translator, open the log file(s) in the Destination Directory to determine what macro commands or keystrokes could not be translated.

 See related topics


Related topics :

Details: Converting a 1-2-3 file

Details: Converting from WG2 to WK4 format

Identifying macros that are not fully translated

Overview: Macro command and keystroke translation

Overview: Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Example: Translating Graph Tool macros

The following examples illustrate some of the differences between the way 1-2-3 for OS/2 and 1-2-3 for Windows handle graphing, and give suggestions for changing translated graphing macros.

Macros that do not assign worksheet ranges to graphs

Because a 1-2-3 for OS/2 graph is created in its own window, separate from the spreadsheet, a macro that creates a graph does not require a spreadsheet range in which to place the graph. An equivalent 1-2-3 for Windows macro requires a range in which to place a graph. When the Translator translates a 1-2-3 for OS/2 macro that creates a graph, it uses the data range for the chart as the range in which to place the chart. This obscures the data.

To correct the problem, either edit the macro to insert a range for the graph or manually move the graph after the macro has been run.

Similarly, if a 1-2-3 for OS/2 macro creates more than one graph without specifying a spreadsheet location for the graph, the translated macro will place all the 1-2-3 for Windows charts in the same location, with only the latest chart visible. All the charts will have resizing and moving handles on them.

If a 1-2-3 for OS/2 macro does not specify a range in which to place the graph and does not specify a data range, the Translator will place the 1-2-3 for Windows chart in the current cell. This chart must then be resized and moved.

Macros that set graphical attributes before a target graph

1-2-3 for OS/2 allows you to set certain graphical attributes before you create a target graph. In 1-2-3 for Windows you must have a target chart before you set the attributes. The Translator will translate each line of the 1-2-3 for OS/2 macro, but the macro will have a run-time error. You must place the command for creating the chart before any of chart attributes are set in order for the macro sequence to run correctly.

For example, the following 1-2-3 for OS/2 macro selects the range myRange for a graph, sets the graph type to Stacked Bar Graph, and the Title to MyTitle.

Original macro:

/RGMyRange{TAB 2}R~	;Select Range, myRange
/GTS~	;Select a Stacked Bar Graph
/GOTFMyTitle~	;Set First Title to 'MyTitle'
/GV	;View the Graph
Translated macro:

{EDIT-GOTO MyRange}	;Select Range, myRange
{CHART-TYPE "BAR";1}	;Select a Stacked Bar Graph
{CHART-TITLE "MyTitle"}	;Set First Title to 'MyTitle'
{CHART-NEW @INFO("selection")}	;View the Graph
When run, the 1-2-3 for Windows macro terminates with an error. To make the macro work correctly, you must revise it so that viewing the graph occurs before selecting the chart type or the title, as follows:

{EDIT-GOTO MyRange}	;Select Range, myRange
{CHART-NEW @INFO("selection")}	;View the Graph
{CHART-TYPE "BAR";1}	;Select a Stacked Bar Graph
{CHART-TITLE "MyTitle"}	;Set First Title to 'MyTitle'
Macros that do not specify the graph orientation

By default, data is graphed by row in 1-2-3 for OS/2, while in 1-2-3 for Windows the orientation of the graph is based on the number of rows and columns in the data range to be graphed. If you have not specified the graph orientation in your 1-2-3 for OS/2 macro, you may need to change the orientation of the graph in the translated macro by using the {CHART-ASSIGN-RANGE} command. For example:

{CHART-ASSIGN-RANGE Myrange; "By-Row"}	;Assigns data ranges by row
{CHART-ASSIGN-RANGE Myrange; "By-Column"}	;Assigns data ranges by column
 See related topics


Related topics :

Details: Graph commands

Replacing all or part of a translated macro


Details: Translating macros that use REXX integration or load DLLs or libraries

1-2-3 for OS/2 macros that use REXX integration or load DLLs or libraries cannot be translated into 1-2-3 for Windows macros because Windows does not support these features.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros


Using the MACTRANS.WK4 worksheet file

The MACTRANS.WK4 worksheet file is a 1-2-3 for Windows spreadsheet that lists 1-2-3 for OS/2 menu commands, keystrokes, and macro commands and their 1-2-3 for Windows equivalents. The spreadsheet also lists other correspondences between the two products, such as chart types, fonts, and colors. Use this spreadsheet before you translate macros, to get an idea of which parts of your macro can be translated successfully.

Tip	The MACTRANS.WK4 spreadsheet is easiest to view if your display is set to 800 x 600. If you have a 640 x 480 display, use the View - Zoom Out command to arrange your display.

1.	Start 1-2-3 for Windows.

2.	Open MACTRANS.WK4. MACTRANS.WK4 is installed in the Translator directory.

3.	Click the button on the Contents page of the spreadsheet that takes you to the section you want to view.

4.	When you have finished, click Contents to return to the spreadsheet's table of contents.

Note	The MACTRANS.WK4 spreadsheet does not list the translations of Solver macro commands.

 See related topics


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros


Details: Utility commands

/Utility command translation

The 1-2-3 and Freelance Graphics File Translator translates only some of the 1-2-3 for OS/2 /Utility commands. The primary exceptions are the User Settings and Note commands.

The following table illustrates a /Utility command that theTranslator cannot directly translate and describes commands you can use in 1-2-3 for Windows to achieve similar effects.

.WG2 command	What it does	.WK4 substitute
/Utility Draw Graph	Creates a graph in the draw layer of the worksheet anchored at the current cell.	The Translator translates /Utility Draw Graph as {CHART-NEW}, which has a required parameter, location, that tells 1-2-3 where to place the chart. If location is not specified, the translated macro places the chart over the chart data range. Either manually move the chart to another range after the macro runs, or edit the macro to supply a range for location.
For a complete list of the 1-2-3 for OS/2 /Utility commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file


Details: Worksheet commands

/Worksheet command translation

The 1-2-3 and Freelance Graphics File Translator translates most 1-2-3 for OS/2 /Worksheet commands.

In general, the translated commands will perform the same operations in 1-2-3 for Windows as the original commands did in 1-2-3 for OS/2. Most of the translated commands correspond to 1-2-3 for Windows View or Style commands and are implemented as {SET...} macros in 1-2-3 for Windows. Some 1-2-3 for OS/2 commands are translated to /Worksheet commands in the 1-2-3 for Windows Classic menu.

The following table lists some of the /Worksheet commands that the Translator cannot completely translate and describes their effect on a translated macro.

.WG2 command	What it does	.WK4 substitute
/Worksheet Column Absolute Set	Sets column(s) to specified width in inches/millimeters	1-2-3 for Windows can only set widths to number of characters.
/Worksheet Insert [Column Row Sheet] Partial	Inserts partial rows, columns, or worksheet(s)	1-2-3 for Windows inserts entire rows, columns, or worksheets only
For a complete list of the 1-2-3 for OS/2 /Worksheet commands and their translations, see the MACTRANS.WK4 worksheet file.

 See related topics

 Go to procedure


Related topics :

Details: Range commands

Editing translated 1-2-3 macros

Identifying macros that are not fully translated

Overview: Translating 1-2-3 for OS/2 macros

Preparing 1-2-3 for OS/2 macros for translation

Translating 1-2-3 for OS/2 macros

Using the MACTRANS.WK4 worksheet file