2011-05-07 78 views

回答

0

在Android中,jxl.jar用於創建Excel工作表,它可在here ,你可以創建EXCEL通過使用下面的代碼表。

File root = Environment.getExternalStorageDirectory(); 
File gpxfile = new File(root, sFileName); 
    FileWriter writer = new FileWriter(gpxfile); 
writer.append("NAME"); 
1

對於android中的MS格式沒有太多的支持。所有論壇都有關於android支持jexcelapi或Apache POI的問題,但沒有找到答案。你可以試試看,但沒有太高的期望。

如果你有過的文件控制,只使用一個CSV格式或將其保存爲HTML

0

使用下面提到的代碼,並嘗試:

File file = new File(Environment.getExternalStorageDirectory()+ "/filepath/" + filename); 
Intent intent = new Intent(Intent.ACTION_VIEW); 
intent.setDataAndType(Uri.fromFile(file),"application/vnd.ms-excel"); 
startActivity(intent);