如何把 Excel 變成 Markdown 表格
要點
- 選擇
- 設定
- 貼上
You want to put a table in a GitHub README or documentation. Markdown tables have many symbols and are tedious to write by hand. Choosing "Markdown table" in Convert an Excel Table to HTML or Markdown turns an Excel table straight into a Markdown table.
步驟
- Choose an .xlsx with "Choose an Excel file".
- Choose the "Sheet", and under "Format" choose "Markdown table".
- Check the "After conversion" content and press "Copy result".
- Paste into the README or documentation.
Ticking "Make the first row a header" gives a Markdown header row (with a separator line).
What a Markdown table is
A way of writing tables with vertical bars (|) and hyphens (-). Used in GitHub, Notion and various blog and documentation tools.
適合
- Putting a specification list in a GitHub README
- Putting comparison tables in technical documents
- Pasting tables into Markdown-compatible notes or blogs
Checks after pasting
- Is the table displayed correctly (check in the preview)?
- Are there vertical bars inside the text?
- Do column counts match?
Cautions
- A vertical bar (|) inside a cell can shift the columns
- Line breaks inside cells may not be representable as they are
- Colours and borders aren't included in Markdown tables
示例
Made a library compatibility table in Excel. Turned it into a Markdown table and pasted it into the README, where it displayed as a table on GitHub.
Common stumbling blocks
- The table breaks: check for vertical bars or line breaks in cells.
- No header row: check "Make the first row a header".
Frequently asked questions
Are column widths aligned?
They are adjusted automatically at display time.
小結
From Excel to Markdown tables. Making tables for READMEs and documents is quick.
使用「把 Excel 表格轉換成 HTML 或 Markdown」(免費)搭配使用的工具
- 把 Excel 轉換成 CSV 或 JSON:把 Excel 工作表轉換成 CSV、TSV 或 JSON。
- 把 Word 轉換成 HTML:把 Word 的文字轉換成 HTML。
- CSV 與 JSON 互相轉換:立即在 CSV 和 JSON 之間互相轉換。