Contents

# Referencing a Cell in Another Sheet

您可以在試算表儲存格中顯示其他試算表內儲存格的參照。

同理，如果其他文件已儲存為檔案，此文件的儲存格也可建立參照。

## 參照相同文件的儲存格

1. Open a new, empty spreadsheet. By default, it has only a single sheet named Sheet1. Add a second sheet clicking on + button to the left of the sheet tab in the bottom (it will be named Sheet2 by default).

2. 例如，在 Sheet1 的儲存格 A1 中輸入以下公式：

   =Sheet2.A1

3. 按一下試算表底部的 Sheet 2 標籤。將游標置於該試算表的儲存格 A1 中，並輸入文字或數字。

4. 如果切換回 Sheet1，該試算表的儲存格 A1 中將會顯示相同的內容。一旦Sheet2.A1 的內容有所變更，則 Sheet1.A1 的內容也會隨之變更。

When referencing a sheet with name containing spaces, use single quotes around the name: ='Sheet with spaces in name'.A1

The example uses Calc formula syntax. It is also possible to use Excel A1 or R1C1 formula syntax; this is configured on Formula options page.

## 參照其他文件的儲存格

1. 選擇 [檔案] - [開啟舊檔]，載入現有的試算表文件。

2. 選擇 [檔案] - [開啟新檔] 以開啟新的試算表文件。將游標置於要插入外部資料的儲存格中，並輸入等號表示開始輸入公式。

3. 現在會切換至您剛才載入的文件。按一下包含您想在新文件中插入的資料之儲存格。

4. 切換回新試算表。現在您在輸入行中將會看到 LibreOffice Calc 已為您新增參照到公式中。

   The reference to a cell of another document contains the fully qualified name of the other document between single quotes ('), then a hash #, then the name of the sheet of the other document, followed by a period and the name or reference of the cell.

   For example, 'file:///C:/Users/user/Documents/Price list.ods'#$'Information SKU'.H51'file:///home/user/Documents/Price list.ods'#$'Information SKU'.H51.

   The path and document name URI must always be enclosed in single quotes. If the name contains single quotes (') they must be escaped using two single quotes (''). Only a sheet name may not be quoted if it does not contain a space or a character that would be an operator or the name would be pure numeric (for example, '123' must be quoted).

5. 請按一下綠色核取標記即可確認此公式

6. If you drag the box in the lower right corner of the active cell to select a range of cells, LibreOffice automatically inserts the corresponding references in the adjacent cells. As a result, the sheet name is preceded with a "$" sign to designate it as an absolute reference.

如果您在此公式中檢查其他文件的名稱，將會注意到該名稱會撰寫為 URL。這表示您也可以輸入一個網際網路 URL。

相關主題

Referencing URLs in other Sheets

位址和參照, 絕對和相對

Please support us!