0% found this document useful (0 votes)
71 views31 pages

0310CG3 LinkingCalcData

PDF is designed to be read onscreen, two pages at a time. If you want to print a copy, your PDF viewer should have an option for printing two pages on one sheet of paper. This document is!opyright (c) 2""#$2"%" by its contributors as listed in the section titled Authors.

Uploaded by

ARUN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views31 pages

0310CG3 LinkingCalcData

PDF is designed to be read onscreen, two pages at a time. If you want to print a copy, your PDF viewer should have an option for printing two pages on one sheet of paper. This document is!opyright (c) 2""#$2"%" by its contributors as listed in the section titled Authors.

Uploaded by

ARUN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 31

Calc Guide

Chapter 10
Linking Calc Data
Sharing data in and out of Calc
This PDF is designed to be read onscreen, two pages at a
time. If you want to print a copy, your PDF viewer should
have an option for printing two pages on one sheet of
paper, but you may need to start with page 2 to get it to
print facing pages correctly. (Print this cover page
separately.
Copyright
This document is !opyright 2""#$2"%" by its contributors as listed
in the section titled Authors. &ou may distribute it and'or modify it
under the terms of either the ()* (eneral Public +icense, version , or
later, or the !reative !ommons -ttribution +icense, version ,." or
later.
-ll trademar.s within this guide belong to their legitimate owners.
Authors
/ohn 0ane
Peter 0upfer
Iain 1oberts
1ob 2cott
)i.ita Telang
/ean 3ollis 4eber
/ames -ndrew
!laire 4ood
Feedback
Please direct any comments or suggestions about this document to5
authors6documentation.openoffice.org
Publication date and software version
Published %7 /une 2"%". 8ased on 9pen9ffice.org ,.2.
You can download
an editable version of this document from
http://oooauthors.org/english/userguide3/published/
Contents
!opyright.................................................................................................2
4hy use multiple sheets:........................................................................;
2etting up multiple sheets.......................................................................;
Identifying sheets.................................................................................;
Inserting new sheets............................................................................#
Inserting sheets from a different spreadsheet.....................................7
1enaming sheets...................................................................................<
1eferencing other sheets.........................................................................=
!reating the reference with the mouse...............................................=
!reating the reference with the .eyboard.........................................%%
1eferencing other documents...............................................................%%
!reating the reference with the mouse.............................................%%
!reating the reference with the .eyboard.........................................%2
3yperlin.s and *1+s.............................................................................%,
1elative and absolute hyperlin.s.......................................................%,
!reating hyperlin.s............................................................................%>
?diting hyperlin.s...............................................................................%#
1emoving hyperlin.s..........................................................................%#
+in.ing to e@ternal data.........................................................................%7
*sing the ?@ternal Data dialog..........................................................%7
*sing the )avigator...........................................................................%<
3ow to find the reAuired data range or table....................................2"
+in.ing to registered data sources........................................................22
Biewing data sources..........................................................................2>
?diting data sources...........................................................................2>
+aunching 8ase to wor. on data sources...........................................2;
*sing data sources in !alc spreadsheets...........................................2;
?mbedding spreadsheets.......................................................................2#
9bCect +in.ing and ?mbedding (9+?...............................................2#
9ther 9+? obCects...........................................................................2<
)onDlin.ed 9+? obCect....................................................................2=
Linking Calc ata 3
+in.ed 9+? obCect...........................................................................2=
Dynamic Data ?@change (DD?..........................................................,"
DD? lin. in !alc..............................................................................,"
DD? lin. in 4riter...........................................................................,%
! Linking Calc ata
Why use multiple sheets?
!hapter % introduced the concept of multiple sheets in a spreadsheet.
Eultiple sheets help .eep information organiFedG once you lin. those
sheets together, you unleash the full power of !alc. !onsider this case.
/ohn is having trouble .eeping trac. of his personal
finances. 3e has several ban. accounts and the information
is scattered and disorganiFed. 3e canHt get a good grasp on
his finances until he can see everything at once.
To resolve this, /ohn decided to trac. his finances in 99o
!alc. /ohn .nows !alc can do simple mathematical
computations to help him .eep a running tab of his
accounts, and he wants to set up a summary sheet so that
he can see all of his account balances at once.
This can be accomplished easily.
Note
For users with e@perience using Eicrosoft ?@cel, a !alc sheet is
called either a sheet or worksheet in ?@cel. 4hat ?@cel calls a
workbook, !alc calls a spreadsheet (the whole document.
Setting up multiple sheets
!hapter % gives a detailed e@planation of how to set up multiple sheets
in a spreadsheet. 3ere is a Auic. review.
dentifying sheets
4hen you open a new spreadsheet it has, by default, three sheets
named Sheet", Sheet#, and Sheet3. 2heets in !alc are managed using
tabs at the bottom of the spreadsheet, as shown below.
$igure ": efault sheet tabs
Setting up multiple sheets %
nserting new sheets
There are several ways to insert a new sheet. The first step, in all
cases, is to select the sheet that will be ne@t to the new sheet. Then do
any of the following5
I 2elect Insert > Sheet from the menu bar, or
I 1ightDclic. on the tab and select Insert Sheet, or
I !lic. in an empty space at the end of the line of sheet tabs.
$igure #: Creating a new sheet
?ach method opens the Insert 2heet dialog. 3ere you can choose to
put the new sheet before or after the selected sheet and how many
sheets to insert.
$igure 3. &nsert Sheet dialog
' Linking Calc ata
!lic. here to
create a new
sheet
4e need # sheets, one for each of the ; accounts and one as a
summary sheet so we will add , more. 4e also want to name each of
these sheets for the account they represent5 2ummary, !hec.ing
-ccount, 2avings -ccount, !redit !ard %, !redit !ard 2, and !ar +oan.
4e have two choices5 insert , new sheets and rename all # sheets
afterwardsG or rename the e@isting sheets, then insert the , new
sheets one at a time, renaming each new sheet during the insert step.
To insert sheets and rename afterwards5
% In the Insert 2heet dialog, choose the position for the new sheets
(in this e@ample, we use After current sheet.
2 !hoose New sheet and 3 as the (o. of sheets. (Three sheets are
already provided by default. 8ecause you are inserting more than
one sheet, the (ame bo@ is not available.
, !lic. OK to insert the sheets.
> For the ne@t steps, go to J1enaming sheetsK on page <.
To insert sheets and name them at the same time5
% 1ename the e@isting sheets 2ummary, !hec.ing -ccount, and
2avings -ccount, as described in J1enaming sheetsK on page <.
2 In the Insert 2heet dialog, choose the position for the first new
sheet.
, !hoose New sheet and % as the (o. of sheets. The (ame bo@ is
now available.
> In the Name bo@, type a name for this new sheet, for e@ample
Credit Card 1.
; !lic. OK to insert the sheet.
# 1epeat steps %$> for each new sheet, giving them the names
!redit !ard 2 and !ar +oan.
nserting sheets from a different spreadsheet
9n the Insert 2heet dialog, you can also add a sheet from a different
spreadsheet file (for e@ample, another !alc or ?@cel spreadsheet, by
choosing the From file option. !lic. Browse and select the fileG a list
of the available sheets appears in the bo@. 2elect the sheet to import.
If, after you select the file, no sheets appear you probably selected an
invalid file type (not a spreadsheet, for e@ample.
Setting up multiple sheets )
!ip
For a shortcut to inserting a sheet from another file, choose
Insert > Sheet from file from the menu bar. The Insert 2heet
dialog opens with the From file option preselected, and then the
Insert dialog opens on top of it.
If you prefer, select the Link option to insert the e@ternal sheet as a
lin. instead as a copy. This is one of several ways to include JliveK data
from another spreadsheet. (2ee also J+in.ing to e@ternal dataK on page
%7. The lin.s can be updated manually to show the current contents of
the e@ternal fileG or, depending on the options you have selected in
Tools > Options > OpenOffice.or !alc > "eneral > #p$atin,
whenever the file is opened.
"enaming sheets
2heets can be renamed at any time. To give a sheet a more meaningful
name5
I ?nter the name in the name bo@ when you create the sheet, or
I Double clic. on the sheet tab, or
I 1ightDclic. on a sheet tab, select %ename Sheet from the popDup
menu and replace the e@isting name.
Note
If you want to save the spreadsheet to Eicrosoft ?@cel format,
the following characters are not allowed in sheet names5 L ' : M N O
5 and P as the first or last character of the name.
&our sheet tab area should now loo. li.e this.
$igure !: Si* renamed sheets
)ow we will set up the account ledgers. This is Cust a simple summary
that includes the previous balance plus the amount of the current
transaction. For withdrawals, we enter the current transaction as a
negative number so the balance gets smaller. - basic ledger is shown
in Figure ;.
This ledger is set up in the sheet named Checking +ccount. The total
balance is added up in cell F,. &ou can see the eAuation for it in the
formula bar. It is the summary of the opening balance, cell !,, and all
of the subseAuent transactions.
, Linking Calc ata
$igure %: Checking ledger
"eferencing other sheets
9n the Summar- sheet we display the balance from each of the other
sheets. If you copy the e@ample in Figure ; onto each account, the
current balances will be in cell F, of each sheet.
There are two ways to reference cells in other sheets5 by entering the
formula directly using the .eyboard or by using the mouse. 4e will
loo. at the mouse method first.
Creating the reference with the mouse
9n the Summar- sheet, set up a place for all five account balances, so
we .now where to put the cell reference. Figure # shows a summary
sheet with a blan. 8alance column. 4e want to place the reference for
the chec.ing account balance in cell 8,.
$igure ': .lank summar-
To ma.e the cell reference in cell 8,, select the cell and follow these
steps.
% !lic. on the & icon ne@t to the input line. The icons change and
an eAuals sign appears in the input line as in Figure 7.
/eferencing other sheets 0
$igure ): 12ual sign in input line
2 )ow, clic. on the sheet tab for the sheet containing the cell to be
referenced. In this case, that is the Checking +ccount sheet as
shown in Figure <.
$igure ,: Click on the checking account tab
, !lic. on cell F, (where the balance is in the Checking +ccount
sheet. The phrase Q!hec.ing -ccountH.F, should appear in the
input line as in Figure =.
$igure 0: Cell reference selected
> !lic. the green chec.mar. in the input line to finish.
; The Summar- sheet should now loo. li.e Figure %".
$igure "3: $inished checking account reference
"3 Linking Calc ata
Creating the reference with the keyboard
From Figure %", you can deduce how the cell reference is constructed.
The reference has two parts5 the sheet name (4Checking +ccount5 and
the cell reference ($3. )otice that they are separated by a period.
Note
The sheet name is in single Auotes because it contains a space,
and the mandatory period (. always falls outside any Auotes.
2o, you can fill in the 2avings -ccount cell reference by Cust typing it
in. -ssuming that the balance is in the same cell ($3 in the Savings
+ccount sheet, the cell reference should be 65Savings +ccount5.$3 (see
Figure %%.
$igure "": Savings account reference
"eferencing other documents
/ohn decides to .eep his family account information in a different
spreadsheet file from his own summary. Fortunately !alc can lin.
different files together. The process is the same as described for
different sheets in a single spreadsheet, but we add one more step to
indicate which file the sheet is in.
Creating the reference with the mouse
To create the reference with the mouse, both spreadsheets need to be
open. 2elect the cell in which the formula is going to be entered.
% !lic. the R icon ne@t to the input line.
/eferencing other documents ""
2 2witch to the other spreadsheet (the process to do this will vary
depending on which operating system you are using.
, 2elect the sheet (Savings +ccount and then the reference cell
($3.

$igure "#: Selecting the savings account reference cell
> 2witch bac. to the original spreadsheet.
; !lic. on the green chec. mar. on the input line.
&our spreadsheet should now resemble Figure %,.
$igure "3: Linked files
&ou will get a good feel for the format of the reference if you loo.
closely at the input line. 8ased on this line you can create the
reference using the .eyboard.
Creating the reference with the keyboard
Typing the reference is simple once you .now the format the reference
ta.es. The reference has three parts to it5
I Path and file name
I 2heet name
I !ell
+oo.ing at Figure %, you can see the the general format for the
reference is
=file:///Path & File Name#$SheetName.CellName
"# Linking Calc ata
Note
The reference for a file has three forward slashes /// and the
reference for a hyperlin. has two forward slashes //.
#yperlinks and $"%s
3yperlin.s can be used in !alc to Cump to a different location from
within a spreadsheet and can lead to other parts of the current file, to
different files or even to web sites.
"elative and absolute hyperlinks
3yperlin.s can be stored within your file as either relative or absolute.
- relative hyperlin. says, 7ere is how to get there starting from where
-ou are now (meaning from the folder in which your current document
is saved while an absolute hyperlin. says, 7ere is how to get there no
matter where -ou start from.
-n absolute lin. will stop wor.ing only if the target is moved. - relative lin. will
stop wor.ing only if the start and target locations change relative to each other.
For instance, if you have two spreadsheets in the same folder lin.ed to each other
and you move the entire folder to a new location, a relative hyperlin. will not
brea..
To change the way that 99o stores the hyperlin.s in your file, select
Tools > Options > Loa$'Sa(e > "eneral and choose if you want
*1+s saved relatively when referencing the $ile S-stem, or the
&nternet, or both.
!alc will always display an absolute hyperlin.. DonHt be alarmed when
it does this even when you have saved a relative hyperlin.Sthis
QabsoluteH target address will be updated if you move the file.
Note
Ea.e sure that the folder structure on your computer is the
same as the file structure on your web server if you save your
lin.s as relative to the file system and you are going to upload
pages to the Internet.
!ip
4hen you rest the mouse pointer on a hyperlin., a help tip
displays the absolute reference, since 99o uses absolute path
names internally. The complete path and address can only be
seen when you view the result of the 3TE+ e@port (saving the
spreadsheet as an 3TE+ file, by loading the 3TE+ file as Te@t,
or by opening it with a te@t editor.
7-perlinks and 8/Ls "3
Creating hyperlinks
4hen you type te@t that can be used as a hyperlin. (such as a website
address or *1+, !alc formats it automatically, creating the hyperlin.
and applying to the te@t a color and bac.ground shading. If this does
not happen, you can enable this feature using Tools > Auto!orrect
Options > Options and selecting #%L %econition.
!ips
To change the color of hyperlin.s, go to Tools > Options >
OpenOffice.or > Appearance, scroll to 8nvisited links and'or
9isited links, pic. the new colors and clic. OK. !aution5 this will
change the color for all hyperlin.s in all components of
9pen9ffice.orgSthis may not be what you want.
&ou can also insert and modify lin.s using the 3yperlin. dialog. To
display the dialog, clic. the )*perlink icon on the 2tandard
toolbar or choose Insert > )*perlink from the menu bar. To turn
e@isting te@t into a lin., highlight it before opening the dialog.
$igure "!. 7-perlink dialog showing details for &nternet links
9n the left side, select one of the four categories of hyperlin.s5
I Internet5 the hyperlin. points to a web address, normally
starting with http5''
I +ail , News5 the hyperlin. opens an email message that the
preDaddressed to a particular recipient
I -ocument5 the hyperlin. points to a place in either the current
document or another e@isting document
I New $ocument5 the hyperlin. creates a new document.
"! Linking Calc ata
The top right part of the dialog changes according to the choice made
for the hyperlin. category from the left panel. - full description of all
the choices, and their interactions, is beyond the scope of this chapter.
3ere is a summary of the most common choices used in spreadsheets.
For an &nternet hyperlin., choose the type of hyperlin. (4eb, FTP, or
Telnet, and enter the reAuired web address (*1+.
For a :ail and (ews hyperlin., specify whether it is a mail or news
lin., the receiver address and for email, also the subCect.
For a ocument hyperlin., specify the document path (the Open File
button opens a file browserG leave this blan. if you want to lin. to a
target in the same spreadsheet. 9ptionally specify the target in the
document (for e@ample a specific sheet. !lic. on the Taret in
$ocument icon to open the )avigator where you can select the target,
or if you .now the name of the target, you can type it into the bo@.
For a (ew ocument hyperlin., specify whether to edit the newly
created document immediately (.$it now or Cust create it (.$it
later, and enter the file name and the type of document to create
(te@t, spreadsheet, etc.. The Select path button opens a directory
pic.er dialog.
The $urther settings section in the bottom right of the dialog is
common to all the hyperlin. categories, although some choices are
more relevant to some types of lin.s.
I 2et the value of Frame to determine how the hyperlin. will open.
This applies to documents that open in a 4eb browser.
I Form specifies if the lin. is to be presented as te@t or as a button.
Figure %; shows a lin. formatted as a button.
$igure "%: ;;o +uthors h-perlink as button
I Te/t specifies the te@t that will be visible to the user. If you do not
enter anything here, !alc will use the full *1+ or path as the lin.
te@t. )ote that if the lin. is relative and you move the file, this
te@t will not change, though the target will.
7-perlinks and 8/Ls "%
I Name is applicable to 3TE+ documents. It specifies te@t that will
be added as a NAME attribute in the 3TE+ code behind the
hyperlin..
I .(ents button5 this button will be activated to allow !alc to react
to events for which the user has written some code (macro. This
function is not covered in this chapter.
Note
- hyperlin. button is a type of form control. -s with all form
controls, it can be anchored or positioned by rightDclic.ing on the
button in design mode. Eore information about forms can be
found in !hapter %; of the <riter Guide.
For the button to wor. , the spreadsheet must not be in design
mode. To toggle design mode on and off, view the Form !ontrols
toolbar (0iew > Tool1ars > Form !ontrols and clic. the
-esin +o$e On'Off button .
&diting hyperlinks
To edit an e@isting lin., place the cursor anywhere in the lin. and clic.
the 3yperlin. icon on the 2tandard toolbar or select Insert >
)*perlink from the menu bar. The 3yperlin. dialog (Figure %> opens.
If the 3yperlin. is in button form, the spreadsheet must have Design
Eode on in order to edit the 3yperlin.. Ea.e your changes and clic.
Appl*. If you need to edit several hyperlin.s, you can leave the
3yperlin. dialog open until you have edited all of them. 8e sure to
clic. Appl* after each one. 4hen you are finished, clic. !lose.
"emoving hyperlinks
&ou can remove the clic.able lin. from hyperlin. te@tSleaving Cust the
te@tSby rightDclic.ing on the lin. and selecting -efault Formattin.
This option is also available from the Format menu. &ou may then
need to reDapply some formatting in order for it to match the rest of
your document.
To erase the lin. te@t or button from the document completely, select it
and press the .ackspace or elete .ey.
"' Linking Calc ata
%inking to e'ternal data
&ou can insert tables from 3TE+ documents, and data located within
named ranges from an 9pen9ffice.org !alc or Eicrosoft ?@cel
spreadsheet, into a !alc spreadsheet. (To use other data sources,
including database files in 99o 8ase, see J+in.ing to registered data
sourcesK on page 22.
&ou can do this in two ways5 using the ?@ternal Data dialog or using
the )avigator. If your file has named ranges or named tables, and you
.now the name of the range or table you want to lin. to, using the
?@ternal Data dialog method is Auic. and easy. 3owever, if the file has
several tables, and you want to pic. only one of them, you may not be
able to easily determine which is whichG in that case, the )avigator
method may be easier.
$sing the &'ternal (ata dialog
% 9pen the !alc document where the e@ternal data is to be
inserted. This is the target document.
2 2elect the cell where the upper leftDhand cell of the e@ternal data
is to be inserted.
, !hoose Insert > Link to ./ternal -ata.
> 9n the ?@ternal Data dialog (Figure %#, type the *1+ of the
source document or clic. the N...O button to open a file selection
dialog. Press 1nter to get !alc to load the list of available tables.
; In the +vailable tables/range list, select the named ranges or
tables you want to insert. &ou can also specify that the ranges or
tables are updated every (number of seconds.
# !lic. OK to close the dialog and insert the lin.ed data.
Notes
% The +vailable tables/ranges list remains empty until you
press ?nter after typing the *1+ of the source. If you select
the source document using the NTO button, then pressing
?nter is not reAuired.
2 The OK button remains unavailable (grayed out until you
select one or more tables'ranges in the list. &ou can hold
down the Ctrl .ey while clic.ing on tables'ranges to select
more than one.
, )o images are imported
Linking to e*ternal data ")
$igure "': Selecting a table or range in a source document
from the <eb
$sing the Navigator
% 9pen the 9pen9ffice.org !alc spreadsheet in which the e@ternal
data is to be inserted (target document.
2 9pen the document from which the e@ternal data is to be ta.en
(source document. If the source document is a 4eb page, choose
2e1 3ae 4uer* 5OpenOffice.or !alc6 as the file type.
$igure "): ;pening a file using the <eb =age >uer- filter
", Linking Calc ata
, In the target document, press $% to open the )avigator.
> -t the bottom of the )avigator, select the source document. (In
Figure %<, the source is named actives.
The )avigator now shows the range names or the tables
contained in the source document (the e@ample contains range
namesG other documents have a list of tables. !lic. on the U ne@t
to /ange names to display the list.
$igure ",: Selecting a data range in a
source document? to be inserted as a link
; In the )avigator, select the Insert as Link drag mode, as shown
in Figure %<.
# 2elect the reAuired range or table and drag it from the )avigator
into the target document, to the cell where you want the upper
leftDhand cell of the data range to be.
7 In the target document, chec. the )avigator. Instead of a U by
/ange names, it shows a U by Linked areas. !lic. the U to see the
same range name (see Figure %=.
Linking to e*ternal data "0
$igure "0: Linked areas in
target spreadsheet
#ow to find the re)uired data range or table
The e@amples above show that the import filter gave names to the data
rangers (tables in the sample web page starting from 3TE+V%. It also
created two additional range names (not visible in the illustration5
3TE+Vall $ designates the entire document
3TE+Vtables $ designates all 3TE+ tables in the document
If the data tables in the source 3TE+ document have been given
names (using the ID attribute on the T-8+? tag, or the e@ternal
spreadsheet includes named ranges, those names appear in the list
along with the ranges !alc has seAuentially numbered.
If the data range or table you want is not named, how can you tell
which one to select:
(o to the source document, which you opened in !alc. In the
)avigator, doubleDclic. on a range name5 that range is highlighted on
the sheet (see Figure 2".
If the Formula 8ar is visible, the range name is also displayed in the
(ame bo@ at the leftDhand end (see Figure 2%.
#3 Linking Calc ata
$igure #3: 8sing the (avigator to find a data range name
$igure #": 8sing the (ame bo* to find a data range name
Linking to e*ternal data #"
%inking to registered data sources
&ou can access a variety of databases and other data sources and lin.
them into !alc documents.
First you need to register the data source with 9pen9ffice.org. (To
register means to tell 99o what type of data source it is and where the
file is located. The way to do this depends on whether or not the data
source is a database in M.odb format.
To register a data source that is in M.odb format5
% !hoose Tools > Options > OpenOffice.or Base > -ata1ases.
2 !lic. the New button (below the list of registered databases to
open the !reate Database +in. dialog (Figure 22.
$igure ##: /egistering databases
, ?nter the location of the database file, or clic. Browse to open a
file browser and select the database file.
> Type a name to use as the registered name for the database and
clic. OK. The database is added to the list of registered
databases. The OK button is enabled only when both fields are
filled in.
To register a data source that is not in M.odb format5
% !hoose File > New > -ata1ase to open the Database 4iFard.
2 2elect !onnect to an e/istin $ata1ase. The choices for
database type depend on your operating system. For e@ample,
## Linking Calc ata
Eicrosoft -ccess and other Eicrosoft products are not among the
choices if you are using +inu@. In our e@ample, we chose d8-2?.
$igure #3: /egistering a database using the atabase <i@ard
, !lic. Ne/t. Type the path to the database file or clic. Browse
and use the 9pen dialog to navigate to and select the database
file before clic.ing Open.
> !lic. Ne/t. 2elect Yes? register the database for me, but clear the
chec.bo@ mar.ed ;pen the database for editing.
; !lic. Finish. )ame and save the database in the location of your
choice. )ote5 changes made to the M.odb do not affect the original
d8-2? file.
9nce a data source has been registered, it can be used by any 99o
component (for e@ample !alc.
Linking to registered data sources #3
*iewing data sources
9pen a document in !alc. To view the data sources available, press $!
or select 0iew W -ata Sources from the menu bar. The Data 2ource
Biew pane opens above the spreadsheet. - list of registered databases
is in the Data ?@plorer area on the left. (The builtDin 8ibliography
database is included in the list.
To view each database, clic. on the 7 to the left of the name of the
database. (This has been done for the -utomobile database in Figure
2>. !lic. on the 7 ne@t to Tables to view the individual tables.
$igure #!: atabases
)ow clic. on a table to see all the records held in it. The data records
are displayed on the right side of the Data 2ource Biew pane. To see
more columns, you can clic. the ?@plorer 9n'9ff button to hide the
Data ?@plorer area.
-t the top of the Data 2ource Biew pane, below the !alc toolbars, is
the Table Data bar. This toolbar includes buttons for saving records,
editing data, finding records, sorting, filtering, and other functions. For
more details about this toolbar, see the 3elp for data source browser.
8elow the records is the Form )avigation bar, which shows which
record is selected and the total number of records. To the right are five
tiny buttonsG the first four move bac.wards or forwards through the
records, or to the beginning or end.
$igure #%: ata Source 9iew navigation buttons
&diting data sources
2ome data sources (such as spreadsheets cannot be edited in the data
source view.
In editable data sources, records can be edited, added, or deleted. If
you cannot save your edits, you need to open the database in 8ase and
edit it thereG see J+aunching 8ase to wor. on data sourcesK. &ou can
also hide columns and ma.e other changes to the display.
#! Linking Calc ata
%aunching +ase to work on data sources
&ou can launch 99o 8ase at any time from the Data 2ource Biew pane.
1ightDclic. on a database or the Tables or Xueries icons and select
.$it -ata1ase File. 9nce in 8ase, you can edit, add, and delete tables,
Aueries, forms, and reports.
For more about using 8ase, see !hapter < ((etting 2tarted with 8ase
in the Getting Started guide.
$sing data sources in Calc spreadsheets
Data from the tables in the data source pane can be placed into !alc
documents in a variety of ways.
&ou can select a cell or an entire row in the data source pane and drag
and drop the data into the spreadsheet. The data is inserted at the
place where you release the mouse button.
-n alternative method uses the ata to Ae*t icon and will include the
column headings above the data you insert5
% !lic. the cell of the spreadsheet which you want to be the top left
of your data including the column names.
2 Press $! to open the database source window and select the table
containing the data you want to use.
, 2elect the rows of data you want to add to the spreadsheet5
I !lic. the gray bo@ to the left of the row you want to select if
only selecting one row. That row is highlighted.
I To select multiple adCacent rows, hold down the Shift .ey
while clic.ing the gray bo@ of the rows you need.
I To select multiple separate rows, hold down the Control .ey
while selecting the rows. The selected rows are highlighted.
I To select all the rows, clic. the gray bo@ in the upper left
corner. -ll rows are highlighted.
> !lic. the ata to te*t icon to insert the data into the
spreadsheet cells.
&ou can also drag the data source column headings (field names onto
your spreadsheet to create a form for viewing and editing individual
records one at a time. Follow these steps5
% !lic. the gray bo@ at the top of the column (containing the field
name you wish to use to highlight it.
Linking to registered data sources #%
2 Drag and drop the gray bo@ to where you want the record to
appear in the spreadsheet.
, 1epeat until you have moved all of the fields you need to where
you want them.
> !lose the Data 2ource window5 press $!.
; 2ave the spreadsheet and clic. the 1dit $ile button on the
2tandard toolbar, to ma.e the spreadsheet readDonly. -ll of the
fields will show the value for the data of the first record you
selected.
# -dd the $orm (avigation toolbar5 0iew > Tool1ars > Form
Na(iation. 8y default, this toolbar opens at the bottom of the
!alc window, Cust above the status bar.
7 !lic. the arrows on the Form )avigation toolbar to view the
different records of the table. The number in the 1ecord bo@
changes as you move through the records. The data in the fields
changes to correspond to the data for that particular record
number. &ou can also search for a specific record, sort and filter
records, and do other tas.s using this toolbar.
&mbedding spreadsheets
2preadsheets can be embedded in other 99o files. This is often used in
4riter or Impress documents so that !alc data can be used in a te@t
document. &ou can embed the spreadsheet as either an ;L1 or 1
obCect. The difference between a DD? obCect and a +in.ed 9+? obCect
is that a +in.ed 9+? obCect can be edited from the document in which
it is added as a lin., but a DD? obCect cannot.
For e@ample, if a !alc spreadsheet is pasted into a 4riter document as
a DD? obCect, then the spreadsheet cannot be edited in the 4riter
document. 8ut if the original !alc spreadsheet is updated, the changes
are automatically made in the 4riter document. If the spreadsheet is
inserted as a +in.ed 9+? obCect into the 4riter document, then the
spreadsheet can be edited in the 4riter as well as in the !alc
document and both documents are in sync with each other.
,b-ect %inking and &mbedding .,%&/
The maCor benefit of an 9+? (9bCect +in.ing and ?mbedding obCect is
that it is Auic. and easy to edit the contents Cust by doubleDclic.ing on
#' Linking Calc ata
it. &ou can also insert a lin. to the obCect that will appear as an icon
rather than an area showing the contents itself.
9+? obCects can be lin.ed to a target document or be embedded in the
target document. +in.ing inserts information which will be updated
with any subseAuent changes to the original file, while embedding
inserts a static copy of the data. If you want to edit the embedded
spreadsheet, doubleDclic. on the obCect.
To embed a spreadsheet as an 9+? obCect in a presentation5
% Place the cursor in the document and location you want the 9+?
obCect to be.
2 2elect Insert > O18ect > OL. O18ect. The dialog below opens.
$igure #': &nsert ;L1 obBect dialog
, &ou can either create a new 9+? obCect or create from a file.
To create a new obCect5
% 2elect !reate new and select the obCect type among the available
options.
Note
JFurther obCectsK is only available if you are using the 4indows
operating system.
2 !lic. OK. -n empty container is placed in the slide.
, DoubleDclic. on the 9+? obCect to enter the edit mode of the
obCect. The application devoted to handling that type of file will
open the obCect.
Note
If the obCect inserted is handled by 9pen9ffice.org, then the
transition to the program to manipulate the obCect will be
seamlessG in other cases the obCect opens in a new window and
an option in the File menu becomes available to update the
obCect you inserted.
1mbedding spreadsheets #)
To insert an e@isting obCect5
% To create from a file, select !reate from file. The dialog changes
to loo. li.e Figure 27.
2 To insert the obCect as a lin., select the Link to file option.
9therwise, the obCect will be embedded.
, !lic. Search, select the reAuired file in the 9pen dialog, then
clic. Open. - section of the inserted file is shown in the
document.
$igure #): &nserting an obBect as a link
Other OLE objects
*nder 4indows, the Insert 9+? 9bCect dialog bo@ has an e@tra entry,
$urther obBects, as shown in Figure 2#.
% DoubleDclic. on the entry Further o18ects to open the dialog
shown below.
$igure #,: &nserting an ;L1 obBect under <indows

#, Linking Calc ata
2 2elect !reate New to insert a new obCect of the type selected in
the 9bCect Type list, or select !reate from File to create a new
obCect from a file.
, If you choose !reate from File9 the dialog shown below opens.
!lic. Browse and choose the file to insert. The inserted file
obCect is editable by the 4indows program that created it.
If instead of inserting an obCect, you want to insert a link to an
obCect, select the -ispla* As Icon option.
$igure #0: &nsert obBect from a file
Non-linked OLE object
If the 9+? obCect is not lin.ed, it can be edited in the new document.
For instance, if you insert a spreadsheet into a 4riter document, you
can essentially treat it as a 4riter table (with a little more power. To
edit it, doubleDclic. on it.
Linked OLE object
4hen the spreadsheet 9+? obCect is lin.ed, if you change it in 4riter it
will change in !alcG if you change it in !alc, it will change in 4riter.
This can be a very powerful tool if you create reports in 4riter using
!alc data, and want to ma.e a Auic. change without opening !alc.
Note
&ou can only edit one copy of a spreadsheet at a time. If you
have a lin.ed 9+? spreadsheet obCect in an open 4riter
document and then open the same spreadsheet in !alc, the !alc
spreadsheet will be a readDonly copy.
1mbedding spreadsheets #0
(ynamic (ata &'change .((&/
1 is an acronym for Dynamic Data ?@change, a mechanism whereby
selected data in document + can be pasted into document . as a
lin.ed, QliveH copy of the original. It would be used, for e@ample, in a
report written in 4riter containing timeDvarying data, such as sales
results sourced from a !alc spreadsheet. The DD? lin. ensures that, as
the source spreadsheet is updated so is the report, thus reducing the
scope for error and reducing the wor. involved in .eeping the 4riter
document up to date.
DD? is a predecessor of 9+?. 4ith DD?, obCects are lin.ed through file
reference, but not embedded. &ou can create DD? lin.s either within
!alc cells in a !alc sheet, or in !alc cells in another 99o doc such as
in 4riter.
DDE link in Calc
!reating a DD? lin. in !alc is similar to creating a cell reference. The
process is a little different, but the result is the same.
% In !alc, select the cells that you want to ma.e the DD? lin. to.
2 !opy them5 .$it > !op* or CtrlCC.
, (o to the place in the spreadsheet where you want the lin. to be.
> 2elect .$it > 3aste Special.
; 4hen the Paste 2pecial dialog opens, select the Link option on
the bottom left of the dialog (Figure ,". !lic. OK.
The cells now reference the copied data, and the formula bar shows a
reference beginning with {=DDE.
If you now edit the original cells, the lin.ed cells will update.
$igure 33: Location of Link option on =aste Special dialog in Calc
33 Linking Calc ata
DDE link in Writer
The process for creating a DD? lin. from !alc to 4riter is similar to
creating a lin. within !alc.
% In !alc, select the cells to ma.e the DD? lin. to. !opy them.
2 (o to the place in your 4riter document where you want the DD?
lin.. 2elect .$it > 3aste Special.
, 2elect 1 Link (Figure ,%. !lic. OK.
)ow the lin. has been created in 4riter. 4hen the !alc spreadsheet is
updated, the table in 4riter is automatically updated.
$igure 3": =aste Special dialog in <riter? with 1 link selected
1mbedding spreadsheets 3"

You might also like