请各位看下这段代码,哪个错误,谢谢了。
Dim SurferApp As New Surfer.Application
Dim PlotDoc As Surfer.IPlotDocument
Dim MapFrame As Surfer.IMapFrame
Set SurferApp = CreateObject("Surfer.Application")
'Set VBExcel = CreateObject("Excel.Application")
SurferApp.GridData DataFile:="D:\1.xls", xCol:=1, yCol:=2, zCol:=3, algorithm:=2, ShowReport:=False, OutGrid:="D:\1.Grd"
Set PlotDoc = SurferApp.Documents.Add(1)
Set MapFrame = PlotDoc.Shapes.AddContourMap("D:\1.Grd")
'PlotDoc.Export FileName:=App.Path & "\2.dxf"
PlotDoc.Export FileName:="D:\1.bmp", Options:="Width=400,Height=500"
Picture1.Picture = LoadPicture("D:\1.bmp")
特别是第五行,一直调用不了1.xls这个文件。