Table Of Contents
SpreadSheet Interface
NMT to Microsoft Excel
Microsoft Excel to NMT
Usage Review
SSI TroubleShooting
SpreadSheet Interface
This chapter describes the SpreadSheet Interface (SSI) Conversion Plug-in, which translates network design information between NMT and a Microsoft Excel-compatible format. SSI requires that you use Microsoft Excel Version 6.2 or later. This chapter contains the following sections:
•
NMT to Microsoft Excel
•
Microsoft Excel to NMT
The SSI plug-in converts the .cnf file into its component tables and saves them as .dbf files; the SSI then tars (archives) the file for easy transfer to a PC or Macintosh platform. The SSI provides a PC toolkit to translate the spreadsheet files back into the .cnf file format readable by NMT. See for a schematic overview of the SSI process.
The MS Excel translation can be done from within the NMT or from the UNIX Command Line Interface (CLI).
NMT to Microsoft Excel
To write to the spread sheet interface directly from NMT, go to the FILES/EXPORT menu and select DBF Files.
Note
To write to the spread sheet interface from the UNIX CLI, use the nmt2tar and tar2nmt commands. If you are on the UNIX version, you will be prompted if you wish to have a tar file made of all the DBF files for easier transport to PC.
Note
This section is for the UNIX Command Line Version of SSI on a UNIX OS. For a PC version of NMT, use the File<Import/Export menu to read and write to DBF files. Copy the SSI Macro to the XLStart directory for the load and unload commands.
The following procedure is for the conversion of an NMT .cnf file to .dbf, a Microsoft Excel compatible format, and archiving the .dbf output so that it can be moved from a UNIX workstation to a PC. This section also explains how to unarchive the file once it is on the PC.
Step 1
To convert a .cnf file to .dbf format and archive it as a .tar file, use the following command:
nmt2tar cnf_name [parts_file]
cnf_name is the name of any .cnf file in the current directory.
parts_file is the name of the file that lists the components. You should specify a parts file only if you are using a file other than the default.
Step 2
FTP the cnf_name.tar file to a computer that has Microsoft Excel installed.
Alternatively, copy the file to a PC- or Macintosh-compatible diskette by using the mcopy command. For example, mcopy cnf_name a: copies the file cnf_name to the diskette in the A: drive of the UNIX workstation.
Note
If the destination PC has not been used for reading archived .cnf files, you should copy the following files from the NMT directory to the PC: SSIDOSKT.TAR (containing DOS .bat files for tarring and untarring the NMT SSI .dbf data files), the tar.exe program, and the Microsoft Excel macro SSI. Also, you should read the file SSI.readme.
Figure 11-1 SSI Schematic Overview
Step 3
Unarchive the file at the PC using a program like tar.exe for PCs and StuffIt Deluxe for Macintoshes.
The unarchived file consists of several files, one file for each NMT configuration table. Each file has a .dbf extension and can be opened and edited in Microsoft Excel.
Step 4
Start Microsoft Excel, and edit the data. You can read and write a multi-spreadsheet workbook by using the SSILoad and SSIUnload macros. Alternatively, you can treat each file individually.
Microsoft Excel to NMT
The following procedure is for the archiving of Microsoft Excel files so they can be easily moved from a PC to a UNIX workstation and for converting the Microsoft Excel files into NMT .cnf file format:
Step 1
To archive an Microsoft Excel file, use a program like tar.exe for PCs or StuffIt Deluxe for Macintoshes.
Note
If the destination PC has not been used for reading archived .cnf files, you should copy the following files from the NMT directory to the PC: SSIDOSKT.TAR (containing DOS .bat files for tarring and untarring the NMT SSI .dbf data files), the tar.exe program, and the Microsoft Excel macro SSI. Also, you should read the file SSI.readme.
Step 2
The archived file should have a filename with a .tar extension.
Step 3
FTP the archived file to a workstation that has a directory linked to the NMT.
Alternatively, copy the file to a PC- or Macintosh-compatible diskette. To copy from a PC or Macintosh diskette to a UNIX workstation, use the mcopy command. For example, mcopy a:\filename copies the file "filename" to the UNIX workstation directory from which the command was issued.
Step 4
To read the DBF or tar file from NMT, go to the FILE/IMPORT menu, and select DBF Files. If you are on the unix side, you will be prompted if you want to open a tar file, or read directly from a DBF file set.
To perform this same functionality in UNIX command mode, perform command 4 alt.
Step 5
To unarchive the file, enter the following command:
tar2nmt filename
filename is the name of any .tar file in the current directory.
Step 6
The unarchived file will have a .cnf extension and can be opened and edited in the NMT.
Usage Review
After creating a CNF file using NMT, CET, or TPI, use SSI tools to translate the CNF file to an excel workbook.
In the UNIX environment, do the following:
Step 1
run the command nmt2tar.
This creates both the DBF files, and a tar file containing them.
Step 2
Transfer the output tar file to you PC environment. Make sure you use binary mode.
Step 3
Untar the file using the DOS command 'tar2dir'. Start EXCEL, and select file/macroNMT_Load, and click run.
Step 4
When prompted for an input file, select any of the DBF files for your run. NMT_Load convert NMT table files in DBF format to Excel spreadsheets, where each sheet is a table and each column is a file.
Step 5
When completed, select tools/macro>t NMT_Unload, and click run. Write in same directory, or another sub directory in your PC environment. NMT_Unload converts an excel spreadsheet to NMT DBF files.
The sheets that are NMT table names will be written.
In DOS a Dos environment, do the following:
Step 1
run dir2tar to create tar file of modified outputs.
Step 2
Transfer the tar file back to UNIX environment. Make sure you use binary mode. Run tar2nmt to create the CNF file.
Note
You may create a CNF file starting in EXCEL, provided you use the same sheet names and field names that NMT expects. Only site table and site fields are required, other fields will be set to default values by SSI and NMT. Additional sheets and tables will be ignored.
The tar2nmt command will convert a tar version of these files to a NMT cnf file. The DBF columns that match NMT fields will be used. All fields not provided will be set to the NMT default value. Key fields, such as site names, are mandatory.
The file ssidoskt.tar contains bat files that can assist you in untarring and tarring the dbf files on the PC. Copy this file to the PC, and then untar it in the directory where you will be working on NMT dbf files.
All system and data files are in binary format.
Note
Enter the -h command to display online help about a command's optional parameters.
SSI TroubleShooting
The table below describes a common SSI problem and what can be done about it.
Symptom
|
Network data gets rounded incorrectly when converting from Excel to NMT''s CNF file.
|
Probable Causes
|
The SSI user enters new connections or links in Excel using the SSI macros. The user then runs NMT_Unload macro, and transfers the tarred DBF file back to Unix. The user then enters the following commands:
run tar2nmt
run nmt
and then discovers that the hub IDs and data conn types have been converted to integers.
For example, a HUB id:
4.3 -> 4
or a data connection type:
19.2 -> 19
|
Solution
|
To avoid this corruption, make sure that one of the following is true for your link connection tables:
• The first line (not the column header's but the first data line) originally came from NMT and has not been modified in Excel.
• All fields in the first line (again, first data line not field name line) with this potential corruption (data conn type, all hub IDS and Feeder IDs) have a single quote prepended to them. For example:
19.2 --> `19.2
This forces the DBF translation to treat these columns as strings, so truncation is avoided. This is only necessary in the first data line.
|