Anda di halaman 1dari 36

Excel Tips

© EduPristine – www.edupristine.com
Agenda
 Working with Databases
• Importing data from ERP Systems or other external sources

© EduPristine Importing Data 1


Case: Importing External Data

Ramanov, CPA, works with E&Y. His manager gave him some exported csv and prn data file and
asked him to import the data from the given files, massage the data and present it in a
presentable format. Ramanov, who has just cleared his CPA exam and started his professional
career, has never played around with such kind of data, so he is getting problem in following
activities:
 Importing the Data
 Mining the Data
 Formatting the Data
 Finally, create the report in a presentable format
Now, suppose he approached you and asked your help in preparing the report. Help Ramanov
in importing the data and preparing the report.

© EduPristine Importing Data


Comment:
 There are two ways to import data:
1. Indirect method
2. Direct (Link) Method
Indirect Method –
Under indirect method the text file is imported from Excel's File Open dialog box using Text Import Wizard , in
this case once the database is imported the same can not be auto refreshed. One needs to re-import data if
source file data changes.
Direct Method –

© EduPristine Importing Data


Importing .csv File Data using Indirect method:
 Step 1: 1
• Press Ctrl + O to open File Open Dialog Box in Excel.
• Select All Files (*.*) from the file type drop down menu.

2
3

© EduPristine Importing Data


Cont.…
 Step 2:
• Select Data_ERP.csv and open the file.

© EduPristine Importing Data 6


Cont.…
 This is how the imported data will look like in excel

• Note: Excel automatically opens CSV file in proper format and you do not need to split Columns manually.
Hence CSV is the preferred file format in exporting/importing data, as it is almost fully compatible with
excel.

© EduPristine Importing Data 7


Importing .prn File Data using Indirect method:
 Note: The First two steps remains same. However when you select the file and press open, you will be
presented with text import wizard.

Choose the file type as Fixed width because choosing delimited as file type will split the data the moment it
finds a given delimiter (which is ‘space’ in the given case) between two data points.

© EduPristine Importing Data 8


Cont.…
 At this point you need to carefully add/remove column separator which meets your data needs.

Add/
Remove
Column
1

 Note: The Image above shows auto detected pattern. You may need to adjust the same to suit your
requirements.
 Follow the given instructions to adjust the data according to your requirement.

© EduPristine Importing Data 9


Cont.…

 Here you can also define data types of each column.


 You can see in the image we have selected Date format for first column
 Finally, click the Finish button to open the .prn file in excel.

© EduPristine Importing Data 10


Cont.…
 This is how the imported data will look like in excel

• Remember this is also an indirect import.

© EduPristine Importing Data 11


Disadvantages of Indirect Method:
 Once the data is imported in excel you can't refresh and update the excel sheet if the source file
data changes.

Refresh
to
update
the file

 The image above shows, no Refresh option appears to update the excel sheet

© EduPristine Importing Data 12


Importing .csv/prn File Data using Direct method:
 Step 1:
• Open the excel file, select the “Data” option and under it click on the “Form Text” option.
• Select the csv/prn file and press the import button.

1
2

© EduPristine Importing Data 13


Cont.…
 Step 2:
• Make necessary changes in the Text Import Wizard
Note: Under indirect method excel automatically opens a CSV file, but under direct method a Text Import
Wizard window appears and you need to split Columns manually to open csv file in excel.

1
3

2 4

© EduPristine Importing Data 14


Cont.…

2
 Here you can also define data types of each column.
 You can see in the image we have selected Date format for first column
 Finally, click the Finish button to open the csv/prn file in excel.

© EduPristine Importing Data 15


Cont.…
 Once you press the Finish button, an Import Data
window appears, which gives option to import the
data in an existing or new worksheet, select any of
the option and press “OK” button. 1

 This is how the imported data will look like in excel

© EduPristine Importing Data 16


Advantages of Direct Method:
 Using direct method to import data in excel you can
refresh, edit the text and update the existing excel sheet
if the source file data changes.

 The image in the right shows, “Refresh” option & “Edit


Text Import” option to update the existing excel sheet.

© EduPristine Importing Data 17


Case: Using MS Access to Import Data
After a week Ramanov's manager asked him to get employee data from ODBC Data source (Ms access). Ramanov
is wondering how to extract data from MS access or other ODBC Data sources, help Ramanov in completing his
task.

© EduPristine Importing Data 18


Comment:
 Step 1:
