I can read a formatted .xlsx file using the openxlsx package and the loadWorkbook function and further edit it as needed.
How can I display this data as a HTML table in a Shiny app? Exact styling is not super important, but retaining merged cells is.
I though the basictabler package would be the solution since it supports HTML display and saving to an .xlsx file. However, I cannot find how I can get my data into this package's BasicTable object format.
The ideal solution would be turning a single worksheet from an openxlsx workbook into this BasicTable object, which I could then use in Shiny.
From what I can find, you can only create the BasicTable from scratch or from a regular dataframe object, which would mean I'd have to merge all required cells by hand.
I can't put a reprex of an Excel file, but I can picture a minimal example with a single merged cell.

You're right,
openxlsx::loadWorkbookprovides the ranges of the mergings.Firstly let's create a XLSX file for illustration:
Now let's load it as if it were given to use, and extract the info about the mergings:
And now, let's use the basictabler package: