| Knowledgebase Home | Contact |
| How can I specify a particular Excel worksheet to load in Scripter? | |||||||||
For example, to grid a sheet in an excel workbook, instead of using GridData, use GridData2 and specify the DataFileOptions. ********** Sub Main Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True 'Grids the data in a specific sheet in an Excel workbook and creates a grid file SurferApp.GridData2(DataFile:="c:\temp\book1.xlsx",DataFileOptions:="sheet=sheet2", _ Algorithm:=1, ShowReport:=False, OutGrid:="c:\temp\Demogrid.grd") 'Creates a cross validation report from the data in a specific sheet in an Excel workbook and saves it to a file SurferApp.CrossValidate2(DataFile:="c:\temp\book1.xlsx", DataFileOptions:="sheet=sheet2", _ Algorithm:=1, ShowReport:=False, ResultsFile:="c:\temp\CrossValidate.dat") 'Creates the contour map from the grid file Dim Doc As Object Set Doc = SurferApp.Documents.Add Dim Map As Object Set Map = Doc.Shapes.AddContourMap(GridFileName:="c:\temp\Demogrid.grd") 'Creates a post map from the sheet in the Excel workbook Set Map2 = Doc.Shapes.AddPostMap2(DataFileName:="c:\temp\book1.xlsx", DataFileOptions:="sheet=sheet2") End Sub |
| Visitor Comments |
| No visitor comments posted. Post a comment |
| Attachments |
| No attachments were found. |