a spreadsheet is a computer application that simulates a paper

12
A spreadsheet is a computer application that simulates a paper, accounting worksheet . It displays multiple cells that together make up a grid consisting of rows and columns, each cell containing alphanumeric text, numeric values or formulas. A formula defines how the content of that cell is to be calculated from the contents of any other cell (or combination of cells) each time any cell is updated. Spreadsheets are frequently used for financial information because of their ability to re-calculate the entire sheet automatically after a change to a single cell is made. Visicalc is usually considered the first electronic spreadsheet (although this has been challenged), and it helped turn the Apple II computer into a success and greatly assisted in their widespread application. Lotus 1-2-3 was the leading spreadsheet when DOS was the dominant operating system. Excel now has the largest market share on the Windows and Macintosh  platforms Concepts [edit] Cells A "cell" can be thought of as a box for holding a datum. A single cell is usually referenced by its column and row (A2 would represent the cell below containing the value 10). Usually rows are referenced in decimal notation starting from 1, while columns use 26-adic bijective numeration using the letters A-Z as numerals. Its physical size can usually be tailored for its content by dragging its height or width at box intersections (or for entire columns or rows by dragging the column or rows headers). My Spreadsheet A B C D 01 value1 valu e2 added mu ltipl ied 02 10 20 30 200 An array of cells is called a "sheet" o r "worksheet". It is analogous to an array of variables in a conventional computer program (although certain unchanging values, once entered, could be considered, by the same analogy, constants ). In most implementations, many worksheets may be located within a single spreadsheet. A worksheet is simply a subset of the spreadsheet divided for the sake of clarity. Functionally, the spreadsheet operates as a whole and all cells op erate as global variables within the spreadsheet ('read' access only except its own containing cell). A cell may contain a value or a formula, or it may simply be left empty. By convention, formulas usually begin with = sign. [edit] Values A value can be entered from the computer keyboard by directly typing into the cell itself. Alternatively, a value can be based on a formula (see below), which might perform a calculation, display the current date or time, or retrieve external d ata such as a stock quo te or a database value.

Upload: christine-grey

Post on 10-Apr-2018

233 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 1/12

A spreadsheet is a computer application that simulates a paper, accounting worksheet. Itdisplays multiple cells that together make up a grid consisting of rows and columns, each cellcontaining alphanumeric text, numeric values or formulas. A formula defines how the content of that cell is to be calculated from the contents of any other cell (or combination of cells) each timeany cell is updated. Spreadsheets are frequently used for financial information because of their 

ability to re-calculate the entire sheet automatically after a change to a single cell is made.

Visicalc is usually considered the first electronic spreadsheet (although this has beenchallenged), and it helped turn the Apple II computer into a success and greatly assisted in their widespread application. Lotus 1-2-3 was the leading spreadsheet when DOS was the dominantoperating system. Excel now has the largest market share on the Windows and Macintosh platforms

Concepts

[edit] Cells

A "cell" can be thought of as a box for holding a datum. A single cell is usually referenced by itscolumn and row (A2 would represent the cell below containing the value 10). Usually rows arereferenced in decimal notation starting from 1, while columns use 26-adic bijective numeration using the letters A-Z as numerals. Its physical size can usually be tailored for its content bydragging its height or width at box intersections (or for entire columns or rows by dragging thecolumn or rows headers).

My Spreadsheet

A B C D

01 value1 value2 added multiplied02 10 20 30 200

An array of cells is called a "sheet" or "worksheet". It is analogous to an array of variables in aconventional computer program (although certain unchanging values, once entered, could beconsidered, by the same analogy, constants). In most implementations, many worksheets may belocated within a single spreadsheet. A worksheet is simply a subset of the spreadsheet divided for the sake of clarity. Functionally, the spreadsheet operates as a whole and all cells operate asglobal variables within the spreadsheet ('read' access only except its own containing cell).

A cell may contain a value or a formula, or it may simply be left empty. By convention, formulasusually begin with = sign.

[edit] Values

A value can be entered from the computer keyboard by directly typing into the cell itself.Alternatively, a value can be based on a formula (see below), which might perform a calculation,display the current date or time, or retrieve external data such as a stock quote or a databasevalue.

Page 2: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 2/12

The Spreadsheet Value Rule Computer scientist Alan Kay used the term value rule tosummarize a spreadsheet's operation: a cell's value relies solely on the formula the user has typedinto the cell.[18] The formula may rely on the value of other cells, but those cells are likewiserestricted to user-entered data or formulas. There are no 'side effects' to calculating a formula: theonly output is to display the calculated result inside its occupying cell. There is no natural

