Hello
1.
I download xls file with samba code:
2.
After Open excel files . code is:
Note: Dosya_gorevi=1
this code work with android 4.0.3,
But, New tablet is Android 4.1.2. and
this code broken at line
3.
after I added lines for cheking.
This is sub for chechk
Finally log
Please see EROR.jpg.
and AVD detail.
(my code works wit andoid 4.0.3)
1.
I download xls file with samba code:
B4X:
SMB1.DownloadFile("smb://" & GD_server_ip & Dosya_yolu ,Dosya_adi, File.DirRootExternal,bellek_dosya_adi) '**** çalışıyor
2.
After Open excel files . code is:
Note: Dosya_gorevi=1
B4X:
Sub dosya_ac(Dosya_gorevi As Int, bellek_dosya_adi As String) ' OPEN FILE
'--------------------------------------------
If Dosya_gorevi=0 Then
ProgressDialogHide
Msgbox("tanımlanamayan doysa açıldı:"& bellek_dosya_adi,"Dikkat hata !")
End If
'--------------------------------------------
If Dosya_gorevi=1 Then' xls dosyası açılıdı ve combo box firma isimleri yüklenir
'LoadTable(File.DirRootExternal,"book.xls")
ProgressDialogHide
ProgressDialogShow("Veri tabanı listeleniyor...")
Dim workbook1 As ReadableWorkbook
'Dim moviesSheet As ReadableSheet
'*********this line added for only cheking************
'SMB1.ListFiles(File.DirRootExternal,"book.xls")
'****************************************
workbook1.Initialize(File.DirRootExternal,"book.xls") '***** PROBLEM LINE
moviesSheet = workbook1.GetSheet(0)
' movisheet e sayfa yüklendi
Spinner1.Enabled=True
Spinner1.Clear
For row = 2 To moviesSheet.RowsCount - 1
If Spinner1.IndexOf(moviesSheet.GetCellValue(0, row))<0 AND (moviesSheet.GetCellValue(0, row).Trim<>"") Then
Spinner1.Add(moviesSheet.GetCellValue(0, row))
Else
'---------------
End If
Next
Button3.Enabled=True' arama tuşu açıldı
ProgressDialogHide
End If
this code work with android 4.0.3,
But, New tablet is Android 4.1.2. and
this code broken at line
B4X:
workbook1.Initialize(File.DirRootExternal,"book.xls") '***** PROBLEM LINE
3.
after I added lines for cheking.
B4X:
SMB1.ListFiles(File.DirRootExternal,"book.xls")
This is sub for chechk
B4X:
Sub SMB1_ListCompleted(Url As String, Success As Boolean, Entries() As SMBFile)
If Not(Success) Then
Log(LastException)
Dim x =(LastException)
x=x
ToastMessageShow(LastException,True)
Else
For i = 0 To Entries.Length - 1
Log("*****************")
Log(Entries(i).Name)
Log(Entries(i).Directory)
Log(DateTime.Date(Entries(i).LastModified))
Log(Entries(i).Parent)
Log(Entries(i).Size)
'If Entries(i).Name.StartsWith("Par")=True Then
If Entries(i).Name.StartsWith(GD_parca_dosyaadi)=True Then
'SMB1.DownloadFile("smb://192.168.1.222/DEPO/",Entries(i).Name, File.DirRootExternal,"book.xls") '**** çalışıyor
SMB1.DownloadFile("smb://"& GD_server_ip& GD_parca_dosyaayolu,Entries(i).Name, File.DirRootExternal,"book.xls") '**** çalışıyor
End If
Next
End If
End Sub
Finally log
Please see EROR.jpg.
and AVD detail.
(my code works wit andoid 4.0.3)