I ran into a problem with the \include/\input command. I want to generate a table based on the child document somedoc.tex, which looks as follow
$$12.67$$ & $$6.18$$ & $$5.00$$ & $$60.33$$ \\
$$12.80$$ & $$0.00$$ & $$0.00$$ & $$64.22$$ \\
$$0.83$$ & $$22.88$$ & $$18.02$$ & $$16.32$$
My code is
\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}
\begin{table}
\center \small
\begin{tabular}{SSSS} \toprule
{col1} & {col3} & {col3} & {col4} \\ \midrule
\include{"somedoc.tex"}
\\ \bottomrule
\end{tabular}
\raggedright
\end{table}
\end{document}
The weird thing is that I can easily generate the document when I put in the text from the child-document directly. However, when I include it via \include/\input it makes an error. So, how should I include the text as a child-document?
In advance, thanks for the answer!

pgfplotstableit might be better. See e.g this post for some example – BambOo Jun 18 '19 at 10:56$(or$$) around the numbers if you are including them in anScolumn, you can not use\includein a table (it always forces a new page at the start and end of inclusion) It is possible to use\inputbut doing that in a tabular requires some care,\centershould never be used as a command, you meant\centering– David Carlisle Jun 18 '19 at 11:17pgfplotstableis able to read data from files, and you can customize column headers and so on. Which seems to be fairly what you want to do, isn't it ? – BambOo Jun 18 '19 at 11:18