Without a MWE I have a couple of suggestions:
First, there are a couple of packages that will populate tables from CSV files, if that was the original format.
Second, if you've formatted the input table by hand or by script, you could add the table commands directly to the top and the bottom of your input file so that when you import, you're importing the whole table, commands and all, i.e.,
Code: Select all
Text
\input{table} %entire table, with begin and end commands are in the file
Text
Third, if there are too many tables to really do this, or if the tables are automatically generated, you could put your table preamble and ending into two separate input files, so you would end up with something like this:
Code: Select all
Text
\input{tablebegin} %table start code
\input{table} %table raw data
\input{tableend} %table end code
Text
The only bad part of this last one is if your tables have different numbers of columns. Then you would need to have a separate input file for each etc. But with this last method, you could just do a find and replace all "\begin{tabularx}{\textwidth}{x *{4}{c}}" with "\input{tablebegin}" and replace all "end{tabularx}} with "\input{tableend}" You might even get away with leaving the "\end{tabularx}" in place.