We will build a simple web page so that you may place it on your geocities
site. Recall the basic things we can place on a page.
Title - The text included between the <title> and </title>
tags will be displayed in the title bar of the browser window.
Background - You can use either a background image or a background
color in your document.
To use a background image, include the statement
background="file" within the <body> tag.
To use a background
image, include the statement bgcolor=#RRGGBB within the
<body> tag.
RR, GG, and BB are hexadecimal digits which represent
the amount of red, green, or blue which will be used in the background
color.
Keep in mind that when you change the background image or
background color, you may need to change the text color so that it is
visible.
You can do this by including the statement text=#RRGGBB
within the <body> tag.
Hyperlinks by default are in blue and underlined. You may need to
change this default so that the link is visible. You can do this by
including the statement link=#RRGGBB within the <body>
tag.
Hyperlinks also change color after they have been visited. To change
the color of visited links, include the statement vlink=#RRGGBB
within the <body> tag.
Hyperlinks also change color when they are active. To change the color
of an active link, include the statement alink=#RRGGBB within the
<body> tag.
An example of a <body> tag with these options is as
follows:
Here the background image has been set to the image darkback.jpg, the
text color has been set to white, the link color has been set to yellow,
and the visited link color has been set to green.
There are many things that you can put in your web document. For this
simple example, we will simply put a heading, an image, a hyperlink to an
address, and a link to your email address.
The Heading - There are different sizes of headings. The largest is
h1. You can experiment with the heading sizes until you are satisfied.
When you know what heading size you want to use, place the following line
in your document:
<hx>Your Name</hx>
where x is the heading size.
Sometimes a separator is an appealing addition to your page. You can
insert a separator by adding the following line to your document.
You can insert an image in your document and have it centered by
adding the following lines to your document.
<center>
<img src="file">
</center>
where file is the name of the image file.
Pick any address that you like on the World Wide Web. Say, for
instance, you are a fan of Sun Microsystems. The URL for Sun Microsystems
is http://www.sun.com/. You want to place a hyperlink to this site from
your document. You can do this by adding the following line to your
document.
<a href="http://www.sun.com>Sun Microsystems"</a>
We can use the same format if we want to set up a link to our E-mail
address. In order for the user to make use of this link, they will have to
have the incoming and outgoing mail server set up on their browser. To
include a link to your E-mail address on your web page, include the
following line in your document.
<a href="mailto:emailaddress">emailaddress</a>
When interpreting the code for the hyperlink, whatever is between the
> and the second < is what is highlighted and underlined on the web
page.
Always make sure that you save your work.
The Spreadsheet
What is a spreadsheet?
Spreadsheet is a generic term that is the computerized equivalent of
an accounting ledger.
A spreadsheet is composed of a rectangular matrix (grid)
of columns and rows.
A useful feature of a spreadsheet is that it provides us with the ability
to make changes and have software carry out recalculations faster
and more accurately than we can by hand.
Microsoft Excel
The spreadsheet which we will use in this program is Microsoft Excel 97.
It is part of the Office 97 package from Microsoft.
Parts of the Microsoft Excel window
There are several important parts of the Microsoft Excel window.
Title bar containing the Excel Icon, the Workbook name, the
minimize, maximize/restore, and close buttons.
Menu Bar.
Standard Toolbar.
Formatting Toolbar.
Name Box.
Formula Bar.
Cells Area.
Horizontal Scroll bar.
Status bar.
Some basic definitions
Columns in an Excel file are vertical collections of data and
are labeled by letters. A Microsoft Excel spreadsheet file can contain
columns labeled from A to IV.
Rows in an Excel file are horizontal collections of data and
are labeled by numbers. A Microsoft Excel spreadsheet file can contain rows
labeled from 1 to 16,384.
A cell is the intersection of a row and a column in a
spreadsheet. Whenever we speak of a cell we identify it by first its
column letter and then its row number. For example, the first cell in
a Microsoft Excel spreadsheet file is cell A1.
Microsoft Excel allows us to store multiple sheets in the same file.
Each individual sheet is called a Worksheet. The collection of
the sheets is called a Workbook.
Inputting data into our spreadsheet
When we place data into our spreadsheet file we must first select
in which cell we will place the data. The data we type will be placed in
the active cell. The active cell is indicated by a heavy border.
In the following image, the active cell is C8.
There are three different types of data that can be placed into a cell.
Values such as actual numbers.
Notice that when the active cell has values in it, the Name Box contains
the name of the active cell, and the Formula Bar contains the contents
of the cell.
Labels which are called constants.
Formulas which begin with the = sign.
The ability to have the contents of a cell be based on a formula is one
of the reasons that spreadsheets are so powerful. There are many different
ways we can use formulas. One of the most straightforward ways is to
place a formula in a cell which contains arithmetic combinations of the
data in other cells in the spreadsheet.
As an example of this, suppose we have a list of numbers in one column
and we wish to perform some arithmetic operation on these numbers and
place the results in the second column.
When the active cell is B1 type the following =sqrt(A1).
This a built-in function to
find the square root of a number. We will talk later about built-in
functions.
You may also use simple arithmetic. That is you may use the standard
arithmetic operators, + (addition), - (subtraction), * (multiplication),
/ (division), ^ (exponentiation), and paretheses.
The hierarchy of these operations is as follows.
Parentheses
Exponentiation
Division and Multiplication
Addition and Subtraction
To understand this hierarchy you may try the following exercises and
check your answer with Microsoft Excel.
1-3*2^5-3^2*4
2+7*4/3+2-1*4+3
3^2*4/5+3*2
3^2^2
Arithmetic Operations with existing data
We can also perform arithmetic operations on data that exists in our
spreadsheet.
For example, suppose we have already input several numbers into column
B which represent the amount of money we have paid for various items
which have been placed into column A.
We wish to place in column C the amount of tax that we paid on the item.
The amount of tax that is paid on each item is 15%, but that is paid only
after a 10% discount on the price has been given. We place this
formula into cell C1 to write the amount of tax that we pay on the
magazine.
Instead of having to type the same formula over again in cells C2, C3,
and C4, we can take advantage of the drag-and-copy feature of
Microsoft Excel. We simply move the mouse pointer to cell C1 and make
it the active cell.
Notice that the formula that I typed in is displayed in the Formula Bar.
Move the mouse pointed to the lower right hand corner of the active cell
until the mouse pointer turns into a plus sign. Then hold down the left
mouse button and move the mouse pointer until cells C2,C3, and C4 are
included, and then let up on the left mouse pointer.
Now let us place into column D the actual amount that we paid on each
item.
Now in row 5 suppose we want to place the total for our items. In cell
B5 we want to place the total original amount of the items. So we go to
cell B5 and click the equal sign to the left of the Formula Bar. Then click
Sum, and you will see the following.
Sum is an example of a built-in function. In the box Number1 we can
place a range of cells.
A range is a rectangular group of selected cells. We indicate
a range by using a colon. Therefore, the range which consists of cells
B1,B2,B3, and B4. We identify the range by B1:B4.
Once we click OK the sum of the contents of cells B1 through B4 are
placed into cell B5.
Now we may copy this formula to cells C5 and D5 by using the procedure
we used before.
Notice one odd thing. The formula that is placed into cell B5 is
=SUM(B1:B4), and when we copied this formula to cell C5, the formula
became =SUM(C1:C5).
The reason for this is that when we typed the formula into cell B5 we
used relative addressing.
Relative Addressing means that when we reference a cell in our
formula, the position of that cell relative to the active cell is stored.
When we copy that formula, then in the new location the cell's contents
which are actually used is the cell which is at the corresponding position
to the new cell.
For example, suppose in cell A1 we place the formula =C1+D1. Notice that
relative to cell A1, cell C1 is 0 rows away and 2 columns to the right,
and relative to cell A1, cell D1 is 0 rows away and 3 columns to the
right. Then if we copied the formula from cell A1 to cell B1, then
the formula that appears is the sum of the cell 0 rows down and 2 columns
to the right and the cell 0 rows down and 3 columns to the right. So
the formula that would appear in cell B1 is D1+E1.
Absolute Addressing means that we use the actual cell which is
referenced no matter what the position is relative to the active cell.
To indicate an absolute reference we use a dollar sign $. Keep in mind
that if we want to make an absolute reference, then you are able to make
either the row or column absolute. You can also make one be absolute
and the other be relative if you wish.
We may copy formulas from one cell to another even if they are not
contiguos. To accomplish this we use the manual cut/copy/paste
operations.
We can find these options under the Edit Menu, and there are shortcut
icons on the Standard Toolbar.
For example, suppose we place the formula =$B1+C$2-D2+E3 in cell A1, and
then copy this formula to cell C3.
Other Features of the Spreadsheet
There are many other features that Microsoft Excel has. We will be looking
at a few of them this semesters. Some of the ones that are important to
us are
Changing the size of a row or column. We have the ability to increase
the column width and the row height. This is necessary for example if we
are typing a label into a cell which is longer than the cell can contain.
While we are typing the excess text spills into the adjacent cell to the
right. It is a simple matter to increase the column width so it can
contain the entire label.
Simply go to the Format Menu and select Column and then in the list that
appears select Width. Then choose the new Width. We can also select Row
and in the list that appears select Height to change the row height.
If we wish to clear an area of the spreadsheet, then we simply select
(highlight) the area, go to the Edit Menu, and then select Clear, and then
select All.
We can also change the style of labels in the spreadsheet with the
Formatting Toolbar.
There are many built-in functions which can be applied to data ranges.
You can see a list of these if you go to the Insert Menu and select
Formula.
Templates
You will be using templates in your Spreadsheet Assignment. A template is
simly a boilerplate spreadsheet in which you will later place data. We
will look more closely at this idea in the next laboratory. For the
remainder of this laboratory, you may experiment with this notion. Try
creating a simple spreadsheet in which one cell will contain the output of
some function based on some of the other cells in the spreadsheet.