0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Excel ファイルデータからタブ区切りテキストデータを作る

Last updated at Posted at 2021-07-01

こんにちは
Excel ファイル(のシート)のデータから、タブ区切りテキストデータを作りました。

Excel作業:

  1. 全セルを対象に、置換機能を用い、改行コード(Control+J)を削除する。
  2. タブ区切りテキストデータとして、エクスポートする(ファイル名の例:example.tsv)。
  3. Excel ファイルを閉じる。

次に(WSL 上などで):
3. 文字コードを utf-8 へ変換する(nkf -Lu --overwrite example.tsv1
4. 全ての行がタブ区切りとなっていることを点検(grep -n -v "$(printf '\t')" example.tsv

  1. ただし、この tsv ファイルをExcelで読み込みたい(かつ日本語データを含む)場合には、先頭にはBOMを付加してください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?