Bonjour, voila je cherche une solution pour pouvoir ouvrir un fichier ( en l’occurrence un .csv) avec un intent.

jusqu’à ici j'ai réussi a ouvrir mon dossier et a sélectionner mon fichier avec ce code ci:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
       // String App = "com.microsoft.office.excel";
        Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
        Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()
                + "/android/data/ch.srvinfo.interfire.interfire/files/");
        intent.setDataAndType(uri, "text/csv");
        startActivity(Intent.createChooser(intent, "com.microsoft.office.excel"));
mais je voudrait que une fois le fichier sélectionner il soit ouvert sur excel... existe il une solution pour ce que je souhaite faire?