情報アイコン
情報 / Info
当サイトは、Typst GmbHの許諾を得て、日本語コミュニティ「Typst Japan Community」がTypst v0.13.1の公式ドキュメントを翻訳したものです。誤訳や古い情報が含まれている可能性があるため、公式ドキュメントとの併用を推奨します。翻訳の改善やサイトの機能向上について、GitHubでのIssueやPull Requestを歓迎します。コミュニティにご興味のある方はDiscordサーバー「くみはんクラブ」にぜひご参加ください。
This site provides a Japanese translation of the Typst v0.13.1 documentation maintained by the "Typst Japan Community" with permission from Typst GmbH. We recommend using this alongside the official documentation. We welcome contributions through Issues and Pull Requests on our GitHub repository for both translation improvements and website enhancements. Feel free to join our Discord server "Kumihan Club".
言語アイコン
未翻訳

このページはまだ翻訳されていません。原文の内容が表示されています。

csv

Reads structured data from a CSV file.

The CSV file will be read and parsed into a 2-dimensional array of strings: Each row in the CSV file will be represented as an array of strings, and all rows will be collected into a single array. Header rows will not be stripped.

Example

#let results = csv("example.csv")

#table(
  columns: 2,
  [*Condition*], [*Result*],
  ..results.flatten(),
)
Preview

引数
ヘルプアイコン

source
Required
ヘルプアイコン
Positional
ヘルプアイコン

A path to a CSV file or raw CSV bytes.

delimiter

The delimiter that separates columns in the CSV file. Must be a single ASCII character.

デフォルト値:

","

row-type

How to represent the file's rows.

  • If set to array, each row is represented as a plain array of strings.
  • If set to dictionary, each row is represented as a dictionary mapping from header keys to strings. This option only makes sense when a header row is present in the CSV file.

デフォルト値:

array

定義
ヘルプアイコン

decode

警告アイコン
`csv.decode` is deprecated, directly pass bytes to `csv` instead

Reads structured data from a CSV string/bytes.

data
Required
ヘルプアイコン
Positional
ヘルプアイコン

CSV data.

delimiter

The delimiter that separates columns in the CSV file. Must be a single ASCII character.

デフォルト値:

","

row-type

How to represent the file's rows.

  • If set to array, each row is represented as a plain array of strings.
  • If set to dictionary, each row is represented as a dictionary mapping from header keys to strings. This option only makes sense when a header row is present in the CSV file.

デフォルト値:

array

検索