# Excel to LaTeX

Turn the first sheet of an Excel, CSV, or TSV file into an escaped LaTeX table.

Excel to LaTeX takes a table that already exists and removes the slowest part of moving it into a paper: escaping every cell and writing the row structure by hand.

## Best for

Use it for a clean rectangular data table, summary statistics, a comparison grid, or results prepared in a spreadsheet. The output uses the first row as a bold header and generates LaTeX table source you can edit.

Use [Table to LaTeX](/docs/tools/table-to-latex/) when you are building a small table from scratch or want to adjust cells visually before copying the code. Keep plots and charts as figures rather than turning them into tables.

## Convert a sheet

1. Open **Excel to LaTeX**, or run `/excel-to-latex`.
2. Choose an `.xlsx`, `.xls`, `.csv`, or `.tsv` file.
3. Select **Convert**.
4. Review the detected row and column count.
5. Copy or save `table.tex`, then paste it into your document.

A sheet like this:

| Model | Accuracy | Time (s) |
| --- | ---: | ---: |
| Baseline | 0.81 | 12.4 |
| Proposed | 0.87 | 10.9 |

becomes escaped LaTeX with a header row. Add the generated package requirement to your preamble if your document does not already include it.

## Spreadsheet behavior

- Oleafly reads the **first sheet** in a workbook.
- Formula cells use the result cached in the file. Recalculate and save the spreadsheet first if values may be stale.
- A merged range contributes its value from the top-left cell; the remaining cells are empty.
- Special LaTeX characters in cell text are escaped.
- The conversion stays on your device.

:::caution[Size and layout limits]
The imported range may contain up to 10,000 rows and 100 columns, with no more than 2 MB of cell text. Split a larger workbook or export the exact range you need as CSV. Multi-sheet relationships, charts, colors, formulas, and cell styling are not reproduced.
:::

After pasting the table, compile and check width, alignment, significant figures, units, and the caption. A table that is correct in Excel may still be too wide for the journal's page layout.
