Calc:链接到外部数据

出自OOo 中文指南手册翻译

跳转到: 导航, 搜索

目录

You can insert tables from HTML documents, and data located within named ranges from an OpenOffice.org Calc or Microsoft Excel spreadsheet, into a Calc spreadsheet.

You can do this in two ways: using the External Data dialog or using the Navigator. If your file has named ranges or named tables, and you know the name of the range or table you want to link to, using the External Data dialog method is quick and easy. However, if the file has several tables, and you want to pick only one of them, you may not be able to easily determine which is which; in that case, the Navigator method may be easier.

[编辑] Using the External Data dialog

  1. Open the Calc document where the external data is to be inserted. This is the target document.
  2. Select the cell where the upper left-hand cell of the external data is to be inserted.
  3. Choose Insert > Link to External Data.
  4. On the External Data dialog, type the URL of the source document or click the [...] button to open a file selection dialog. Press </nowiki>Enter to get Calc to load the list of available tables.
  5. In the Available tables/range list, select the named ranges or tables you want to insert. You can also specify that the ranges or tables are updated every n seconds.
  6. Click OK to save and close this dialog.
Image:documentation_note.png The Available tables/ranges list remains empty until you press Enter after selecting the URL of the source.
  


Image:documentation_note.png The OK button remains unavailable (greyed out) until you select one or more tables/ranges in the list. You can hold down the Control key while clicking on tables/ranges to select more than one.
  


Image:documentation_note.png No images are imported.
  


File:CG3Ch9F20.png
Selecting a table or range in a source document from the Web

[编辑] Using the Navigator

  1. Open the OpenOffice.org Calc spreadsheet in which the external data is to be inserted (target document).
  2. Open the document from which the external data is to be taken (source document). Choose Web Page Query (OpenOffice.org Calc) as the file type.
  3. File:CG3Ch9F21.png
    Opening a file using the Web Page Query filter
  4. In the target document, open the Navigator.
  5. At the bottom of the Navigator, select the source document. (In the example below, the source is named actives.) The Navigator now shows the range names or the tables contained in the source document (the example contains range names; other documents have a list of tables). Click on the + next to Range names to display the list.
  6. In the Navigator, select the Insert as Link drag mode, as shown below.
  7. File:CG3Ch9F22.png
    Selecting a data range in a source document, to be inserted as a link
  8. Select the required range or table and drag it from the Navigator into the target document, to the cell where you want the upper left-hand cell of the data range to be.
  9. In the target document, check the Navigator. Instead of a + by Range names, it shows a + by Linked areas. Click the + to see the same range name.
  10. File:CG3Ch9F23.png
    Linked areas in target spreadsheet

[编辑] How to find the required data range or table

The examples above show that the import filter gave names to the data rangers (tables) in the sample web page starting from HTML_1. It also created two additional range names (not visible in the illustration):

HTML_all – designates the entire document

HTML_tables – designates all HTML tables in the document

If the data tables in the source HTML document have been given names (using the ID attribute on the TABLE tag), or the external spreadsheet includes named ranges, those names appear in the list along with the ranges Calc has sequentially numbered.

If the data range or table you want is not named, how can you tell which one to select?

Go to the source document, which you opened in Calc using the Web Page Query filter. Select the range you want. Look in the Navigator: the range name is highlighted.

File:CG3Ch9F24.png
Using the Navigator to find a data range name

If the Formula Bar is visible, the range name is also displayed in the Name box at the left-hand end.

File:CG3Ch9F25.png
Using the Name box to find a data range name

[编辑] 进度表

Calc:链接到外部数据 中文化进度 翻译 0 校对 0 插图 / 上次编辑 20091102185628 编者 PingjuOOo

[编辑] 相关链接

本文原文

个人工具