将双引号定界符添加到csv文件中 [英] Adding double quote delimiters into csv file

查看:197
本文介绍了将双引号定界符添加到csv文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有许多文本文件,其中包含广播节目标题,其中每个项目都位于单独的行上,例如:

I have a number of text files which contain radio programme titles where each item is on a separate line, e.g.:

15 by 15
15 Minute Drama
Adrian Mole
Afternoon Drama
Afternoon Reading
etc

我想在每行中添加双引号作为分隔符,例如:

I would like to add double quotes as delimiters to each line, e.g.:

"15 by 15"
"15 Minute Drama"
"Adrian Mole"
"Afternoon Drama"
"Afternoon Reading"
etc

我认为我也许可以在Excel中执行此操作,但无法找到方法.我真的不介意该解决方案是基于Excel还是其他解决方案,只要我不必手动进行即可.

I thought I might be able to do this in Excel but not been able to find a way. I really don't mind whether the solution is Excel based or something else, as long as I don't have to do it manually.

任何人都可以帮忙吗?

推荐答案

在Excel(或任何电子表格应用程序)中,这实际上非常容易.

This is actually pretty easy in Excel (or any spreadsheet application).

您将要使用以下屏幕截图中的编辑栏所示的=CONCATENATE()函数:

You'll want to use the =CONCATENATE() function as shown in the formula bar in the following screenshot:

步骤1涉及在B列中添加引号

Step 1 involves adding quotes in column B,

第2步涉及指定函数,然后将其复制到C列(到目前为止,您的电子表格应类似于屏幕截图),

Step 2 involves specifying the function and then copying it down column C (by now your spreadsheet should look like the screenshot),

第3步(如果需要公式外部的文本)包括复制C列,右键单击D列,选择选择性粘贴>>粘贴值".然后,D列应包含在C列中计算出的文本.

Step 3 (if you need the text outside of the formula) involves copying column C, right-clicking on column D, choosing Paste Special >> Paste Values. Column D should then contain the text that was calculated in column C.

这篇关于将双引号定界符添加到csv文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