【发布时间】:2011-06-29 05:43:21
【问题描述】:
我想用 C# 创建一个 csv 文件。
我有一些数据要写在多行但在同一个单元格中。
例如 如果我有以下三句话,
Sample sentence 1. This is second sample sentence. and this is third sentence.
我想在 csv 文件的单个单元格中写下所有这三个句子,但我希望其中三个在单独的行上。
我的预期输出是:
Sample sentence 1.
This is second sample sentence.
and this is third sentence.
目前我正在尝试通过在两个句子之间使用\n 字符来实现这一点,但是当我这样做时,所有三个句子都在单独的行中。
谁能告诉我如何解决这个问题?
【问题讨论】: