TransWikia.com

Editing LaTeX tables in MS Excel

TeX - LaTeX Asked on March 27, 2021

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.

3 Answers

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}

Answered by Mensch on March 27, 2021

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

Answered by Kun on March 27, 2021

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

Answered by Hagne on March 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP