什么是CSV文件以及如何打开CSV文件格式

什么是CSV文件以及如何打开CSV文件格式Whatisa.csvfile?CSVstandsforCommaSeparatedValues.ACSVfileisaplaintextfilethatstorestablesandspreadsheetinformation.Thecontentsareoftenatableoftext,numbers,ordates.C…

大家好,又见面了,我是你们的朋友全栈君。

What is a .csv file? CSV stands for Comma Separated Values. A CSV file is a plain text file that stores tables and spreadsheet information. The contents are often a table of text, numbers, or dates. CSV files can be easily imported and exported using programs that store data in tables.

什么是.csv文件? CSV代表逗号分隔值。 CSV文件是存储表和电子表格信息的纯文本文件。 内容通常是文本,数字或日期的表。 可以使用将数据存储在表中的程序轻松导入和导出CSV文件。

CSV文件格式 (CSV File Format)

Usually the first line in a CSV file contains the table column labels. Each of the subsequent lines represent a row of the table. Commas separate each cell in the row, which is where the name comes from.

通常,CSV文件的第一行包含表列标签。 随后的每一行代表该表的一行。 逗号分隔行中每个单元格的位置,这是名称的来源。

Here is an example of a CSV file. The example has three columns, labeled ‘name’, ‘id’, and ‘food’. It has five rows including the header row.

这是CSV文件的示例。 该示例包含三列,分别标记为“名称”,“ id”和“食物”。 它有五行,包括标题行。

name, id, favorite food
quincy, 1, hot dogs
beau, 2, cereal
abbey, 3, pizza
mrugesh, 4, ice cream

Here is how that file looks in a spreadsheet.

该文件在电子表格中的外观如下。

Since a CSV file is just a text file, you can create one in almost any text editor. You can also export CSV files from almost any spreadsheet program, such as Microsoft Word, OpenOffice Calc, or Google Sheets.

由于CSV文件只是一个文本文件,因此几乎可以在任何文本编辑器中创建一个CSV文件。 您还可以从几乎任何电子表格程序(例如Microsoft WordOpenOffice CalcGoogle Sheets)导出CSV文件。

如何打开CSV文件 (How to open a CSV file)

Opening a CSV file is simpler than you may think. In almost any text editor or spreadsheet program, just choose File > Open and select the CSV file.

打开CSV文件比您想象的要简单。 在几乎所有文本编辑器或电子表格程序中,只需选择“ 文件”>“打开”,然后选择CSV文件。

For most people, it is best to use a spreadsheet program. Spreadsheet programs display the data in a way that is easier to read and work with than a text editor. We’ll go into more detail on opening a CSV file in Microsoft Excel, OpenOffice Calc, and Google Sheets.

对于大多数人来说,最好使用电子表格程序。 电子表格程序以一种比文本编辑器更易于阅读和使用的方式显示数据。 我们将更详细地介绍如何在Microsoft ExcelOpenOffice CalcGoogle表格中打开CSV文件。

打开CSV文件Microsoft Excel (Open a CSV file Microsoft Excel)

If you already have Microsoft Excel installed, just double-click a CSV file to open it in Excel. After double-clicking the file, you may see a prompt asking which program you want to open it with. Select Microsoft Excel.

如果您已经安装了Microsoft Excel,只需双击一个CSV文件即可在Excel中打开它。 双击文件后,您可能会看到一个提示,询问您要使用哪个程序打开它。 选择Microsoft Excel。

If you are already in Microsoft Excel, you can choose File > Open and select the CSV file. If you don’t see the file you want to open, you may need to change the file type to be opened to “Text Files (*.prn, *.txt, *.csv)”. Excel will display the data in a new workbook.

如果您已经在Microsoft Excel中,则可以选择“ 文件”>“打开”,然后选择CSV文件。 如果看不到要打开的文件,则可能需要将要打开的文件类型更改为“文本文件(* .prn,*。txt,*。csv)”。 Excel将在新工作簿中显示数据。

You can also import data from a CSV file into an existing worksheet.

您也可以将数据从CSV文件导入到现有工作表中。

  1. On the Data tab, in the Get & Transform Data group, click From Text/CSV.

    在“ 数据”选项卡上的“ 获取和转换数据”组中,单击“ 来自文本/ CSV”

  2. In the Import Data dialog box, double-click the CSV file you want to import, and click Import.

    在“ 导入数据”对话框中,双击要导入的CSV文件,然后单击“ 导入”

In the preview dialog box, you have a few options:

在预览对话框中,您有几个选项:

  • Select Load if you want to load the data directly to a new worksheet.

    如果要将数据直接加载到新工作表中,请选择“ 加载”

  • Select Load to if you want to load the data to a table or existing worksheet.

    如果要将数据加载到表或现有工作表中,请选择“ 加载到”

  • Select Transform Data if you want to load the data to Power Query, and edit it before bringing it to Excel.

    如果要将数据加载到Power Query中,请选择“ 转换数据” ,然后在将数据导入Excel之前对其进行编辑。

打开CSV文件OpenOffice Calc (Open a CSV file OpenOffice Calc)

If you already have OpenOffice Calc installed, just double-click a CSV file to open it. After double-clicking the file, you may see a prompt asking which program you want to open it with. Select OpenOffice Calc.

如果您已经安装了OpenOffice Calc,则只需双击一个CSV文件即可将其打开。 双击文件后,您可能会看到一个提示,询问您要使用哪个程序打开它。 选择OpenOffice Calc。

If you are already in OpenOffice Calc, you can choose File > Open and select the CSV file.

如果您已经在OpenOffice Calc中,则可以选择“ 文件”>“打开”,然后选择CSV文件。

打开CSV文件Google表格 (Open a CSV file Google Sheets)

First, open a new spreadsheet file in Google Sheets. The fastest way is to go to https://sheets.new.

首先,在Google表格中打开一个新的电子表格文件。 最快的方法是转到https://sheets.new

Next, select File > Import.

接下来,选择“ 文件”>“导入”

Select the Upload tab, then either drag the CSV file onto the window or select the CSV from your computer.

选择上选项卡,然后将CSV文件拖到窗口上,或从计算机中选择CSV。

You can probably keep the default values on the Import file window, but look over them just to make sure. Then select Import data.

您可能可以将默认值保留在“ 导入文件”窗口中,但是请仔细检查以确保确定。 然后选择导入数据

You’re done!

你完成了!

翻译自: https://www.freecodecamp.org/news/what-is-a-csv-file-and-how-to-open-the-csv-file-format/

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/162487.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 深挖P2P传输技术,升级与创新并举

    深挖P2P传输技术,升级与创新并举你用过P2P传输吗?现在的P2P传输可以说是继局域网、ftp、http之后最广泛使用的文件分享和传播途径,被众多企业运用在工作中。P2P传输,全称“点对点传输”,是一种文件即时传输方式,目标是让所有客户端都能提供资源,包括带宽、存储空间、计算能力。P2P传输技术有很多应用,包括共享各种格式音频、视频、数据等。**P2P传输技术是如何实现即时传输?为什么P2P传输可以被众多企业接受?**本文,我们将带着这两个问题出发,深挖P2P传输技术。一、一张图看懂P2P传输技术传统的http传输是服务器上直接复制

    2022年7月16日
    16
  • 莫兰迪色系表

    莫兰迪色系表莫兰迪色系????它曾因《延禧攻略》的播出而大受追捧它饱和度不高带有几分淡漠疏离的色调却也使得空间柔和自然舒缓雅致展现出静态的和谐之美它别称“高级灰”它也被誉为世界上最舒服的配色它便是莫兰迪色系????莫兰迪色系:高级灰色调。不鲜亮,仿佛蒙了一层灰调,不张不扬,却在整个画面中,相互制约、相互抵消,让视觉达到完美平衡。它给人以平和自持、舒缓雅致,有时略显冷静的感觉,让人越看越喜欢。????颜色效果16进制值RGB值颜色效果

    2022年5月17日
    154
  • uniapp中touchstart、touchmove和touchend在H5中无法触发,可通过jQuery添相应事件代替

    uniapp中touchstart、touchmove和touchend在H5中无法触发,可通过jQuery添相应事件代替uniapp中touchstart、touchmove和touchend在H5中无法触发,可通过jQuery添相应事件代替

    2022年6月19日
    178
  • VMware虚拟机 桥接模式 无法上网 校园网「建议收藏」

    VMware虚拟机 桥接模式 无法上网 校园网「建议收藏」VMware桥接模式桥接模式就是将主机网卡与虚拟机虚拟的网卡利用虚拟网桥进行通信。在桥接的作用下,类似于把物理主机虚拟为一个交换机,所有桥接设置的虚拟机连接到这个交换机的一个接口上,物理主机也同样插在这个交换机当中,所以所有桥接下的网卡与网卡都是交换模式的,相互可以访问而不干扰。在桥接模式下,虚拟机ip地址需要与主机在同一个网段,如果需要联网,则网关与DNS需要与主机网卡一致。无法上网的检查步骤1.VMware中虚拟网络编辑器设置桥接网卡在“编辑”——“虚拟网络编辑器”里进.

    2022年6月7日
    126
  • HP发布Jenkins最新UFT开源插件

    HP发布Jenkins最新UFT开源插件就在UFT11.5发布之时,HP同时也发布了针对UFT的Jenkins开源插件1)通过此插件可以运行来自HPALM/QC或本地存储的测试脚本2)你可以选择多个指定脚本甚至是文件夹3)此插件会运行文件夹下的所有测试脚本4)在build机上可以通过配置运行测试脚本5)当然也可在远程机器上指定6)如果你的测试脚本存储在HPALM/QC的测试集中,则可以通过配置jenkins运

    2022年5月28日
    54
  • pycharm常见镜像源「建议收藏」

    pycharm常见镜像源「建议收藏」清华:https://pypi.tuna.tsinghua.edu.cn/simple阿里云:http://mirrors.aliyun.com/pypi/simple/中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/使用:pipinstall-i镜像源包…

    2022年8月27日
    6

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号