Gerard Loumou
Gerard Loumou

Reputation: 163

How to read excel into Julia?

I need to read an excel file into Julia. I tried the package "ExcelReaders". However, the package requires additionally the Python or the xlrd package. Although it uses the conda.jl package to install these dependencies automatically, I keep on running into different installation problems. Is there a simple way to read excel into Julia? Has anyone tried the Taro.jl package?

Upvotes: 16

Views: 16133

Answers (6)

Nothx
Nothx

Reputation: 161

There is only one pure-Julia v1.0-compatible Excel reader available:

XLSX.jl

It has no dependencies on Python or Java. Install it from the package manager by typing ]add XLSX in the console, then load it with using XLSX. Here is the tutorial document.

Upvotes: 16

Antonello
Antonello

Reputation: 6431

If you are fine with saving in the ods format, you could also use the OdsIO.jl package.

It uses a python module (ezodf) as well, but it should install it automatically in both Windows and Linux when you install OdsIO.jl.

Upvotes: 3

fatdragon
fatdragon

Reputation: 2299

The ExcelReaders package is also available

https://github.com/davidanthoff/ExcelReaders.jl

Upvotes: 0

Bob Simonson
Bob Simonson

Reputation: 116

The Taro.jl package works well to read excel into Julia. You can install the package with Pkg.add(Taro). Once the package is installed, you can load it with using Taro; Taro.init(). You can use Taro.readxl() to read excel files. The following post provides a somewhat nice tutorial on how to read excel files in Julia using Taro.jl:

https://economictheoryblog.com/2018/01/03/how-to-read-an-excel-file-in-julia-language-an-example/

Upvotes: 10

Chris Rackauckas
Chris Rackauckas

Reputation: 19132

If you can save as a .csv then CSV.jl works well.

Upvotes: 2

aviks
aviks

Reputation: 2097

Taro works pretty well (even if I say so myself). You need java installed on the machine, but after that, Pkg.add(Taro) will install all the dependencies for you. And, I think you'll have better luck with Taro with more complex excel files.

Upvotes: 6

Related Questions