Android Question i.ACTION_VIEW, File.DirRootExternal open xls file

sigster

Active Member
Licensed User
Longtime User
Hi

I am try to open xls file
the file is there and I select Microsoft 365 (Offile) to open the file

Microsoft 365 (Offile) start to open the file then it quit like it don't find the file


B4X:
    If File.Exists(File.DirRootExternal, "filetest.xls") Then
            Log("File found")
        Else
            Log("File not found")
        End If
       
    '    Log("Open file")
    '    Log(File.DirRootExternal & "/filetest.xls")
        Dim i As Intent
        i.Initialize(i.ACTION_VIEW, File.DirRootExternal & "\filetest.xls")
        i.SetType("application/vnd.ms-excel")
        'i.WrapAsIntentChooser("Choose Excel Viewer")
        StartActivity(i)
 

omo

Active Member
Licensed User
Longtime User
Try to use file.dirinternal instead of file.DirRootExternal. Copy/put file on dirinternal, and try to open from there, it should be external access related issue on higher android even if you have permission. If you must put in external folder, search and read update info about cautions in the forum
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…