mechanism for permanently modifying the contents of a cell unless the user manually modifiesthe cell's contents. In the context of programming languages, this yields a limited form of first-order  functional programming.[19]

[edit] Automatic recalculation

A standard of spreadsheets since the mid 80s[citation needed ], this optional feature eliminates the needto manually request the spreadsheet program to recalculate values (nowadays typically thedefault option unless specifically 'switched off' for large spreadsheets, usually to improve performance). Some earlier spreadsheets required a manual request to recalculate, sincerecalculation of large or complex spreadsheets often reduced data entry speed. Many modern

spreadsheets still retain this option.

[edit] Real-time update

This feature refers to updating a cell's contents periodically when its value is derived from anexternal source - such as a cell in another "remote" spreadsheet. For shared, web-basedspreadsheets, it applies to "immediately" updating cells that have been altered by another user.All dependent cells have to be updated also.

[edit] Locked cell

Once entered, selected cells (or the entire spreadsheet) can optionally be "locked" to preventaccidental overwriting. Typically this would apply to cells containing formulas but might beapplicable to cells containing "constants" such as a kilogram/pounds conversion factor (2.20462262 to eight decimal places). Even though individual cells are marked as locked, thespreadsheet data is not protected until the feature is activated in the file preferences.

[edit] Data format

A cell or range can optionally be defined to specify how the value is displayed. The defaultdisplay format is usually set by its initial content if not specifically previously set, so that for example "31/12/2007" or "31 Jan 2007" would default to the cell format of "date". Similarly

adding a % sign after a numeric value would tag the cell as a  percentage cell format. The cellcontents are not changed by this format, only the displayed value.

Some cell formats such as "numeric" or "currency" can also specify the number of decimal places.

This can allow invalid operations (such as doing multiplication on a cell containing a date),resulting in illogical results without an appropriate warning.

Page 3: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 3/12

[edit] Cell formatting

Depending on the capability of the spreadsheet application, each cell (like its counterpart the"style" in a word processor ) can be separately formatted using the attributes of either the content(point size, color, bold or italic) or the cell (border thickness, background shading, color). To aid

the readability of a spreadsheet, cell formatting may be conditionally applied to data - for example, a negative number may be displayed in red.

A cell's formatting does not typically affect its content and depending on how cells arereferenced or copied to other worksheets or applications, the formatting may not be carried withthe content.

[edit] Named cells

Use of named column variables x & y in Microsoft Excel. Formula for y=x2 resembles Fortran, and Name Manager shows the definitions of  x & y.

In most implementations, a cell, or group of cells in a column or row, can be "named" enablingthe user to refer to those cells by a name rather than by a grid reference. Names must be uniquewithin the spreadsheet, but when using multiple sheets in a spreadsheet file, an identically namedcell range on each sheet can be used if it is distinguished by adding the sheet name. One reasonfor this usage is for creating or running macros that repeat a command across many sheets.Another reason is that formulas with named variables are readily checked against the algebra

they are intended to implement (they resemble Fortran expressions). Use of named variables andnamed functions also makes the spreadsheet structure more transparent.

[edit] Cell reference

In place of a named cell, an alternative approach is to use a cell (or grid) reference. Most cellreferences indicate another cell in the same spreadsheet, but a cell reference can also refer to a

Page 4: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 4/12

cell in a different sheet within the same spreadsheet, or (depending on the implementation) to acell in another spreadsheet entirely, or to a value from a remote application.

A typical cell reference in "A1" style consists of one or two case-insensitive letters to identifythe column (if there are up to 256 columns: A-Z and AA-IV) followed by a row number (e.g. in

the range 1-65536). Either part can be relative (it changes when the formula it is in is moved or copied), or absolute (indicated with $ in front of the part concerned of the cell reference). Thealternative "R1C1" reference style consists of the letter R, the row number, the letter C, and thecolumn number; relative row or column numbers are indicated by enclosing the number insquare brackets. Most current spreadsheets use the A1 style, some providing the R1C1 style as acompatibility option.

When the computer calculates a formula in one cell to update the displayed value of that cell, cellreference(s) in that cell, naming some other cell(s), cause the computer to fetch the value of thenamed cell(s).

A cell on the same "sheet" is usually addressed as:-

