0% found this document useful (0 votes)
150 views

Lab-3 Data Base

This lab document provides instructions for creating a flat file database in Excel and importing the data into an Access database. The three sentence summary is: The document instructs students to create an Excel spreadsheet with employee data formatted as a table, then import this data into a new Access database table. Students are asked to format the Excel data, define a cell range as the "employeelist", and import this range into an Access table, setting the primary key and adding a lookup field for employee status.

Uploaded by

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

Lab-3 Data Base

This lab document provides instructions for creating a flat file database in Excel and importing the data into an Access database. The three sentence summary is: The document instructs students to create an Excel spreadsheet with employee data formatted as a table, then import this data into a new Access database table. Students are asked to format the Excel data, define a cell range as the "employeelist", and import this range into an Access table, setting the primary key and adding a lookup field for employee status.

Uploaded by

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

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY WAH

CAMPUS
Department Of Computer Science

LAB 03
Summary
Items
Course Title
Lab Title
Duration
Operating
System
/Tool/Language
Objective

Description
Database Management System
Excel sheet Import /Export
3 Hours
Windows Operating System/MS Excel 2010 /MS Access 2007
To get familiar with MS Excel

Part 1 Creating a Flat File Database


In part 1, you will create a flat file database for storing some employee
information. Follow the instructions and samples listed below.

1
2
3
4

Open Microsoft Office Excel 2010.


Rename Sheet1 to Employees.
Delete Sheets 2 & 3.
In cells A1:K1, merge and center the following title: Employees for Your
Company. Replace Your Company with your companys name. Format it how
you want. You may want to change the size, weight, and color.

Instructor Manual/Database Management System

BS(CS)

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY WAH


CAMPUS
Department Of Computer Science

5 In cells A2:K2, enter the headings shown in Figure 7. They are: No., Title,
First Name, Last Name, Gender, Job Position, Salary, Address, City,
State, Postal Code.
6 Beginning in row 3, enter your own information for 10 employees. Make sure
you:
a have 5 female employees and
b only create 5 different job positions.
7 Format the table of employees, including the headings in row 2. Make sure
you change the Salary column to currency and do not show a decimal point.
You may format the colors and such however you wish.
8 Select the cells A2:K12. In the Formulas tab, select the Define Name button.
For the name enter employeelist, and press the OK key. This will name the
range of cells that contain your field headers and data, so that you can easily
refer to it later here and in other projects down the road.
9 Save your workbook as lastname_firstname_excel_database.xlsx

Part 2 Importing data from an Excel Spreadsheet


In part 2, you will import data from the database created in part 1 into your Access
database.
Follow the instructions and samples listed below.
1 Open Microsoft Office Access 2010.
a Click on Blank Database.
b Under the Blank Database section on the far right in the File Name
textfield, enter lastname_firstname_access. Click on the Browse icon
to change the location to save
your file. It will append .accdb. The Save as type is Microsoft Access 2007
Databases (*.accdb).
c Click the Create button.
2 From the top, click on the External Data tab. Click on the Excel button.
3 In the Get External Data window, use the Browse button to locate and
select the excel file you just created in part 1. Select the Import the source
data into a new table in the current database. option. Click the OK button.
4 In the Import Spreadsheet Wizard window:
Instructor Manual/Database Management System

BS(CS)

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY WAH


CAMPUS
Department Of Computer Science

6
7

8
9

a Select the Show Named Ranges radio button. Select the range
employeelist, which is the name range you created in your Excel
project. Select the Next > button to go to the next step in the wizard.
b Check the box First Row Contains Column Headings such that there
is a checkmark there. Click the Next > button.
c Select the No column in the table. Under Field Options, change the
Field Name to EmployeeNum. Click the Next > button.
d Select the Choose my own primary key. radio button. Using the pulldown, select the EmployeeNum option. Click the Next > button.
e Note: A primary key field is used to uniquely identify each record in
your table.
f For the Import to Table textfield, enter EmployeesTbl. Click the
Finish button. Click the Close button. Open your Employees table in
Design View by clicking on the Home tab. In the upper left corner,
click on the View pull-down and select the Design View option.
Delete the Gender and Salary fields by right clicking on the field row and
selecting the Delete Rows option. (Another way to delete is clicking on the
field row and selecting the Delete option under the Records section in the
Home tab.) Click the Yes button to permanently delete the selected field.
Add a new field to the table by typing Employee Status in the first empty
cell in the Field Name column. Set the Data Type to the Lookup Wizard
option.
In the Lookup Wizard window:
a Select the I will type in the values that I want. radio button. Click the
Next > button.
b Under Col1, type in the following three options in the first three cells:
Full-time, Parttime, and On-call. Click the Next > button.
c Checkmark the Limit To List checkbox. Click the Finish button. You
have just created a Lookup Value for the Employee Status field.
Save your changes by clicking on the Save icon (3.5 disk) in the top left
corner of the Access window.
Open the EmployeesTbl in the Datasheet View by clicking on the View pulldown and selecting the Datasheet View option. (If you do not see the View

Instructor Manual/Database Management System

BS(CS)

COMSATS INSTITUTE OF INFORMATION TECHNOLOGY WAH


CAMPUS
Department Of Computer Science

pull-down, then click on the Home tab and you will see it in the upper left
corner.)
10 Add a status to each of your employees in the table. To add a status, you can
simply click in the Employee Status cell for each employee and utilize the
lookup values provided by clicking on the pull-down menu.

11 When finished, close the table by right-clicking on the name EmployeesTbl


and selecting the Close option.

Instructor Manual/Database Management System

BS(CS)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy