How is your experience with the OutSystems Community?
office-viewer
Reactive icon

Office Viewer

Stable version 1.0.3 (Compatible with OutSystems 11)
Uploaded
 on 30 Nov (yesterday)
 by 
Drakkar
5.0
 (4 ratings)
office-viewer

Office Viewer

Details
Reusable patterns for viewing Office documents in the browser. Provides UI blocks that display Word, Excel, PowerPoint and CSV files (DOC, DOCX, XLS, XLSX, PPT, PPTX, CSV) on the client side, without uploading the document to any external service.
Read more

OfficeViewer lets your OutSystems Reactive apps show Office documents inline. You give it the file as Binary Data with its file name. It works out the document type and renders the file in the browser with a bundled open-source engine (MIT-licensed).

Supported formats

  • Word: .docx, .doc (97–2003)
  • Excel: .xlsx, .xls (97–2003)
  • PowerPoint: .pptx, .ppt (97–2003)
  • Delimited text: .csv, .tsv


Key features

  • Automatic type detection: the main OfficeViewer block uses the MIME type first and falls back to the file extension. It then shows the matching viewer. Unsupported files show a clear "preview not available" message.
  • Viewer blocks for each format: DocxViewer, DocViewer, XlsxViewer, XlsViewer, PptxViewer, PptViewer and CsvViewer are there for when you already know the format.
  • Optional toolbar: previous/next page, slide or sheet, zoom, fit to width, and a sheet picker for workbooks.
  • Privacy by design: all rendering happens on the client, and documents never leave the user's browser.
  • Loading feedback: a "Loading document" indicator shows while the file is being rendered.
  • Heavy work runs in Web Workers, so the UI stays responsive with large files.


Parameters

ParameterDefaultDescription
File—Document content (Binary Data). Required.
FileName—File name with extension. Required.
MimeType""Used first to choose the viewer.
Height100vhCSS height of the viewer.
ShowToolbarFalseShows the navigation and zoom toolbar.
MaxFileSizeMB50Largest file accepted.
CsvDelimiter""Empty means the delimiter is detected automatically.
CsvEncodingutf-8Text encoding for CSV/TSV files.
DocumentVersion""Change this value to force the same document to reload.


How to use

  1. Add a dependency on OfficeViewer_CW.
  2. Drag the OfficeViewer block onto your screen.
  3. Bind File, FileName and, if you have it, MimeType, from an entity attribute, an upload widget or a REST response.
  4. Handle the Error event to show your own message when a document can't be displayed.


Release notes (1.0.3)

Updated docx javascript

License (1.0.3)

LicensingThe rendering engine is open source under the MIT licence. The full licence and third-party notices are included in the module's resources.

Reviews (1)
by 
30 Nov (12 hours ago)
in version 1.0.0
This component is amazing!!
Team
Other assets in this category