=A1

A cell on a different sheet of the same spreadsheet is usually addressed as:-

=SHEET2!A1 (that is; the first cell in sheet 2 of same

spreadsheet).

Some spreadsheet implementations allow a cell references to another spreadsheet (not the currentopen and active file) on the same computer or a local network. It may also refer to a cell inanother open and active spreadsheet on the same computer or network that is defined as

shareable. These references contain the complete filename, such as:-

='C:\Documents and Settings\Username\My spreadsheets\[main sheet]Sheet1!A1

In a spreadsheet, references to cells are automatically updated when new rows or columns areinserted or deleted. Care must be taken however when adding a row immediately before a set of column totals to ensure that the totals reflect the additional rows values - which often they donot!

A circular reference occurs when the formula in one cell has a reference that directly—or indirectly, through a chain of references, each one pointing to another cell that has another 

reference to the next cell on the chain—points to the one cell. Many common kinds of errorscause such circular references. However, there are some valid techniques that use such circular references. Such techniques, after many recalculations of the spreadsheet, (usually) converge onthe correct values for those cells.

[edit] Cell ranges

Page 5: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 5/12

Likewise, instead of using a named range of cells, a range reference can be used. Reference to arange of cells is typically of the form (A1:A6) which specifies all the cells in the range A1through to A6. A formula such as "=SUM(A1:A6)" would add all the cells specified and put theresult in the cell containing the formula itself.

[edit] Sheets

In the earliest spreadsheets, cells were a simple two-dimensional grid. Over time, the model has been expanded to include a third dimension, and in some cases a series of named grids, calledsheets. The most advanced examples allow inversion and rotation operations which can slice and project the data set in various ways.

[edit] Formulas

Animation of a simple spreadsheet that multiplies values in the left column by 2, then sums thecalculated values from the right column to the bottom-most cell. In this example, only the valuesin the A column are entered (10, 20, 30), and the remainder of cells are formulas. Formulas in the

B column multiply values from the A column using relative references, and the formula in B4

uses the SUM() function to find the sum of values in the B1:B3 range.

A formula identifies the calculation needed to place the result in the cell it is contained within. Acell containing a formula therefore has two display components; the formula itself and theresulting value. The formula is normally only shown when the cell is selected by "clicking" themouse over a particular cell; otherwise it contains the result of the calculation.

A formula assigns values to a cell or range of cells, and typically has the format:

=expression

where the expression consists of:

• values, such as 2, 9.14 or 6.67E-11;

• references to other cells, such as, e.g., A1 for a single cell or B1:B3 for a range;

• arithmetic operators, such as +, -, *, /, and others;

• relational operators, such as >=, <, and others; and,

• functions, such as SUM(), TAN(), and many others.

Page 6: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 6/12

When a cell contains a formula, it often contains references to other cells. Such a cell reference isa type of variable. Its value is the value of the referenced cell or some derivation of it. If that cellin turn references other cells, the value depends on the values of those. References can berelative (e.g., A1, or B1:B3), absolute (e.g., $A$1, or $B$1:$B$3) or mixed row-wise or column-

wise absolute/relative (e.g., $A1 is column-wise absolute and A$1 is row-wise absolute).

The available options for valid formulas depends on the particular spreadsheet implementation but, in general, most arithmetic operations and quite complex nested conditional operations can be performed by most of today's commercial spreadsheets. Modern implementations also offer functions to access custom-build functions, remote data, and applications.

A formula may contain a condition (or nested conditions) - with or without an actual calculation- and is sometimes used purely to identify and highlight errors. In the example below, it isassumed the sum of a column of percentages (A1 through A6) is tested for validity and anexplicit message put into the adjacent right-hand cell.

=IF(SUM(A1:A6) > 100, "More than 100%", SUM(A1:A6))

A spreadsheet does not, in fact, have to contain any formulas at all, in which case it could beconsidered merely a collection of data arranged in rows and columns (a database) like a calendar,timetable or simple list. Because of its ease of use, formatting and hyperlinking capabilities,many spreadsheets are used solely for this purpose.

[edit] Functions

Use of user-defined function sq(x) in Microsoft Excel.

Spreadsheets usually contain a number of supplied functions, such as arithmetic operations (for example, summations, averages and so forth), trigonometric functions, statistical functions, andso forth. In addition there is often a provision for user-defined functions. In Microsoft Excelthese functions are defined using Visual Basic for Applications in the supplied Visual Basic

