Write a formatted cell counts table to a sheet in an Excel workbook.

write_counts_sheet(
  wb,
  counts,
  sheet_name = "Cell Counts",
  sheet_title = "Cell Counts per Phenotype"
)

Arguments

wb

An openxlsx Workbook from openxlsx::createWorkbook

counts

A data frame with columns for Slide ID, Tissue Category, and counts, such as the output of count_phenotypes.

sheet_name

Optional name for the worksheet.

sheet_title

Optional title header for the table.