...
| 코드 블럭 | ||||
|---|---|---|---|---|
| ||||
public bool DownloadFile( string url, string filePath ) |
Parameters
url |
|---|
Type: String
Download 할 URL
filePath |
|---|
Type: String
download 받을 loacal 절대 경로
...
| 코드 블럭 | ||||||||
|---|---|---|---|---|---|---|---|---|
| ||||||||
'==========================================================================
' matrix server 에서 특정 보고서를 download 합니다.
'==========================================================================
Public Sub DownloadFileTest()
Dim mxmodule As Object
Set mxmodule = Application.COMAddIns.Item("iMATRIX6.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
|