導航:首頁 > 操作系統 > android顯示word

android顯示word

發布時間:2022-05-17 12:21:57

A. 安卓開發如何讀取word文檔顯示出來

Apache POI

可以滿足你的需求,我覺估計也是唯一靠譜的選擇了。

是一個開源的解析Office文件的java庫。

我以前用它來給單位的內容管理客戶端做過Word文檔展示。

總的來說,POI庫就是把各種Office文件解析成一種文檔樹。

當時我是修改了一下POI的一個例子程序把word轉成html文件來顯示的。

B. android怎麼打開word文件

Android ----Intent 的各種打開文件 doc word
import android.app.Activity;

import android.content.Intent;

import android.net.Uri;

import android.net.Uri.Builder;

import java.io.File;

import android.content.Intent;

//自定義android Intent類,

//可用於獲取打開以下文件的intent

//pdf,PPT,WORD,EXCEL,CHM,HTML,TEXT,AUDIO,VIDEO

public class MyIntent

{

//android獲取一個用於打開HTML文件的intent

public static Intent getHtmlFileIntent( String param )

{

Uri uri = Uri.parse(param ).buildUpon().encodedAuthority("com.android.htmlfileprovider").scheme("content").encodedPath(param ).build();

Intent intent = new Intent("android.intent.action.VIEW");

intent.setDataAndType(uri, "text/html");

return intent;

}

//android獲取一個用於打開圖片文件的intent

public static Intent getImageFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "image/*");

return intent;

}

//android獲取一個用於打開PDF文件的intent

public static Intent getPdfFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "application/pdf");

return intent;

}

//android獲取一個用於打開文本文件的intent

public static Intent getTextFileIntent( String paramString, boolean paramBoolean)

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

if (paramBoolean)

{

Uri uri1 = Uri.parse(param );

intent.setDataAndType(uri1, "text/plain");

}

while (true)

{

return intent;

Uri uri2 = Uri.fromFile(new File(param ));

intent.setDataAndType(uri2, "text/plain");

}

}

//android獲取一個用於打開音頻文件的intent

public static Intent getAudioFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

intent.putExtra("oneshot", 0);

intent.putExtra("configchange", 0);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "audio/*");

return intent;

}

//android獲取一個用於打開視頻文件的intent

public static Intent getVideoFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

intent.putExtra("oneshot", 0);

intent.putExtra("configchange", 0);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "video/*");

return intent;

}

//android獲取一個用於打開CHM文件的intent

public static Intent getChmFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "application/x-chm");

return intent;

}

//android獲取一個用於打開Word文件的intent

public static Intent getWordFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "application/msword");

return intent;

}

//android獲取一個用於打開Excel文件的intent

public static Intent getExcelFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "application/vnd.ms-excel");

return intent;

}

//android獲取一個用於打開PPT文件的intent

public static Intent getPptFileIntent( String param )

{

Intent intent = new Intent("android.intent.action.VIEW");

intent.addCategory("android.intent.category.DEFAULT");

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

Uri uri = Uri.fromFile(new File(param ));

intent.setDataAndType(uri, "application/vnd.ms-powerpoint");

return intent;

}

C. Android開發如何讀取並顯示word和pdf文檔

通過對資料庫的索引,我們還為您准備了:
Android開發如何讀取並顯示word和pdf文檔呢

問:有做過類似項目的朋友講一下么?
答:大家好! 我是個Android新手,最近有個項目,其中有個需求就是在Android應用程序中查看word和pdf格式的文檔(PS:不是用intent調用第三方軟體打開文檔哦~),可惜Android沒有直接顯示word和pdf文檔的view。於是本菜鳥上網查了好久好久好久哇= =...
===========================================

android開發中怎樣讀取一個文件里的內容並把內容顯...

問:我以為和java的讀寫文件一樣的,但他好像有自己的獲取輸入輸出留的方法...
答:基本上都差不多。 一般來說。文件,XML都放在assets這個文件夾下。
===========================================

android怎麼讀取帶有圖片的WORD文檔

問:我以為和java的讀寫文件一樣的,但他好像有自己的獲取輸入輸出留的方法...
答:用Document to go或者quick office這類軟體就可以了。這些軟體在機鋒市場和豌豆莢里一搜就有
===========================================

【Android開發】請問Android怎麼打開word文件?

問:請問Android怎麼打開word文件?網上看了好多,但都不能運行,有的說用PO...
答:用quick ooffice,在網路移動應用上下載quick office(pro版),拷貝到手機,安裝好就行
===========================================

