CSV to Markdown table
Pasting spreadsheet rows straight into a README gives you a wall of commas. This goes the other way from the rest of the table tools: paste what you copied out of Excel, Sheets or a .csv, and get a Markdown table with the columns padded so the source stays readable even before it is rendered.
format
how to use it
- 01Paste rows copied from a spreadsheet, or the contents of a .csv file.
- 02Check the grid, since the first row becomes the header.
- 03Copy the Markdown.
questions
- Do I need to say which delimiter I used?
- No. Commas, tabs, semicolons and pipes are detected by looking at which one gives a consistent column count, so a paste straight out of a spreadsheet works as tab separated.
- What about commas inside a field?
- A quoted field keeps its commas, and a doubled quote inside one is unescaped, following the usual CSV convention. Quoted fields may also span several lines.
- Why are the columns padded with spaces?
- So the Markdown source lines up in a plain text editor. Wide CJK characters are counted as two columns so those tables line up too.