| Title: | Local Canvas Preview for xlsx, docx, and pptx Files |
|---|---|
| Description: | Renders .xlsx, .docx, and .pptx files using the bundled '@silurus/ooxml' JavaScript/WebAssembly viewer, served locally via 'httpuv' and shown in the RStudio Viewer pane or default browser. |
| Authors: | Jan Marvin Garbuszus [aut, cre], Yuki Yokotani [cph] (Author of included ooxml library) |
| Maintainer: | Jan Marvin Garbuszus <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.6.9 |
| Built: | 2026-09-29 16:12:30 UTC |
| Source: | https://github.com/JanMarvin/oxview |
Called automatically by ox_view_*(). Exposed for advance use, e.g.
warming up the server before the first preview.
ox_start_server()ox_start_server()
Stop the local oxview preview server
ox_stop_server()ox_stop_server()
Dispatches to ox_view_xlsx, ox_view_docx, or
ox_view_pptx based on type if given, otherwise on
x's file extension (or, for an openxlsx2 wbWorkbook object,
always to the xlsx viewer).
ox_view( x, interactive = NA, browser = FALSE, debug = FALSE, type = NULL, zoom = NULL, select = NULL )ox_view( x, interactive = NA, browser = FALSE, debug = FALSE, type = NULL, zoom = NULL, select = NULL )
x |
Path or URL to an .xlsx/.xlsm/.docx/.pptx file, or an
openxlsx2 |
interactive |
Whether to actually open the viewer. Defaults to
|
browser |
If |
debug |
If |
type |
Optionally force the format ("xlsx", "docx", or "pptx")
instead of guessing it from |
zoom |
Initial zoom as a scale multiplier, e.g. |
select |
What to select/open initially - forwarded to the
format-specific parameter that makes sense: sheet name/1-based index
( |
Preview a .docx file
ox_view_docx( x, page = NULL, zoom = NULL, background = NULL, interactive = NA, browser = FALSE, debug = FALSE )ox_view_docx( x, page = NULL, zoom = NULL, background = NULL, interactive = NA, browser = FALSE, debug = FALSE )
x |
Path or URL to an existing .docx file. |
page |
Page to open initially (1-based). |
zoom |
Initial zoom as a scale multiplier, e.g. |
background |
Background color behind the page (any valid CSS color). |
interactive |
Whether to actually open the viewer. Defaults to
|
browser |
If |
debug |
If |
Preview a .pptx file
ox_view_pptx( x, slide = NULL, zoom = NULL, background = NULL, interactive = NA, browser = FALSE, debug = FALSE )ox_view_pptx( x, slide = NULL, zoom = NULL, background = NULL, interactive = NA, browser = FALSE, debug = FALSE )
x |
Path or URL to an existing .pptx file. |
slide |
Slide to open initially (1-based). |
zoom |
Initial zoom as a scale multiplier, e.g. |
background |
Background color behind the page (any valid CSS color). |
interactive |
Whether to actually open the viewer. Defaults to
|
browser |
If |
debug |
If |
Opens a live spreadsheet preview (RStudio Viewer pane, or the default
browser with browser = TRUE) with a formula bar, cell reference
box, sheet-name search, and a status bar showing count/sum/average for
the current selection.
ox_view_xlsx( x, sheet = NULL, cell = NULL, zoom = NULL, interactive = NA, browser = FALSE, debug = FALSE )ox_view_xlsx( x, sheet = NULL, cell = NULL, zoom = NULL, interactive = NA, browser = FALSE, debug = FALSE )
x |
Path to an existing .xlsx/.xlsm file, or an openxlsx2
|
sheet |
Sheet to open initially: a sheet name, or a 1-based index.
If |
cell |
A cell reference (e.g. |
zoom |
Initial zoom as a scale multiplier, e.g. |
interactive |
Whether to actually open the viewer. Defaults to
|
browser |
If |
debug |
If |