> My specific use case is that I have a multi-row table header created in an
> R code block. I do not have a way of creating a horizontal line, and
> without that the header is not being recognised as the header in html
> export.

I defined the following macro.

#+MACRO: hlmacro (eval (org-table-insert-hline))

Then, inserting {{{hlmacro}}} in a table cell (I can do that in a table generated by a code block) results in insertion of an hline below the cell at the beginning of export. The header is then correctly identified.

Thanks,

Vikas