I'd like to construct tables with some macros. I have created an environment with a variable amount of columns. One of the macros is supposed to create a row of entries that have no vertical lines. I've used \multicolumn for that. It's working fine, but I have to write out all multicolumn calls, so it is usable for only one size. Instead, I'd prefer the \lyrics command to perform like \chords below.
How could this be achieved? I'm guessing some sort of parsing or splitting would need to be involved, followed by the wrapping and joining again. This answer addresses splitting by comma. I've not found any methods for splitting by ampersand. But if the splitting can be done, I guess some loop would work from then on.
Alternatively, I have used a column styling method as described here. Maybe a similar approach could be taken. But obviously the \multicolumn command cannot be left incomplete before the column itself and then completed after the column.
I realised, that for this particular problem, another way of removing the vertical lines would be enough, but I still think wrapping cells this way is an interesting problem. So any help on either issue is greatly appreciated!
Here's an example.
\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[finnish]{babel}
\newenvironment{sheets}[1]{%
\newcommand{\chords}[1]{##1 \\ \multicolumn{1}{l}{} \\[-1em]}
\newcommand{\lyrics}[4]{\multicolumn{1}{l}{##1} & \multicolumn{1}{l}{##2} & \multicolumn{1}{l}{##3} & \multicolumn{1}{l}{##4} \\[0.5em]}
\begin{tabular}{l*{\numexpr#1-1}{|l}}
}{\end{tabular}}
\begin{document}
\begin{sheets}{4}
\chords{C & C & Am & G}
\lyrics{Paada daa pa paada}{daa, pa paada}{daa paapa da da}{daa}
\chords{C Dm & C & C G & C}
\lyrics{Daa paada da paa da}{daa papaa paada}{da pa pa pa daa daa}{daa}
\end{sheets}
% I'd like to be able to write:
% \begin{sheets}{4}
% \chords{C & C & Am & G}
% \lyrics{Paada daa pa paada & daa, pa paada & daa paapa da da & daa}
% \chords{C Dm & C & C G & C}
% \lyrics{Daa paada da paa da & daa papaa paada & da pa pa pa daa daa & daa}
% \end{sheets}
\end{document}
Here's what it looks like.

