1行目を見出しにするかどうか
- 選ぶ
- 切り替える
Excelの表を変換するとき、1行目を「見出し」として扱うかどうかで、できあがる表が変わります。Excelの表をHTML・Markdownにする では、「1行目を見出しにする」のチェックで、切り替えられます。
手順
- 「Excelファイルを選ぶ」で、.xlsx を選びます。
- 「シート」と「形式」を選びます。
- 「1行目を見出しにする」にチェックを入れる、または外す。
- 「変換後」の内容を確かめます。
チェックを入れる場合
1行目が、列の名前(見出し)のとき。
- 例:「商品名」「価格」「在庫」などが、1行目に並んでいる表。
- HTMLでは見出しのセルになり、太字などで目立ちます。
- Markdownでは、見出し行と区切り線が入ります。
チェックを外す場合
1行目も、ふつうのデータのとき。
- 例:見出しのない、数字だけの表。
- すべての行が、同じ扱いになります。
迷ったとき
表の上の行が「何の列か」を説明しているなら、チェックを入れます。数字や文章のデータそのものなら、外します。
見出しがあるメリット
- 列の意味が、すぐ分かる
- 読み上げソフトなどにも、やさしい
- 検索エンジンにも、表の構造が伝わる
Markdownのときの注意
Markdownの表は、見出し行が必須の形式です。チェックを外した場合でも、空の見出し行が入ることがあります。
向いている場面
- 見出しありの表を、Webに載せる
- 見出しなしの、データだけの表を渡す
例
タイトル行が2行ある表を変換した。「1行目を見出しにする」で、1行目だけが見出しになった。2行目は通常の行なので、Excelで先に整えて、やり直した。
つまずきやすい点
- 見出しが2行ある:HTMLの見出しは、1行目だけ。
- 見出し行が出ない:チェックを確かめる。
よくある質問
チェックを変えたら、すぐ反映されますか?
変換後の欄で、確かめられます。
まとめ
1行目が列の名前ならチェック、データそのものなら外す。
Excelの表をHTML・Markdownにするを使う(無料)あわせて使えるツール
- ExcelをCSV・JSONに変換する:Excelのシートを、CSV・TSV・JSONに変換します。
- WordをHTMLに変換する:Wordの文章を、Webに貼れるHTMLにします。
- CSVとJSONを相互変換する:CSVとJSONを、すぐに相互変換します。
同じツールの、ほかの解説
Using the First Row as a Header or Not
- Choose
- Switch
When converting an Excel table, whether the first row is treated as a "header" changes the resulting table. In Convert an Excel Table to HTML or Markdown you can switch with the "Make the first row a header" tick.
Steps
- Choose an .xlsx with "Choose an Excel file".
- Choose the "Sheet" and "Format".
- Tick or untick "Make the first row a header".
- Check the "After conversion" content.
With the tick
When the first row holds column names (headers).
- Example: a table with "Product", "Price", "Stock" and so on in the first row.
- In HTML they become header cells, standing out in bold and so on.
- In Markdown, a header row and separator line go in.
Without the tick
When the first row is ordinary data too.
- Example: a table of only numbers, without headers.
- All rows are treated alike.
If unsure
If the top row explains "what each column is", tick it. If it is the data itself, whether numbers or text, untick.
Benefits of having a header
- The meaning of columns is clear at once
- Friendlier to screen readers
- The table structure is conveyed to search engines
Note for Markdown
Markdown tables require a header row. Even unticked, an empty header row may go in.
Good for
- Putting a table with headers on the web
- Handing over a header-less table of data only
Example
Converted a table with two title rows. With "Make the first row a header", only the first row became a header. The second was an ordinary row, so I tidied it in Excel first and redid it.
Common stumbling blocks
- There are two header rows: HTML headers are only the first row.
- No header row appears: check the tick.
Frequently asked questions
Does changing the tick apply immediately?
You can check it in the "After conversion" field.
Summary
Tick if the first row has column names; untick if it's data itself.
Use "Convert an Excel Table to HTML or Markdown" (free)Tools that go well with this
- Convert Excel to CSV or JSON: Convert an Excel sheet to CSV, TSV or JSON.
- Convert Word to HTML: Turn Word text into HTML.
- Convert CSV and JSON: Convert between CSV and JSON instantly.