Page 7: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 7/12

editor, and such functions are automatically accessible on the worksheet. In addition, programscan be written that pull information from the worksheet, perform some calculations, and reportthe results back to the worksheet. In the figure, the name sq is user-assigned, and function sq isintroduced using the Visual Basic editor supplied with Excel. Name Manager displays thespreadsheet definitions of named variables x & y.

[edit] Subroutines

Subroutine in Microsoft Excel writes values calculated using x into y.

Functions themselves cannot write into the worksheet, but simply return their evaluation.

However, in Microsoft Excel, subroutines can write values or text found within the subroutinedirectly to the spreadsheet. The figure shows the Visual Basic code for a subroutine that readseach member of the named column variable x, calculates its square, and writes this value into thecorresponding element of named column variable y. The y-column contains no formula becauseits values are calculated in the subroutine, not on the spreadsheet, and simply are written in.

[edit] Remote spreadsheet

Whenever a reference is made to a cell or group of cells that are not located within the current physical spreadsheet file, it is considered as accessing a "remote" spreadsheet. The contents of the referenced cell may be accessed either on first reference with a manual update or more

recently in the case of web based spreadsheets, as a near real time value with a specifiedautomatic refresh interval.

[edit] Charts

Page 8: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 8/12

Graph made using Microsoft Excel

Many spreadsheet applications permit charts, graphs or histograms to be generated fromspecified groups of cells which are dynamically re-built as cell contents change. The generatedgraphic component can either be embedded within the current sheet or added as a separateobject.

[edit] Multi-dimensional spreadsheets

In the late 1980s and early 1990s, first Javelin Software and later Lotus Improv appeared andunlike models in a conventional spreadsheet, they utilized models built on objects calledvariables, not on data in cells of a report. These multi-dimensional spreadsheets enabled viewingdata and algorithms in various self-documenting ways, including simultaneous multiplesynchronized views. For example, users of Javelin could move through the connections betweenvariables on a diagram while seeing the logical roots and branches of each variable. This is anexample of what is perhaps its primary contribution of the earlier Javelin—the concept of traceability of a user's logic or model structure through its twelve views. A complex model can be dissected and understood by others who had no role in its creation, and this remains uniqueeven today. Javelin was used primarily for financial modeling, but was also used to buildinstructional models in college chemistry courses, to model the world's economies, and by themilitary in the early Star Wars project. It is still in use by institutions for which model integrity ismission critical.

In these programs, a time series, or any variable, was an object in itself, not a collection of cellswhich happen to appear in a row or column. Variables could have many attributes, includingcomplete awareness of their connections to all other variables, data references, and text andimage notes. Calculations were performed on these objects, as opposed to a range of cells, soadding two time series automatically aligns them in calendar time, or in a user-defined timeframe. Data were independent of worksheets—variables, and therefore data, could not bedestroyed by deleting a row, column or entire worksheet. For instance, January's costs aresubtracted from January's revenues, regardless of where or whether either appears in aworksheet. This permits actions later used in pivot tables, except that flexible manipulation of report tables was but one of many capabilities supported by variables. Moreover, if costs wereentered by week and revenues by month, Javelin's program could allocate or interpolate asappropriate. This object design enabled variables and whole models to reference each other with

Page 9: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 9/12

user-defined variable names, and to perform multidimensional analysis and massive, but easilyeditable consolidations.

n this unit you will find the most basic concepts used by Excel.

In order to understand better each of the concepts we explain, we would like to advise you tohave Excel open on another window so you can check them.

Workbook 

A workbook is a file that we create with Excel, that is to say, everything we do in this programme will be saved in the form of a workbook 

Excel workbooks have extension .XLS to allow the computer to identify them.

When you start a Excel session, automatically a new workbook will be open with the provisionalname Book 1. You can check this up with your Excel window, on the title bar, on the top part of the window you will see written "Microsoft Excel - book 1".

The book number will change every time we start another task with Excel and it will vary withthe books created in a session. So if we start another task, the name Book 2 will be given to it, thefollowing one will be Book 3, and so on.

Bare in mind that the name given is only a reference to identify a particular task before it issaved, it does not mean that the file is already saved.

A workbook is made of several sheets, to begin with it will have three sheets, although thenumber could be anything betwee 1 and 255. If you look at the lower part of your Excel windowyou will find the different sheets of the workbook, each of them numbered: Sheet 1, Sheet 2...

