the code is taken from TextEditor of @Erel and trying to initialize the xls. (apoi lib and addtional jars are included)
java.lang.IllegalStateException: Zip File is closed
help needed.
java.lang.IllegalStateException: Zip File is closed
help needed.
B4X:
Private Sub B4XPage_MenuClick (Tag As String)
Select Tag
Case "save"
' Save
Case "load"
Load
End Select
End Sub
Private Sub Load
#if B4A
Wait For (FileHandler1.Load) Complete (Result As LoadResult)
#else if B4i
Wait For (FileHandler1.Load(Me, B4XPages.GetNativeParent(Me).TopRightButtons.Get(1))) Complete (Result As LoadResult)
#end if
HandleLoadResult(Result)
End Sub
Private Sub HandleLoadResult(Result As LoadResult)
If Result.Success Then
xls.Initialize("",File.Combine("ContentDir","Aavana.xlsx")) ' here i get the error java.lang.IllegalStateException: Zip File is closed
'
' Dim s As String
' Try
' s = File.ReadString(Result.Dir, Result.FileName)
' toast.Show($"File '${Result.RealName}' loaded"$)
' Catch
' s = "Error loading file"
' Log(LastException)
' End Try
' txtField.Text = s
End If
End Sub