הורדת קבלות מאתר איזיקאונט (ezcount)
-
@חוקר לא.
אחרי כמה ימים.
הקבלה קיימת כבר, ואפשר להוריד אותה דרך האתר, אבל אני מחפש API שיעשה את זה.
תודה.@ארי
יש לך את הקישור לPDF שהם נותנים בעת יצירה?אם כן
אני מוריד קבלות עם הקוד הזה
זה ההצרה והפונקציהOption Compare Database Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _ szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function
וככה אני מוריד
Private Sub txtOrginalFileLink_DblClick(Cancel As Integer) Dim strPDFLink As String Dim strPDFFile As String Dim Result As Boolean strPDFLink = Me.txtOrginalFileLink strPDFFile = CurrentProject.Path & "\חשבוניות\" & Me.מס_חשבונית & ".pdf" Result = DownloadFile(strPDFLink, strPDFFile) MsgBox Result End Sub
-
@ארי
יש לך את הקישור לPDF שהם נותנים בעת יצירה?אם כן
אני מוריד קבלות עם הקוד הזה
זה ההצרה והפונקציהOption Compare Database Private Declare Function URLDownloadToFile Lib "urlmon" Alias _ "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _ szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long Function DownloadFile(URL As String, LocalFilename As String) As Boolean Dim lngRetVal As Long lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0) If lngRetVal = 0 Then DownloadFile = True End Function
וככה אני מוריד
Private Sub txtOrginalFileLink_DblClick(Cancel As Integer) Dim strPDFLink As String Dim strPDFFile As String Dim Result As Boolean strPDFLink = Me.txtOrginalFileLink strPDFFile = CurrentProject.Path & "\חשבוניות\" & Me.מס_חשבונית & ".pdf" Result = DownloadFile(strPDFLink, strPDFFile) MsgBox Result End Sub
-
@מלא את הקוד הזה אני מכיר. תודה.
אבל יש חלק מהקבלות שהוא מוריד אותם והקובץ הוא בגודל 2KB, מה שאומר שהוא לא באמת מצליח להוריד. -
@ארי
אני מוריד איתו מסמכים לאורך זמן ולא ידוע לי על שום בעיה איתו.
הורדתי איתו מאות ואולי אלפי מסמכיםבדקת את הקישור של הקבצים האלה שבגישה ישירה הם נותנים לך מסמך תקין?
אולי זה בעיה בקישור -
@מלא מוזר.
כי הקישורים עובדים לי, וכשניסיתי להריץ אותו על איזה 70 קבלות בערך חצי מהם הוא לא הוריד. -
@מלא יש לך דוגמא של קישור לתת לי?
לא משהו אמיתי רק אני רוצה לראות עם איזה סוג קישור אתה משתמש.
תודה. -