# how to import many input in spreadtab table [duplicate]

\documentclass{article}
\begin{filecontents*}{products.tex}
@ Plant &  60 &  2 \\
@ Book  &  90 &  4 \\
@ Other & 100 & 10 \\
\end{filecontents*}
\makeatletter
\begingroup
}
\makeatother
\begin{document}
\toprule
@ Product name & @ Price & @ Count \\
\midrule
\input{products}
\midrule
@ Total & :={sumprod(b2:[0,-1];c2:[1,-1])} & sum(c2:[0,-1])\\
\bottomrule
\end{document}



This code just works for three columns, but what I have to change when I want five columns ?

I know that I have to change something here

\makeatletter
\begingroup
}
\makeatother


but I don't get fix it at all.

So what I want that this

\begin{filecontents*}{products.tex}
@ Plant & 1 &  60 &  2 & 77 \\
@ Book  & 2 &  90 &  4 & 64 \\
@ Other & 3 & 100 & 10 &  6 \\
\end{filecontents*}


can put in a table with this structure

\begin{document}