vue-office is a Vue component library that provides in-browser preview of multiple office file formats including Word documents, Excel spreadsheets, PDFs, and PowerPoint presentations, with support for both Vue 2 and Vue 3 as well as non-Vue frameworks.
The library solves the problem of displaying office documents directly in web applications without requiring users to download files or use external viewers. It accepts document sources in three forms: CDN URLs, binary data from file uploads, or ArrayBuffer data from API responses. Each file type uses an optimized preview approach—Word files leverage docx-preview, PDFs use pdfjs with virtual scrolling for performance, Excel uses exceljs and x-data-spreadsheet for comprehensive style support, and PowerPoint files use a custom pptx-preview library. Users need only pass a document source to the component's src property to enable preview functionality.
The tool suits projects requiring document preview capabilities without external dependencies or downloads. It works across Vue 2.6 and later versions, with Vue 2.6 and below requiring an additional composition API package. The library is particularly valuable for applications handling file uploads, API-delivered documents, or CDN-hosted files. The README does not compare it to alternative solutions.
The project maintains a substantial base of real-world adopters, as evidenced by the fact that nearly all open issues originate from external users rather than the core team. Maintainers typically respond to new issues and pull requests within a few days.