Text Import

设置带分隔符的数据的导入选项。

要访问此命令...

Choose File - Open - File type, select Text CSV.

Choose Data - Text to Columns (Calc).

Copy data to clipboard, then choose Edit - Paste Special - Paste Special (Calc).


导入

字符集

指定导入文件所使用的字符集。

语言

决定如何导入数字字符串。

如果「语言」设为「默认」(CSV 导入) 或「自动」(HTML 导入),Calc 将使用所设置的全局语言。如果「语言」设为特定语言,该语言将被用于导入数字。

导入 HTML 文档时,「语言」选择可能会与全局 HTML 选项 对数据使用「英语 (美国)」区域设置 冲突。全局 HTML 选项仅当选择「自动」语言选项时有效。如果您在「HTML 导入选项」对话框中选择特定的语言,将忽略全局 HTML 选项。

起始行号

指定开始进行导入的行。在对话框底部的预览窗口中可以看到该行。

分隔选项

指定数据是否使用分隔符或固定宽度作为分界符。

固定的宽度

将宽度固定的数据 (相等字符数) 分隔成列。点击预览窗口中的标尺以设置宽度。

分隔方式

选择用来分隔数据的分隔符。

制表符

将制表符分隔的数据分隔为列。

分号

使用分号将数据分隔成列。

逗号

将使用逗号分隔的数据分隔为列。

空格

将使用空格分隔的数据分隔成列。

其他

使用您指定的自定义分隔符将数据分隔成列。注意: 数据中必须含有自定义的分隔符。

合并分隔符

合并连续出现的分隔符,删除空白的数据字段。

删除首尾空格

从数据字段删除开头与结尾的空格。

字符串分隔符

选择一个用于分隔文本数据的字符。您也可以在文本框中输入一个字符。

其他选项

设置一些其他导入选项。

将引用字段格式化为文本

启用本选项后,值以其实体引用 (首尾字符与文本定义符相同) 的字段或单元格将作为文本导入。

侦测特殊数字

When this option is enabled, Calc will automatically detect all number formats, including special number formats such as dates and time. Scientific notation will also be detected as Detect scientific notation option must be enabled at the same time.

所选语言将影响特殊数字如何侦测,因为不同语言与区域对此类特殊数字有不同的习惯。

When this option is disabled, Calc will detect and convert only numbers in decimal notation. Detection of numbers in scientific notation will depend on Detect scientific notation option. The rest will be imported as text. A decimal number string can have digits 0-9, thousands separators, and a decimal separator. Thousands separators and decimal separators may vary with the selected language and region.

Detect scientific notation

When this option is enabled, Calc will automatically detect numbers with scientific notation, like 5E2 for 500.

The selected language influences how scientific notation is detected, since different languages and regions many have different decimal separator.

This option can be disabled only if Detect special numbers option is previously disabled.

When this option is disabled, Calc will detect and convert only numbers in decimal notation. The rest will be imported as text. A decimal number string can have digits 0-9, thousands separators, and a decimal separator. Thousands separators and decimal separators may vary with the selected language and region.

跳过空白单元格

Available when using Paste Special: when this option is enabled, Calc preserves previous content of cells when pasting empty ones. Otherwise, Calc deletes content of previous cells.

在「文本分列」转换中,如果单元格内容以分隔符开头,且本选项已禁用,则第一列将被清空。

Evaluate formulas

Determines whether formula expressions starting with a = equal sign character are to be evaluated as formulas or imported as textual data. If checked evaluate formulas on input. Otherwise formulas are input as text.

字段

显示数据被分隔成列之后的外观。

列类型

在预览窗口中选择一列,然后选择导入数据所应用的数据类型。您可以在以下选项中选择一项:

类型

功能

标准

LibreOffice 将自行确定类型。

文本

导入的数据将被当作文字。

日期 (DMY)

对列内的导入数据应用日期格式 (日、月、年)。

日期 (MDY)

对列内的导入数据应用日期格式 (月、日、年)。

日期(YMD)

对列内的导入数据应用日期格式 (年、月、日)。

美国英语

查找美国英语格式的数字,并且不受系统语言的影响而被应用。未应用数字格式。如果没有美国英语条目,则应用「标准」格式。

隐藏

不导入列内的数据。


如果您选择了一种日期格式 (DMY)、(MDY) 或 (YMD),并且输入数字时没用使用分隔符,输入的数字将解释为:

字符的数目

日期格式

6

按照所选择的顺序,每两个字符分别代表日、月和年。

8

按照所选择的顺序,四个字符代表年,其余四个字符两个代表月,两个代表日。

5 或 7

与 6 个或 8 个字符相同,只是序列的第一部分少一个字符。这将压缩掉月份或日期中的一个前置零。


tip

如果您需要保留输入数据 (如电话号码) 中的前置零,请为该列应用「文字」格式。


预览

显示导入的文字分隔成列时的外观。要对导入的列应用某个格式,请点击列并选择「列类型」。当您选择「列类型」时,列标题将显示所应用的格式。

如果要使用固定的宽度将输入的数据分隔成列,请在标尺内点击以设置宽度的边界。

请支持我们!