Android 7.0 Update:
Android 7.0 sarà gettare FileUriExposedException
se si tenta di aprire il documento app con un app esterna. È necessario implementare FileProvider consultare This Answer.
qui è un percorso manuale.
Using JExcelApi in an Android App
How to read excel file using JXL 2.6.12 jar
ma qui è un po 'più facile uno.
open application
ma credo che bisogna scoprire la MIME TYPE
.
EDIT
ha ottenuto il tipo MIME e
Setting mime type for excel document
UPDATE
così qualcosa come questo potrebbe funzionare.
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/vnd.ms-excel");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
}
catch (ActivityNotFoundException e) {
Toast.makeText(OpenDoc.this, "No Application Available to View Excel", Toast.LENGTH_SHORT).show();
}
Utilizzare l'API jExcel. http://jexcelapi.sourceforge.net/ – adatapost
Mostrare un codice in cui si avvia l'attività per aprire il file excel – Ronnie