匯入文字

設定分隔資料的匯入選項。

若要使用此指令...

選擇 [檔案] - [開啟舊檔],然後在 [檔案類型] 中選取:[文字 CSV]

選擇 [資料] - [資料剖析] (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

選取要分隔文字資料的字元。您也可以在此文字方塊中輸入字元。

其他選項

設定其他匯入選項。

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, time, and scientific notation.

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

When this option is disabled, Calc will detect and convert only decimal numbers. The rest, including numbers formatted in scientific notation, 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

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.

欄位

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

類型

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 自行決定類型。

文字

匯入當作文字的資料。

日期 (DMY)

使用套用在匯入欄位資料上的日期格式(日、月、年)。

日期 (MDY)

使用套用在匯入欄位資料上的日期格式(日、月、年)。

日期 (YMD)

使用套用在匯入欄位資料上的日期格式(日、月、年)。

美式英語

會搜尋以美式英語格式化的數字,並不受制於系統語言而加以套用。因此不會設定任何數字格式。不含美式英語所格式化數字的條目會如同在「標準」下一般加以處理。

隱藏

這些資料將不會被匯入。


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

字元數目

日期格式

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.

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

不用滑鼠操作

其他有關篩選的資訊,請參閱 匯入和匯出篩選的資訊