w

Advanced Features

Auto Type Detection

When you provide a URL or upload a file, the tool inspects the file extension and switches the preview component automatically:

  • .docx → Word viewer
  • .xlsx / .xls → Excel viewer
  • .pdf → PDF viewer

Lazy Component Loading

Each document viewer (@vue-office/docx, @vue-office/excel, @vue-office/pdf) is loaded on demand. Only the component for the selected type is downloaded, keeping the initial page load fast.

Large File Handling

vue-office uses virtual scrolling and optimized parsing for large documents. For very large files:

  • Prefer local file upload over remote URLs
  • Allow extra time for the initial render
  • Watch the loading indicator before interacting

CORS Requirements for URL Preview

URL-based preview requires the remote server to return proper CORS headers. If a document fails to load from a URL but works as a file upload, the server likely blocks cross-origin access.

Workarounds:

  1. Upload the file locally instead
  2. Host the file on a CORS-enabled CDN
  3. Use a server-side proxy (not provided by this tool)

View Modes

Wide Screen

Hides the left controls so the preview spans the full row — useful for wide Excel sheets.

Cinema Mode

Renders a full-page overlay with a dark background. Mutually exclusive with wide screen.

Fullscreen

Uses the browser Fullscreen API on the preview container. Excel and other viewers sync layout when entering or leaving fullscreen.

Keyboard Shortcuts

KeyAction
EnterLoad preview (when URL input is focused)
EscExit cinema or wide screen (when not in browser fullscreen)

History Management

  • Up to 50 history entries are stored locally
  • URL entries can be reloaded with one click
  • File upload entries store metadata only (re-upload required)

Browser Compatibility

Works best in modern browsers with full ES module support:

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+
Was this page helpful?