• Open the excel file, select the “Data” option and under it click on the “From Access” option.
• Select the Data Source (example: NorthWind.mdb) and press the “Open” button.

2 1

© EduPristine Importing Data 19


Cont.…
 Step 2:
• Once Access file is selected and opened, a “Select Table” window appears.

 From the given option select the appropriate table you want to import. So, select the Employee
Table as required by the case.

© EduPristine Importing Data 20


Cont.…

 Step 3:
• After selecting the appropriate table that needs to be
imported, an “Import Data” window appears, which gives
option to select the “form” in which data is to be
presented. 1

 The image shows three option in which you can view


the data. Let’s select the “Table” form. 2

© EduPristine Importing Data 21


Selecting Specific Query from the Data:
 Step 1:
• Open the excel file, select the “Data” option and under it click on the “From Other sources” and select the
“From Microsoft Query” from the drop down box.

1
2

© EduPristine Importing Data 22


Cont.…
 Step 2:
• Once MS Query selected, a “Choose Data Source” window appears, which provides the option to choose
the databases.
• Choose the “MS Access Database.” and Press “OK”,
• A “Select Database” window appears, which provides the option to select the source file.
• Select the appropriate file (example – NorthWind.mdb)

© EduPristine Importing Data 23


Cont.…
 Step 3:
• Once the appropriate file is selected, an “Query 2
Wizard” window appears, which provide the
option to select data you want to include in your
query.
• Let’s assume we need details of a specific set of 1
customers. As shown in the image select the
Customers from the drop down list and press
Forward (>) button.
• Pressing Forward (>), all customers related
3
information will populate in the existing window.

© EduPristine Importing Data 24


Cont.…
 Step 4 (Optional):
• Here you can further filter the data to specify
which information to include in your query.
• Suppose we select “City” which contain
alphabet “ar”

© EduPristine Importing Data 25


Cont.…
 Step 5 (Optional):
• Here you can specify - How you want your data sorted?
• Suppose we sort by “City” and in “Ascending” order

1 2

© EduPristine Importing Data 26


Cont.…
 Step 6:
• At this stage you have 2 options
1. Directly import the data to excel sheet,
2. First view data and then import the data to excel 1
sheet.

• Even you can view the “SQL” Statement by clicking


the SQL button given above the Query Window

© EduPristine Importing Data 27


Cont.…
 Step 7:
• Select how you want to view the data in your excel sheet.

© EduPristine Importing Data 28


Advantages of using MS Access:
 Using MS Access to import data in excel, you can refresh and update the existing excel sheet if the
source file data changes.
 The image below shows, “Refresh” option to update the existing excel sheet.

© EduPristine Importing Data 29


Creating new connection for Other Databases:
 Step 1: 1
• Open “Control Panel”
• Select “Administrative Tools”
• Under Administrative Tools select “Data
Sources (ODBC)” 2

• In “ODBC Data Source” click on the “Add”


button, to add new connection.

© EduPristine Importing Data 30


Cont.…

 Step 2:
• In “Create New Data Source” select a driver to set up a
data source.
• It is normally used to create data source link to Oracle
and other types of databases. However you can also
add and use other excel files as a data source.
• Suppose, we select “Microsoft Excel Driver” to set new 1
data source connection.

© EduPristine Importing Data 31


Cont.…

 Step 3:
• Once the Driver is selected, an “ODBC Setup” window 1
opens.
• Use the window to name the “New Data Source” and
“Select the source file.”
• Here we selected an excel file.
2

5
3

© EduPristine Importing Data 32


Cont.…

 Step 4:
• Once you have named the data source and selected the
source file, again the “ODBC Data Source” window
opens up with new added data
source(My_New_Source).
• Select the new added source (My_New_Source) and
press the “OK” button, it will open the excel file.

© EduPristine Importing Data 33


Cont.…
1
 Step 5:
• In excel workbook, select “Data“ option and under
it select “From Other Sources.” 2

• “From Other source” will open a drop down list,


SELECT “From Microsoft Query” from the list.

© EduPristine Importing Data 34


Cont.…

 Step 6:
• After selecting the new data source
(My_New_Source) from “Data Source”
window, a “Query Wizard” opens, which
allows to select the data you want to include in
your query.
• From here follow the steps 3-7 from “Selecting
specific query from the data” (slide no. 23-27).

© EduPristine Importing Data 35


Thank You !

care@edupristine.com
www.edupristine.com

© EduPristine – www.edupristine.com

Anda mungkin juga menyukai