Qiita Conference 2025

伊藤淳一 (@jnchito)

なぜあなたの記事には「いいね」が付かないのか?〜あるいは「いいね」よりも大事な技術記事の価値について〜

13
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

xlsxデータを読み込んで出力してみる

Last updated at Posted at 2022-12-24

Brightの対象

Webアプリ開発 Elixir > クラス1 > Elixir Web/ライブラリ > CSV/Excel > Xlsxir


使うライブラリ

ソース例

Xlsxファイルを読み込んで0シート目の内容をタブ区切りで表示します

Mix.install([{:xlsxir, "~> 1.6"}])

{:ok, tid} = Xlsxir.multi_extract("./test.xlsx", 0)
Xlsxir.get_list(tid)
|> Enum.each(&Enum.join(&1, "\t") |> IO.puts)
Xlsxir.close(tid)

実行例
image.png

データ例
Screenshot from 2022-12-24 22-45-36.png

応用すれば、xlsxファイルからデータを読み込んでデータ加工ができそうですね

13
1
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
13
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?