Reading and writing Microsoft Excel files
Microsoft Excel is a popular spreadsheet application. In this recipe, you will discover how to create files within Julia using the openpyxl
Python library, as well as how to read Excel files. Specifically, we will look at how to handle Excel files in two different ways: firstly, by using Python's openpyxl
library via PyCall.jl
, and secondly, by using the XLSX.jl
package.
Getting ready
For this recipe, you need the following packages: PyCall.jl
, Conda.jl
, DataFrames.jl
, and XLSX.jl
. Install them with the Julia package manager by going to the Julia command line (REPL), pressing the ] key, and running the following commands:
(v1.0) pkg> add PyCall
(v1.0) pkg> add Conda
(v1.0) pkg> add DataFrames
(v1.0) pkg> add XLSX
This will install the required packages and their dependencies.
The openpyxl
Python library can be installed with the following commands:
julia> using Conda julia> Conda.add("openpyxl")
Note
In the GitHub repository for this...