Write a cell arrary of strings into a signle cell on a csv.
조회 수: 6 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!