匯入文字

Contents

# 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).

## 匯入

### 字型

指定匯入的檔案中所要使用的字元集。

### 語言

決定數字串該怎麼匯入。

If Language is set to Default (for CSV import) or Automatic (for HTML import), Calc will use the globally set language. If Language is set to a specific language, that language will be used when importing numbers.

When importing an HTML document, the Language selection can conflict with the global HTML option Use 'English (USA)' locale for numbers. The global HTML option is effective only when the Automatic language option is selected. If you select a specific language in the HTML Import Options dialog, the global HTML option is ignored.

### 開始的列數

指定從哪一列開始匯入。這些列在對話方塊底端的預覽視窗中顯示。

## 分隔選項

指定資料是使用分隔符號還是固定寬度作為分割元。

### 固定的寬度

將固定寬度的資料（相等字元數）分隔為欄。 按一下預覽視窗中的尺規以設定寬度。

### 分隔

選取資料中使用的分隔符。

### 定位鍵

將用定位鍵分隔的資料分隔為欄。

### 分號

將用分號分隔的資料分隔成欄。

### 逗號

將用逗號分隔的資料分隔為欄。

### 空格

將空格所分隔的資料分隔成欄。

### 其他

Separates data into columns using the custom separator that you specify. Note: The custom separator must also be contained in your data.

### 壓縮顯示

合併連續的分隔符並移除空白資料欄位。

### Trim spaces

Removes starting and trailing spaces from data fields.

### String delimiter

Select a character to delimit text data. You can also enter a character in the text box.

## 其他選項

設定其他匯入選項。

### Format quoted field as text

When this option is enabled, fields or cells whose values are quoted in their entirety (the first and last characters of the value equal the text delimiter) are imported as text.

### Detect special numbers

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.

The selected language influences how such special numbers are detected, since different languages and regions may have different conventions for such special numbers.

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 may 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.

### Skip empty cells

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.

In Text to Columns conversion, if cell content begins with a separator and this option is disabled, then first column will be emptied.

### 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.

## 欄位

預覽視窗中顯示分隔之後的欄位。

### 類型

Choose a column in the preview window and select the data type to be applied the imported data. You can select one of the following options:

類型 | 函式
--- | ---
標準 | LibreOffice 自行決定類型。
文字 | The imported data is treated as text.
日期 (DMY) | The imported data is assumed as Day, Month and Year (in this order).
日期 (MDY) | The imported data is assumed as Month, Day and Year (in this order).
日期 (YMD) | The imported data is assumed as Year, Month and Day (in this order).
美式英語 | The imported numbers are interpreted using the US English locale, irrespective of the locale selected in the Locale combobox above.
隱藏 | The data in the column is not imported.

如果選取一個日期格式(日月年、月日年、年月日)和不附加日期分隔符號的數字，程式就會下列的方式來解讀：

字元數目 | 日期格式
--- | ---
6 | 按照格式的順序，採用兩個字母各代表日、月和年。
8 | 按照格式的順序，採用四個字母來代表年、兩個字母各自代表日和月。
5 或 7 | 就像使用 6 或 8 個字母一樣，第一部分少了一個字母。這是爲了不使用日和月之前的零。

如果匯入可能出現前置零的數字欄位 (電話號碼、郵遞區號)，則請設定使用「文字」格式。

### 預覽

Shows how the imported text will look after it is separated into columns. To apply a format to a column when it is imported, click a column and select a Column type. When you select a Column type, the column heading displays the applied format.

如果要使用固定的欄位寬度來顯示資料，就按一下調節欄位寬度的尺標。

相關主題

不用滑鼠操作

Information about Import and Export Filters.

開啟並儲存文字 CSV 檔案

匯入與匯出具有公式的 CSV 文字檔

CSV Filter Options