# Pgfplotstable - Insert new column

I know that I can create a new column via

create on use/newCol/.style={
create col/set list={Some content, Some other content}
},
columns/newCol/.style={string type},
columns = {newCol, [index] 0, [index] 1, [index] 2, [index] 3},

That is all well but what if I don't know how many columns the table has in total?
Is there a way to simply (pre)append the new column to the existing ones without having to specify all other columns in the table?

Since you don't know the number of the columns, I presume you're reading a table from an external file.

In that case, you could simply add a normal one-column table before your pgfplotstable.

\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{filecontents}
\usepackage{booktabs}

\begin{filecontents*}{\jobname.dat}
x y
1 2
2 3
3 4
4 5
\end{filecontents*}

\pgfplotstableset{% global config, for example in the preamble
every last row/.style={after row=\bottomrule}
}

\begin{document}
\begin{table*}
\begin{tabular}{c}
\toprule
This\\
\midrule
is \\
a column \\