InDesign 段落从 CSV 文件返回字符?
我目前正在使用 ID CS4 的数据合并功能来导入从 MySQL 数据库导出的一些数据。虽然我可以设置 ID 来删除空行,但这并不总是适合我的目的,因为后面的行包含数据。结果,输出的数据中仍然出现空格。
由于我使用 PHP 生成 CSV 文件,所以我的问题是:我是否可以在 CSV 文件中指示 InDesign Paragraph Return 字符,以便可以按照我的意愿依次导入和显示数据。
例如,我尝试了以下示例,但似乎没有任何效果:
"code","description"
"12345", "Hardware\nTools"
"code","description"
"12345","Hardware \Z Tools"
任何帮助将不胜感激!
I am currently using the Data Merge functions of ID CS4 to import some data I have exported from a MySQL database. Although I can set ID to remove blank lines, this doesn't always work for my purpose because later lines contain data. As a result, there still appears whitespace in the outputted data.
Since I am using PHP to produce the CSV file, my question is this: is it possible for me to indicate an InDesign Paragraph Return character within the CSV file, so that the data can then in turn be imported and displayed as I wish.
For example, I have the tried the following examples, but nothing seems to work:
"code","description"
"12345", "Hardware\nTools"
"code","description"
"12345","Hardware \Z Tools"
Any help would be gratefully appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不知道为什么第一个答案被接受,因为它是错误的。
谷歌仍然把这个线程放在第三位“数据合并设计换行符”,所以我想我必须给出一个真正的答案。
没有什么神奇的字符可以放入 CSV 文件中以在 InDesign 中自动生成换行符。
Adobe InDesign 帮助指定:
如果您的行数是可变的,或者您不想仅为某些换行符创建额外的列,则只有一种解决方案:
¤< /code> 例如),它将充当行分隔符。
我希望这能够真正帮助那些像我一样在 InDesign 中遇到换行问题的人。
Not sure why the first answer was accepted, as it is wrong.
Google still brings this thread in third position for "data merge indesign line break", so I thought I had to give a real anwser.
There is no magical character you can put in your CSV file to automatically generate line breaks in InDesign.
The Adobe Help for InDesign specifies :
If your number of lines is variable or if you don't want to create extra columns just for some line breaks, there is only one solution :
¤
for example) that would act as a line separator.I hope this will really help those who struggled like me with these line breaks in InDesign.
根据此PDF,在IDML中您可以指定一个使用
进行“强制换行”,或者使用
强制进行“段落换行”。我不确定这是否正是您正在寻找的,但您也许可以尝试一下。
希望这有帮助!
According to this PDF, in IDML you can specify a "forced line break" by using
, or you can force a "Paragraph break" by using
<br/>
.I'm not sure if this is exactly what you're looking for but you may be able to give it a try.
Hope this helps!