导航:首页 > 操作系统 > 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相关的资料

热点内容
做程序员的没朋友吗 浏览:355
阿里云服务器传奇微端 浏览:922
phplinux时间 浏览:447
云服务器20性能 浏览:986
android强制系统横屏 浏览:280
怎么提前看未播出的电视剧app 浏览:666
cad转pdf图层 浏览:600
程序员接私活初级 浏览:434
全无油润滑压缩机 浏览:185
代码加密常用方法 浏览:953
安卓手机如何解除已禁用 浏览:396
算法的随机性 浏览:487
高中解压体育游戏 浏览:533
androidstudior丢失 浏览:345
命令行笔记 浏览:739
360目标文件夹访问拒绝 浏览:520
3b编程加工指令 浏览:791
c8051f系列单片机选型手册 浏览:773
南昌php程序员 浏览:514
bcs命令 浏览:447