gt
gt copied to clipboard
Support for importing openxlsx worksheet objects
The gt package looks great. Would it be possible to convert openxlsx worksheets (parts of an Excel workbook, handled by the openxlsx package) into gt objects?
Ideally, this would preserve the formatting (colors, numerical formatting...) as well as merged cells (certain headers, descriptive sidebars...). With this, you could read a formatted Excel file from disk and preserve its look in a Quarto doc or Shiny app.
Suggested api:
ex_workbook <- openxlsx::loadWorkbook("my_excel.xlsx")
converted_gt <- gt::convertOpenxlsx(ex_workbook, sheet = 1)