• Bold, centered header

  • Bold column headers

  • Bold Slide ID column

  • Two-row page title

  • Page breaks as needed

write_sheet(
  wb,
  d,
  sheet_name,
  sheet_title,
  header_col,
  keepNA = TRUE,
  addGrid = TRUE
)

Arguments

wb

An openxlsx Workbook from openxlsx::createWorkbook

d

A data frame to write.

sheet_name

Name for the worksheet.

sheet_title

Title header for the plot.

header_col

Column number to start the sheet_title

keepNA

If TRUE, NA values are written as #N/A; else they are blank.

addGrid

If TRUE, grid lines (and page breaks) are added based on the tissue categories in the data. If FALSE, no grid lines are added and page breaks are added where needed.

Value

Invisibly, the number of columns added with TMA info (0, 3, or 4)

Details

If the provided data has TMA core information embedded in a Sample Name column, add columns with the TMA info.