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?
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
If it's a simple file (simple in terms of simple LaTeX. It can be as wide or as long as you want), you can use the
tex2lyx program. The easiest way to do this is to go to File > Import > LaTeX (plain). Then copy that table and paste it into your main document.