Osama_Zaghloul Member Nov 9, 2023 #1 hello everyone. i want to open excel(xlsx) from my app.. like pic in attachment.. thanks Attachments Screenshot_٢٠٢٣-١١-٠٩-٠٤-١٩-٥٨-٨٤١_android.jpg 235.1 KB · Views: 198
Erel B4X founder Staff member Licensed User Longtime User Nov 9, 2023 #2 See this example: https://www.b4x.com/android/forum/threads/class-fileprovider-share-files.97865/#content The mime type should be: application/vnd.ms-excel Upvote 0
See this example: https://www.b4x.com/android/forum/threads/class-fileprovider-share-files.97865/#content The mime type should be: application/vnd.ms-excel
Osama_Zaghloul Member Nov 9, 2023 #3 thanks Erel I use this code: it works well, but it does not open the file in the program open xlsx: Dim ii As Intent ii.Initialize(ii.ACTION_VIEW, File.Combine(File.DirRootExternal, "aa.xlsx")) ii.SetType("application/vnd.ms-excel") StartActivity(ii The code opens the program I choose without opening the file in this program Upvote 0
thanks Erel I use this code: it works well, but it does not open the file in the program open xlsx: Dim ii As Intent ii.Initialize(ii.ACTION_VIEW, File.Combine(File.DirRootExternal, "aa.xlsx")) ii.SetType("application/vnd.ms-excel") StartActivity(ii The code opens the program I choose without opening the file in this program
Erel B4X founder Staff member Licensed User Longtime User Nov 10, 2023 #4 Whenever you see code with File.DirRootExternal you can immediately know that it is broken. https://www.b4x.com/android/forum/threads/class-fileprovider-share-files.97865/#content Upvote 0
Whenever you see code with File.DirRootExternal you can immediately know that it is broken. https://www.b4x.com/android/forum/threads/class-fileprovider-share-files.97865/#content
Osama_Zaghloul Member Nov 10, 2023 #5 When I open a file xlsx From the file manager, everything is fine and when using the code above it opens the program without the file، The following pictures show what happens when I open the file by my code. Attachments Screenshot_٢٠٢٣-١١-٠٩-٢٢-٣٢-٥٣-١٤٥_com.miui.gallery.jpg 382.4 KB · Views: 191 Screenshot_٢٠٢٣-١١-٠٩-٢٢-٣٢-٥٦-٠٧٨_com.miui.gallery.jpg 178.1 KB · Views: 202 Upvote 0
When I open a file xlsx From the file manager, everything is fine and when using the code above it opens the program without the file، The following pictures show what happens when I open the file by my code.
Osama_Zaghloul Member Nov 10, 2023 #6 Or what is the correct place to save and open this file? Upvote 0