11件ヒット
[1-11件を表示]
(0.033秒)
ライブラリ
- csv (11)
検索結果
先頭1件
-
CSV (13.0)
-
このクラスは CSV ファイルやデータに対する完全なインターフェイスを提供します。
...csv_text)
# => [["Ruby", "1995"], ["Rust", "2010"]]
//}
=== 書き込み
//emlist[][ruby]{
require 'csv'
# ファイルへ書き込み
CSV.open("path/to/file.csv", "wb") do |csv|
csv << ["row", "of", "CSV", "data"]
csv << ["another", "row"]
# ...
end
# 文字列へ書き込み
csv_string =......r Encoding set and everything should just work.
CSV methods that allow you to open IO objects (CSV::foreach(), CSV::open(),
CSV::read(), and CSV::readlines()) do allow you to specify the Encoding.
One minor exception comes when generating CSV into a String with an Encoding
that is not ASCII compati...