Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Microsoft Office Library (.doc, .docx, .xls, .ppt, etc.) [closed]

Does anyone know of a good Java Microsoft Office API capable or running on an Android? I know there is an OpenOffice Java API, but I haven't heard of anyone using it on Android.

I know that using intents is another option, but how common are pre-installed office viewers on the varying Android distributions? Would it be reasonable for a developer to expect the user to have one of these viewers installed? Is it reasonable to request that they install one of these applications if they don't already have one?

like image 465
matheeeny Avatar asked Jan 31 '11 19:01

matheeeny


People also ask

Is it possible to open a certain file with a .doc format using an Android phone?

Using Microsoft Word for Android to Open Doc/Docx Files Grab the Microsoft Word app on the Play Store. Once the app finishes the installation process, tap the '. doc' or '. docx' file on your phone, then select Word from the list of apps available.

How do I open a DOCX file?

How to open a DOCX file. You can open a DOCX file with Microsoft Word in Windows and macOS. Word is the best option for opening DOCX files because it fully supports the formatting of Word documents, which includes images, charts, tables, and text spacing and alignment. Word is also available for Android and iOS devices ...

What is Microsoft DOCX?

docx file is a Microsoft Word text document. The format was introduced as a new standard for text documents with the release of Word version 2007.


2 Answers

Since most of the documents we need to display are already hosted on the web, we opted to use an embedded web view that opens the document using google docs viewer.

We still have a few locally stored documents though that this approach doesn't work with. For these, our solution was to rely on the support of existing apps. After spending some more time with Android, It seems that most devices come equipped with some sort of document/pdf reading capability installed fresh out of the box. In the event that they don't have a capable app, we direct them to a market search for a free reader.

like image 192
matheeeny Avatar answered Sep 19 '22 17:09

matheeeny


Unfortunately there's no built in Android control to edit MS Office files, or even to display them! It's a pretty big omission given iOS has built in support for displaying Office files. There don't seem to be viewer app consistently enough available to rely on (and they may not provide the kind of user experience you're hoping for either).

If you want to display or edit docx etc within your android application, you have to embed some third party code that adds this functionality. I'm not aware of any pre-packaged open source code that can do this, so unless you want to build/port a solution yourself you will need to commercially license something.

As others have noted, there are some open source projects in this area, but they're not packaged/ported to Android. If you did manage to get them ported and integrated, they'd add a huge overhead to your Android app download (eg. 80+ megabytes) and you'd need to then add a mobile suitable UI for them (see https://play.google.com/store/apps/details?id=com.andropenoffice&hl=en_GB for an example of a port with ui that I personally think is not suitable/user friendly for an Android application.)

One such SDK that I'm familiar with which solves this problem is based on the SmartOffice application:

https://artifex.com/products-smart-office-overview/

It's available as an secure embeddable library that supports both display and (optionally) editing of Office documents. You can contact [email protected] for licensing information.

Disclosure: One of my jobs involves working on the SmartOffice code.

like image 27
JosephH Avatar answered Sep 19 '22 17:09

JosephH