Skip to contents

Save a tibble or data frame with publication-ready formatting. XLSX output includes bold headers, frozen top row, autofilter, and optional title/caption/source note.

Usage

sm_export_table(
  table,
  path,
  format = c("xlsx", "csv", "tsv"),
  title = NULL,
  caption = NULL,
  source_note = NULL,
  style = c("scimapr", "minimal", "publication")
)

Arguments

table

A data frame or tibble.

path

Output file path.

format

Output format.

title

Optional title row (merged, larger font).

caption

Optional caption row beneath header.

source_note

Optional source note in footer.

style

Formatting style.

Value

path invisibly.

Examples

dat <- data.frame(Author = "Smith J", Works = 10L, Citations = 150L)
path <- tempfile(fileext = ".xlsx")
sm_export_table(dat, path)
#>  Table saved to /tmp/RtmpIQMgiF/file2370dfe8ba2.xlsx