The > and < preamble options of the array package (and possibly other table packages) allow automatically inserting text and commands before and after each cell of a column, respectively.
Can they be used to insert things like \hyperlink{foo}{ before and } after each cell, or something like that? Attempts so far:
>{ \hyperlink{foo}{ } c <{ } }causes an error because the braces are unbalanced.Escaping the braces by
\{just inserts braces into the PDF.>{ \begin{hyperlink}{foo} } c <{ \end{hyperlink} }interestingly causes sharelatex to complain about the closed brace betweenbeginandend, but does not cause a latex error.The problem though is that this results in
\begin{hyperlink}{foo}text in cell\end{hyperlink}, adding a hyperlink only to the first letter "t", whereas I need the result to be\begin{hyperlink}{foo}{text in cell}\end{hyperlink}, and for some reason not even surrounding every cell entry by braces manually helps.
Is there a way to achieve this?

collcellallows you to wrap a macro around cell contents. – Oct 30 '19 at 13:11foo? – egreg Oct 30 '19 at 13:51