Office documents viewer in mobile app

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Office documents viewer in mobile app
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1050
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Office Documents Viewer in Mobile Application

.docx, .xlsx, .pptx — Office Open XML formats based on ZIP archives with XML inside. Unlike PDF, they have no standard renderer on mobile platforms. Each manufacturer solves it differently: Microsoft provides SDK, Google — Document Viewer API, others — third-party libraries with variable table and formula rendering quality.

Three Strategies

1. Server-side conversion to PDF/images: document uploads to your server, converts via LibreOffice/unoserver, returns as PDF or PNG set. Client — ready-to-display format. Pros: predictable rendering, no mobile SDK dependency. Cons: conversion delay, document transfer through server (GDPR issues for sensitive data).

2. Native OS viewer: open document in system app (Microsoft Office, QuickLook on iOS). Goes outside your app — sometimes unacceptable.

3. Client-side rendering library: embedded renderer in React Native/Flutter. Limited format support, but no server dependency.

iOS: QuickLook and QLPreviewController

iOS provides QLPreviewController — system viewer supporting .docx, .xlsx, .pptx, .pdf, .txt, images, archives. Embeds in app via native module:

@objc func previewDocument(_ filePath: String) {
    DispatchQueue.main.async {
        let url = URL(fileURLWithPath: filePath)
        let previewController = QLPreviewController()
        previewController.dataSource = self
        UIApplication.shared.windows.first?.rootViewController?
            .present(previewController, animated: true)
    }
}

QuickLook renders Microsoft documents via system engine — quality identical to Microsoft Office on iOS. Limitation: view-only, no editing.

In React Native: react-native-doc-viewer uses QLPreviewController under the hood for iOS.

Android: No Unified System Viewer

Android lacks built-in QLPreviewController equivalent for Office documents. Options:

Intent ACTION_VIEW: launches external app (Google Drive Docs, Microsoft Office, WPS Office). User must have at least one. If not — app crashes with ActivityNotFoundException. Mandatory check:

val intent = Intent(Intent.ACTION_VIEW).apply {
    setDataAndType(fileUri, getMimeType(filePath))
    flags = Intent.FLAG_GRANT_READ_URI_PERMISSION
}
val resolveInfo = packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY)
if (resolveInfo != null) {
    startActivity(intent)
} else {
    // Fallback: suggest installing Google Docs or open as PDF
}

Aspose.Words for Android via Java: commercial SDK, renders .docx without installed Office. Quality close to Microsoft Word. License from $999/year.

Android WebView + Google Docs Viewer: https://docs.google.com/viewer?url=<encoded_url>. Works for public files. For private — temporarily host file on accessible URL or use Google Drive API for sharing.

react-native-doc-viewer: Cross-platform Wrapper

import FileViewer from 'react-native-file-viewer';
import RNFS from 'react-native-fs';

const openDocument = async (url: string, filename: string) => {
  const localPath = `${RNFS.CachesDirectoryPath}/${filename}`;
  const exists = await RNFS.exists(localPath);
  if (!exists) {
    await RNFS.downloadFile({ fromUrl: url, toFile: localPath }).promise;
  }
  await FileViewer.open(localPath, {
    showOpenWithDialog: true,
    showAppsSuggestions: true,
  });
};

On iOS FileViewer uses QLPreviewController. On Android — ACTION_VIEW with file:// URI via FileProvider (direct file:// blocked on Android 7+).

Server-side Conversion: LibreOffice Headless

For maximum compatibility and privacy:

libreoffice --headless --convert-to pdf --outdir /output /input/document.docx

unoserver — REST API over LibreOffice for production. Typical .docx conversion takes 1–3 seconds. Cache result by file hash — don't convert same twice.

Comparison of Approaches

Approach iOS Android Privacy Delay
QLPreviewController Excellent High None
Intent + third-party Depends Medium None
Server conversion Excellent Excellent Low 1–5 sec
Aspose SDK Excellent Excellent High None
Google Docs Viewer Good Good Low 2–4 sec

Assessment

QuickLook + Android Intent with fallback to server conversion: 2–4 weeks. With caching and offline support: 4–6 weeks.