Workbooks are fantastic organizing tools. For example, we can keep together in a single book allthe sheets that belong to the same project or task.

Worksheet

Page 10: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 10/12

A worksheet is one of the different types of sheet contained in a workbook . It is a very usefultool for anybody that is working with many figures and needs to do calculations with them.

It is a large grid made of 256 colums and 65,536 horizontal rows.

Worksheets are made of columns and rows.

A column is formed by cells vertically arranged. Each column is identified by letters, for exampleA, B, C,... AA, AB,... IV.

Each row is numbered, from 1 to 65,536, and is the horizontal selection of cells in a sheet.

The intersection between a column and a row is called Cell and it is referred to by the column

name to which it belongs and the number of its row, for example, the first cell belongs to columnA and row 1, so it is cell A1. You should be able to check in your Excel window what we haveseen so far.

When the cursor is positioned on any cell, ready to work in it, the cell is named Active Cell and itis identified because it is highlighted from the rest.

In the same way we have the Active row, the row where the active cell is and the Active Column,

Page 11: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 11/12

the active cell column.

Another very important concept in the worksheet is that of Range, it is a rectangular block madeof one or more cells that Excel treat as a unit. Ranges are essential for the spreadsheet because all

kind of calculations are based on ranges. We shall see later on the different ways to define range.

Concept programming is a programming paradigm focusing on how concepts,that live in the programmer's head, translate into representations that are found inthe code space. This approach was introduced in 2001 by Christophe de Dinechin with the XL Programming Language.

Pseudo-metrics

Concept programming uses pseudo-metrics to evaluate the quality of code. They are called pseudo-metrics because they relate the concept space and the code space, with a clear 

understanding that the concept space cannot be formalized strictly enough for a real metric to bedefined. Concept programming pseudo-metrics include:

• Syntactic noise measures discrepancies between the concept and the syntax used torepresent it. For instance, the semi-colon at the end of statements in C can be consideredas syntactic noise, because it has no equivalent in the concept space.

• Semantic noise measures discrepancies between the expected meaning or behavior of theconcept and its actual meaning or behavior in the code. For instance, the fact that integer data types overflow (when mathematical integers do not) is a form of semantic noise.

•  Bandwidth measures how much of the concept space a given code construct can represent.For instance, the overloaded addition operator in C has higher bandwidth than the Add

instruction in assembly language, because the C operator can represent addition onfloating-point numbers and not just integer numbers.

• Signal/noise ratio measures what fraction of the code space is used for representing actualconcepts, as opposed to implementation information.

[edit] Rule of equivalence, equivalence breakdown

The rule of equivalence is verified when the code behavior matches the original concept. Thisequivalence may break down in many cases. Integer overflow breaks the equivalence between themathematical integer concept and the computerized approximation of the concept.

Many ways to break the equivalence have been given specific names, because they are verycommon:

• A domain error is a condition where code executes outside of the domain of equivalence,which is the domain where the concept and the implementation match. An integer overflow is an example of domain error.

• A concept cast is a rewrite of a concept as a different concept because the original concept

Page 12: A Spreadsheet is a Computer Application That Simulates a Paper

8/8/2019 A Spreadsheet is a Computer Application That Simulates a Paper

http://slidepdf.com/reader/full/a-spreadsheet-is-a-computer-application-that-simulates-a-paper 12/12

cannot be represented by the tools. In C, using pointers for output arguments because Cdoesn't support output arguments explicitly is an example of concept cast.

• A priority inversion is a form of syntactic or semantic noise introduced by somelanguage-enforced general rule. It is called a priority inversion because the language takes precedence over the concept. In Smalltalk , everything is an object, and that rule leads to

the undesirable consequence that an expression like 2+3*5 doesn't obey the usual order of operations (Smalltalk interprets this as sending the message * to the number resultingfrom 2+3, which yields result 25 instead of 17).

[edit] Methodology

To write code, concept programming recommends the following steps:

1. Identify and define the relevant concepts in the concept space.2. Identify traditional notations for the concepts, or invent usable notations.3. Identify a combination of programming constructs that allows the concepts to be

represented comfortably in code - That includes finding a code notation that matches thenotation identified in the previous step as closely as possible.

4. Write code that preserves, as much as possible, the expected behavior and semantics of the relevant aspects of the original concept.

Many programming tools often lack in notational abilities, thus concept programming sometimesrequires the use of  preprocessors, domain-specific languages, or metaprogramming techniques.