Open Xls File with intent

coslad

Well-Known Member
Licensed User
Longtime User
Hi

I'm tring to open a xls file using the way i use to open pdf file, i use this:

B4X:
uri = "file://" & File.Combine(File.DirRootExternal&"/Prova",nome_file )   
   i.Initialize(i.ACTION_VIEW, uri)
   i.SetType("application/pdf")     
   i.WrapAsIntentChooser("Choose PDF Viewer")
   StartActivity(i)

so i tried to change "application/pdf" to "application/xls" but don't work .

On the system is installed the" Document to go" application so if i open xls file from file manager it open.

Any idea ?

Thanks
 

dxxxyyyzzz

Member
Licensed User
Longtime User
B4X:
uri = "file://" & File.Combine(File.DirRootExternal&"/Prova",nome_file )   
    i.Initialize(i.ACTION_VIEW, uri)
    i.SetType("application/vnd.ms-excel")     
    i.WrapAsIntentChooser("Choose XLS Viewer")
    StartActivity(i)
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…