This is a follow up to: Methods to edit column order in an existing LaTeX table?.

the suggested solution by Davy Landman works great but only for 9 columns. I have 11 columns that I need to re-order. Any suggestions are deeply appreciated.

  • Which editor do you use?
    – thymaro
    Commented Apr 26, 2018 at 12:51
  • I use the TeXWorks editor
    – Abby
    Commented Apr 26, 2018 at 12:55
  • ok, I don't know anything about this one. But I got you another method in my first answer.
    – thymaro
    Commented Apr 26, 2018 at 13:01
  • btw, next time you post, consider this ;) : Welcome to TeX.SE! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. The easier it is to copy and test your code, the more likely your question will be answered and can help others with a similar situation.
    – thymaro
    Commented Apr 26, 2018 at 13:15
  • Okay. thymaro. I will do just that the next time.
    – Abby
    Commented Apr 30, 2018 at 17:07

2 Answers 2


This is what I actually do when I want to do calculations that are subject to change in the future. I use excel and have the LaTeX code incorporated in the table. I use a strong black column to make sure I don't go and try to edit the values in the LaTeX part of the sheet, which is marked by an orange row meaningfully called LaTeX. The editable part of the sheet is called, you guessed it, excel. This is what it looks like: enter image description here In the edit section at the top, you can see what I actually type in the excel cell to get the right LaTeX code. This method is pretty robust and flexible and allows for quick edits without loosing any accuracy in the data due to having overlooked some result that would have needed adaptation to the new data. Have fun.


I don't know what editor you use. Things like that can be achieved with regex, in texstudio or in texmaker, as far as I know, but I haven't tested them.

Instead, I use MS excel or OO calc for my tables and then export them to LaTeX. What you can do, also, is go to http://www.tablesgenerator.com/latex_tables, paste your LaTeX code there (File > From LaTeX code...), add column at the appropriate place (right-click an adjacent column where the new one should be and choose apropriate option), cut the content that should be moved, and paste it in the new position, then delete the newly empty column. Generate the code and copy to clipboard. I got the following code with that method in less than a minute, so in less time it took me to write these lines ;)

\caption{My caption}
A & 26.94 & -0.523 & 0.8243 & 0.0000 & -12.67 \\
B & 30.02 & -0.614 & 0.8509 & 0.0000 & -13.12 \\
C & 32.92 & -0.630 & 0.9254 & 0.0000 & -21.45
  • Thanks thymaro. I appreciate the suggestion. I will let you know how it goes.
    – Abby
    Commented Apr 26, 2018 at 13:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .