フィルターのクリア

Write a cell arrary of strings into a signle cell on a csv.

2 ビュー (過去 30 日間)
Xymbu
Xymbu 2022 年 5 月 11 日
コメント済み: Xymbu 2022 年 5 月 12 日
I have a 1x4 cell array with strings and I want to write them all into a single cell on a csv file like when you hit alt+enter to make a newline in a cell when using a csv.

採用された回答

Walter Roberson
Walter Roberson 2022 年 5 月 11 日
It looks like what excel needs for this case is for the file to start with the UTF-8 Byte Order Mark (BOM), and that the embedded line break is in a field with double quotes around the field, and the line break must be just the newline character, and the end of record must be carriage return followed by newline.
https://stackoverflow.com/questions/1241220/generating-csv-file-for-excel-how-to-have-a-newline-inside-a-value
  1 件のコメント
Xymbu
Xymbu 2022 年 5 月 12 日
What I ended up doing instead was just turn it into a single string with a string that signifies the line break then I could turn them back into seperate cells when i read it back into matlab seperating with that string

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by