Top Banner
Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group
22

Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files

in an MS Excel spreadsheet

Wim Buysse – ICRAF-ILRI Research Methods GroupAugust 2004

Research Methods Group

Page 2: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example

• GPS

Research Methods Group

Page 3: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example weather station

Research Methods Group

Page 4: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example light intensity meter

Research Methods Group

Page 5: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example CO2 and

temperature meter

Research Methods Group

Page 6: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example soil moisture logger

Research Methods Group

Page 7: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example rain gauge

Research Methods Group

Page 8: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example ICP mass

spectrometer

Research Methods Group

Page 9: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing text files: example• Data loggers, example harvesters

Research Methods Group

Page 10: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Avoid entering manually• Reading data from device and next typing in

spreadsheet = increasing chance of typing errors

• Reading data from device on the field, writing on a piece of paper, travelling all the way back to the office and typing in spreadsheet (often some days later) = almost impossible not to make some mistake

Research Methods Group

Page 11: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Avoid entering manually• RULE = use cables and software to transfer data

from device to computer

Research Methods Group

• example = logging data from GPS onto a laptop

Page 12: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Avoid entering manually

• Example of software (for logging GPS data)

Research Methods Group

Page 13: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Text data files

• Result of logged data is quite often in ASCII text format

Research Methods Group

Page 14: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing in MS Excel 2000

• File => Open gives you the “Text Import Wizard”

Research Methods Group

Page 15: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing in MS Excel 2000• In this example, fields to import are separated by

commas. They are “delimited”

Research Methods Group

Page 16: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing in MS Excel 2000• Choose the comma as delimiter in the second

screen

Research Methods Group

Page 17: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing in MS Excel 2000• More options in the third screen

Research Methods Group

Page 18: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Importing in MS Excel 2000• The data are imported in cells of an Excel spreadsheet.

Not a single typing error has been made!

Research Methods Group

Page 19: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Some functions

• CONCATENATE() for merging text from several cells

Research Methods Group

Page 20: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Some functions

• LEFT(); RIGHT() or MID() to extract a fixed number of characters from a specific position

Research Methods Group

Page 21: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Some functions

• Result of

=RIGHT(B2, 3)

Is still text• Using the VALUE

function turns it

into figures

Research Methods Group

Page 22: Importing text files in an MS Excel spreadsheet Wim Buysse – ICRAF-ILRI Research Methods Group August 2004 Research Methods Group.

Some functions

• It is possible to superpose a function on a function

Research Methods Group