gt icon indicating copy to clipboard operation
gt copied to clipboard

Support for importing openxlsx worksheet objects

Open Mkranj opened this issue 1 year ago • 0 comments

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)

Mkranj avatar Apr 04 '24 06:04 Mkranj