12

I have a big LaTeX table that I want modify it in Excel, is there any solution?

There is some good solutions for converting Excel table to Latex tables.

Real Dreams
  • 8,298
  • 12
  • 56
  • 78

3 Answers3

10

You can import a latex table into excel.

  1. In the excel main menu select File -> import ...
  2. choose csv or text as file type
  3. choose "&" as your delimiter (un-select all others)
  4. finish
Hagne
  • 201
7

As far as I know there exists no solution you want, even if you want to merge cells.

The only thing that exists is excel2latex, but I never saw a result of this Excel macro that has not to be reworked.

Perhaps a pretty printing of your table could help you. For example write all & below each other so you can see the columns of your table in your tex file.

For example:

\begin{tabular}{r@{:}l*{5}c}
\toprule
\multicolumn{1}{c}{}    &       & \multicolumn{5}{c}{Node ID}                     \\ 
\cmidrule{3-7}
\multicolumn{2}{c}{Date | Time} & 25             & 28             & 29             & 31              & 32              \\
\midrule
9/29/2007 00            &00     & \ding{108}     & \ding{108}     & \ding{108}     & \ding{108}      & \ding{108}      \\
9/29/2007 01            &00     & \ding{109}     & \ding{109}     & \ding{109}     & \ding{109}      & \ding{109}      \\
9/29/2007 23            &00     & \ding{108}     & \ding{108}     & \ding{109}     & \ding{108}      & \ding{109}      \\
\midrule
9/29/2007 23            &00     & \textbullet    & \textbullet    & \textbullet    & \textopenbullet & \textopenbullet \\
\midrule
9/29/2007 23            &00     & $\blacksquare$ & $\blacksquare$ & $\blacksquare$ & $\square$       & $\square$       \\
\bottomrule
\end{tabular}

In this was you can easy see the columns of your table and you can change the mergin style by inserting \multicolumn. The bad example would be something like this:

\begin{tabular}{r@{:}l*{5}c}
\toprule
\multicolumn{1}{c}{} & & \multicolumn{5}{c}{Node ID} \\ \cmidrule{3-7}
\multicolumn{2}{c}{Date | Time} & 25 & 28 & 29 & 31 & 32 \\ \midrule
9/29/2007 00&00 & \ding{108} & \ding{108} & \ding{108} & \ding{108} & \ding{108} \\
9/29/2007 01&00 & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} \\
9/29/2007 23&00 & \ding{108} & \ding{108} & \ding{109} & \ding{108} & \ding{109} \\ \midrule
9/29/2007 23&00 & \textbullet & \textbullet & \textbullet & \textopenbullet & \textopenbullet \\ \midrule
9/29/2007 23&00 & $\blacksquare$ & $\blacksquare$ & $\blacksquare$ & $\square$ & $\square$ \\ \bottomrule
\end{tabular}
David Carlisle
  • 757,742
Mensch
  • 65,388
1

I wrote a script that does exactly that. It can be used with multicolumns, multirows and supports booktabs package. (in fact, I only implemented it for booktabs, but implementation for normal hline is just a matter of minutes.) It will create one worksheet for each table.

Usage: python tex2excel YOUR_INPUT_LATEX_FILE OUTPUT_EXCEL_NAME

I know this is a late answer, but hopefully it could help future people from google. click here for the code

Kun
  • 680