android編程:怎樣讀取txt文件

問:請問Android怎麼打開word文件?網上看了好多,但都不能運行,有的說用PO...
答:StringBuffer buffer = new StringBuffer(); try { FileInputStream fis = new FileInputStream("/sdcard/XXX.txt"); InputStreamReader isr = new InputStreamReader(fis,"GB2312");//文件編碼Unicode,UTF-8,ASCII,GB2312,Big5 Reader in = new...
===========================================

Android開發中讀寫office文件(word,ppt,excel)...

問:最近在寫一個基於android平台的辦公套件,其中設計到對word,ppt,excel...
答:簡單的,可以使用POI處理 想處理復雜和能用的,只有在伺服器端處理,再返回手機android查看
===========================================

Android開發 ,如何讀取AndroidMainfest.xml裡面的...

問:AndroidMainfest.xml文件如下:我想在Androd程序中讀取android:largeHea...
答:largeheap是一個布爾類型的
===========================================

android程序中如何打開並編輯word,excel等文件?

問:我現在已經使用POI包,將內容放在html里,在webview上顯示出來,但是不...
答:word?excel?笑話,微軟都沒有開發基於安卓版本的word,不過最近應該有動作了把。但是,你的軟體和人家的軟體,是屬於兩個APP,最多是給你個介面讓你啟動,但是至於編輯,你得看看人家的應用有沒給你介面
===========================================

android開發中,如何實現讀取pdf格式的文件,並把...

問:最近做關於android開發,讀取pdf格式文件的應用,但是不知道如何下手啊...
答:得嵌入PDF第三方軟體或自己編寫一個類似的打開軟體吧,否則理論上是看不了的。(僅供參考)

D. 安卓系統如何看word文檔

  1. 首先在手機中下載WPS的手機版的APP。

  2. 將APP安裝至手機中。

  3. 可以打開該軟體中的word空白文檔。

  4. 如需要打開已有文檔,只需要將需要打開的word文檔直接打開即可查看。

E. android打開word文件怎麼打開

安卓手機上面需要安裝有office軟體(如:WPS office,Microsoft Word等)才能打開Word文檔。

安卓手機上面打開Word文檔的方法(以WPS office打開Word文檔為例):

方法一:

  1. 進入手機裡面的文件管理器,找到要打開的Word文檔;

F. 安卓手機如何打開word文檔

  1. 首先在手機中下載WPS的手機版的APP。

  2. 將APP安裝至手機中。

  3. 可以打開該軟體中的word空白文檔。

  4. 如需要打開已有文檔,只需要將需要打開的word文檔直接打開即可查看。

G. 安卓同時打開多個word

1.首先快速單擊桌面word2010文本進入文檔,或者右擊文檔,點擊打開也可以。

2.進入Word010後,瀏覽頁面上方的選項卡,在大約頁面左上角處找到文件。單擊進入。

3.這時候進入文件選項卡,在頁面的左方找到選項,單擊滑鼠進入。

4.此時彈出word選項卡對話框,在對話框頁面左方找到高級選項,進入進行編輯。

5.這時進入高級設置,通過拉動對話框頁面左側的滾動條找到顯示中的在任務欄中顯示所有窗口,通過點擊對號來選定。

6.一切選定完成後,單擊對話框頁面左下側的確定,進行保存設置就設置成功了。

7.最終通過任務欄可以切換多個文檔進行查看。

閱讀全文

與android顯示word相關的資料

熱點內容
devc指針編譯問題 瀏覽:998
支持dsd硬解壓音效卡 瀏覽:769
怎麼查看u盤加密區 瀏覽:181
台電加密是什麼格式 瀏覽:155
php論壇版塊在哪個文件夾 瀏覽:442
暗黑的伺服器為什麼維護 瀏覽:624
android內存溢出的原因 瀏覽:18
標志307的壓縮比是多少 瀏覽:636
伺服器啟動為什麼叫三聲 瀏覽:997
追風箏的人英文pdf 瀏覽:940
解壓小熊手機殼 瀏覽:346
成都市區建成面積演算法 瀏覽:661
智能家居單片機 瀏覽:97
買男裝用什麼app好 瀏覽:855
文件夾合並了怎麼拆開 瀏覽:261
波段副圖源碼無未來函數 瀏覽:90
livecn伺服器地址 瀏覽:259
程序員這個工作真的很吃香嗎 瀏覽:848
程序員和數學分析師待遇 瀏覽:681
壓縮氣彈簧怎麼拆 瀏覽:326