Which Mime Data Type For Android Excel Csv?
I tried 'text/csv' and even 'application/vnd.ms-excel', but Excel won't show in the list of choices.  Plenty of other apps do. void shareCsv(Uri uri, Context context) {     Intent
Solution 1:
It should be application/vnd.ms-excel (source)
Solution 2:
You can try:
voidshareCsv(Uri uri, Context context) {
    Intentintent=newIntent();
    intent.setAction(Intent.ACTION_SEND);
    intent.setType("application/excel") //replace "text/csv" with application/excel
    intent.putExtra(Intent.EXTRA_STREAM, uri);
    intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
    context.startActivity(intent);
}
Here's a link to the .xls mime-types you can use. If one type isn't working for you, try another.
List of choices for Excel:
application/excelapplication/vnd.ms-excelapplication/x-excelapplication/x-msexcel
Post a Comment for "Which Mime Data Type For Android Excel Csv?"