SurGe and Excel
 



.                                                                       

This page is intended for users of SurGe, who want to have data in an Excel worksheet. My colleague Jindirch Horacek helped me to create two Excel macros, which are part of Excel example in the file TestExcel.xls. Both macros works only if there is a selected block of data in the worksheet.

The macros have the following features:

Macro WriteASCIIData

This macro enables to write selected data into specified file in ASCII format. The macro in the example  TestExcel.xls  has assigned shortcut key Ctrl+W. The name of ASCII file should follow rules for SurGe input files (see User's manual), if the file has to be a basic input file for SurGe.

Macro RunSurGeOnData

This macro enables to write selected data into file #EXCL#.DTA (in ASCII format) and run SurGe on this file. The macro in the example  TestExcel.xls  has assigned shortcut key Ctrl+R. Remember, the selected block must contain four columns - the first with x coordinates, the second with y coordinates, the third with z coordinates and the fourth with point labels. This format of data is required as an input for SurGe (see SurGe Tutorial for an example of input file).
Important note: You should check the last command in the macro RunSurGeOnData, if there is a correct path into directory of your SurGe software installation.

Any of presented macros can be edited (see Tools / Macro / Visual Basic Editor), exported and imported into any other Excel worksheet (see File menu item in the Visual Basic Editor).


Return to main page.