서버의 파일을 local 로 download 합니다.


public bool DownloadFile(
   string url,
   string filePath
)


Parameters

url

Type: String

Download 할 URL

filePath

Type: String

download 받을 loacal 절대 경로


Returns

Type:  bool

정상일 경우 : true

오류 일경우 : false


'==========================================================================
' matrix server 에서 특정 보고서를 download 합니다.
'==========================================================================
Public Sub DownloadFileTest()
    Dim mxmodule As Object
     
    Set mxmodule = Application.COMAddIns.Item("iMATRIX.ExcelModule").Object
    
    Url = mxmodule.property.DownloadURL & "?resourceno=REPD23594AF5A8E4E5082EE1B41CDCA5DD6"
    result = mxmodule.xapi.DownloadFile(Url, "D:\download\test.mtzb")	'일반 URL파일도 가능
      
    '오류 확인
    If result = False Then
        MsgBox "download fail " & mxmodule.xapi.LastErrorMessage
    Else
        MsgBox "download success"
    End If
          
End Sub