# Editing LaTeX tables in MS Excel

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.

-
You can use CSV files and set up it to use & as the values separators. –  Sigur Apr 4 '13 at 16:33
excel2latex. I only know that it exist, never used it. –  Torbjørn T. Apr 4 '13 at 16:38
Have a look at datatool. what kind of modification in excel that it cannot be done in latex itself? –  texenthusiast Apr 4 '13 at 16:40
–  Torbjørn T. Apr 4 '13 at 16:41
@Sigur Thanks. My table is not so simple, it contains merged cells and indeed I want change the merging style. –  PHPst Apr 4 '13 at 16:51
show 2 more comments

## 1 Answer

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}

-
Thank, Is there any tex editor that could prettify the code? IDEs could to that for most programming languages.What about LaTeX? –  PHPst Apr 4 '13 at 17:16
In Emacs (use AUCTeX for serious business) you can use align-current which works fairly well. –  Sean Allred Apr 4 '13 at 17:24
@PHPst In question pretty printing of LaTeX code @werner suggest to try indentlatex. I do not know if it can do this. A problem will be to find the correspondig & signs ... I do it by my own for my tables ... –  Kurt Apr 4 '13 at 17:25
@PHPst for vim read the section “tabular” in this answer. –  phg Apr 4 '13 at 17:35
Gnumeric is able to export table to LaTeX via Save As command. –  g.kov Apr 4 '13 at 18:52
show 1 more comment