How to Read an Excel File in Julia Language? An example.

This article shortly describes how to read an Excel file into Julia. Generally, one can use different libraries to read Excel files, including XLSXReaderExcelReaders or Taro. In this tutorial I will focus on Taro as it created the fewest problems and provides – at least in my eyes – an easy to understand syntax.

In order to read an Excel file into Julia it is sufficient to execute the following lines of code:

# in case you have not installed to Pkg yet

# load Taro - Pkg to read Excel Data
using Taro

# get data
df = Taro.readxl("path to Excel", "sheet1", "A1:C357")

This code will read the selected data fields, i.e. field A1 to field C357, of sheet1 into a dataframe in Julia. You can also directly consult the documentation of the Taro Package here.

This entry was posted in Computing and Others and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s