This is exactly the same problem I and my classmates were having when writing our lab reports on Experimental Physics. Since we work in groups it's great to have data on the cloud. The problem was converting sometimes dozens of tables to Latex...
So, I and a classmate of mine came up with LatexKit, a google sheets add-on that creates and exports to your Google Drive a text file containing the tabular environment of a given table.
For your case, this won't handle page width or height, nor copy the exact borders you have configured (although there is a way to overcome this, keep reading), but it can help you get started with little trouble and systematically for multiple tables.
This add-on is developed using Google apps script so, unfortunately, the lack of some features is not easily overcomeable.
It does, however, help a lot when converting tables from Google Sheets to Latex
It has some additional features that could help you or someone else in the future.
Current Features:
Features that can or will be implemented (given the time and will of the community):
- Configure the table to have the same alignments as in your Spreadsheet
- Handle different font styles like bold, italic, etc...
- And a lot more, you just have to pitch us the idea! Reach us either trough facebook or e-mail: [email protected]
Here's LatexKit in action
This is the table on the spreadsheet:
This is the exact code produced by LatexKit using the template 'grid':
\begin{tabular}{|c|c|}
\hline
Time (h) & Temperature (C) \\ \hline
12 & 19.5 $\pm$ 0.4 \\ \hline
13 & 20.3 $\pm$ 0.6 \\ \hline
14 & 21.8 $\pm$ 0.7 \\ \hline
15 & 20.9 $\pm$ 0.6 \\ \hline
16 & 19.7 $\pm$ 0.4 \\ \hline
\end{tabular}
This is the result when compiled in Latex:
This is really a project to the community so we would gladly take your advice to improve!
pgfplotstable
? That provides options to convert plaintext data files to tables. Cell borders are not exported to csv, but usually a good table needs no borders ;) If you want more detailed advice please post some sample data and a picture of what you want it to look like.gnumeric
. The problem is that then generated source code is too complex for my taste. I prefer export the table as a LaTeX fragment and lost all the format. It is better start with a cleanaaa & bbb & ccc \\ ...
and lost all the vertical lines (evil) and horizontal lines as well. Add a table environment, one\toprule
, one\bottomrule
one\midrule
of thebooktabs
package is no too complex and this way I obtain a clean source code and a pretty table.