引用其他工作表

在一个工作表单元格中,可以显示对另一个工作表中的单元格的引用。

类似地,也可以从另一个文档中引用单元格,但前提是已将此文档另存为文件。

引用同一文档中的单元格

  1. 新建一个空白电子表格。默认设置下,其中只有一个名为「工作表1」的工作表。点击下方工作表标签左边的「+」按钮来添加第二个工作表(默认会命名为「工作表2」)。

  2. 例如,在「工作表1」的单元格 A1 中输入以下公式:

    =工作表2.A1

  3. 点击电子表格底部的「工作表2」标签。将光标置于单元格 A1 内并输入文本或数字。

  4. 再切换回「工作表1」,则会在 A1 单元格内看到相同的内容。如果修改「工作表2.A1」中的内容,则「工作表1.A1」中的内容也会改变。

tip

如果要引用的工作表名称中含有空格,就要在名称两端加半角引号:='名称 带空格 的 工作表'.A1


tip

上面的示例使用的是 Calc 的公式语法。使用「Excel A1」或「Excel R1C1」规格的公式语法也是可以的,需要在「公式」选项页中设置。


引用其他文档中的单元格

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

    note

    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 格式。这意味着,也可以输入 Internet 中的 URL。

请支持我们!