Home » excel » How to read excel into Julia?

How to read excel into Julia?

Posted by: admin March 7, 2020 Leave a comment

Questions:

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?

How to&Answers:

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/

Answer:

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.

Answer:

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.

Answer:

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.

Answer:

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

Answer:

The ExcelReaders package is also available

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