[Tex/LaTex] Importing LaTeX table code into LyX

formattingimportlyxtables

I create tables in a spreadsheet program, convert them to LaTeX code and then use an ERT to import into my LyX document. When I paste the LaTeX code the entire thing turns out very ugly looking. The table, however, works fine but its impossible to edit within LyX due to the ugly formatting when pasted. Is there a way to import a LaTeX file into a table float instead of inserting an ERT in LyX?

Best Answer

If the table (LaTeX code) is saved in a file table1.tex it is possible to include it into the float (or elsewhere) in LyX by using "Insert > File > Child Document..." with "Include Type: Input".

For editing the table in file table1.tex, you can right-click on the field "Input: table1.tex" and choose "Edit Included File...". A text editor should open up displaying table1.tex.

Related Question