Android Excel CSV的哪种MIME数据类型? [英] Which MIME data type for Android Excel CSV?
本文介绍了Android Excel CSV的哪种MIME数据类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试了"text/csv",甚至"application/vnd.ms-excel",但是Excel不会显示在选择列表中.还有很多其他应用程序.
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 intent = new Intent();
intent.setAction(Intent.ACTION_SEND);
intent.setType("text/csv");
intent.putExtra(Intent.EXTRA_STREAM, uri);
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
context.startActivity(intent);
}
推荐答案
应为 application/vnd.ms-excel
(
查看全文