[ANN] XLSX.jl reaches v0.1.0

XLSX.jl is a package to read Excel xlsx files, written in pure Julia.

You can also get tabular data from an Excel file using the code below.

using DataFrames, XLSX
df = DataFrame(XLSX.gettable("myfile.xlsx", "mysheet")...)

Check the repo README for more examples.
Please, let me know if you find any bugs.

6 Likes

Any plans to support saving a DataFrame into excel file?

Yes! https://github.com/felipenoris/XLSX.jl/issues/6

1 Like

Just merged Excel write feature in master branch.

julia> import DataFrames, XLSX

julia> df = DataFrames.DataFrame(:integers=>[1, 2, 3, 4], :strings=>["Hey", "You", "Out", "There"], :floats=>[10.2, 20.3, 30.4, 40.5], :dates=>[Date(2018,2,20), Date(2018,2,21), Date(2018,2,22), Date(2018,2,23)], :times=>[Dates.Time(19,10), Dates.Time(19,20), Dates.Time(19,30), Dates.Time(19,40)], :datetimes=>[Dates.DateTime(2018,5,20,19,10), Dates.DateTime(2018,5,20,19,20), Dates.DateTime(2018,5,20,19,30), Dates.DateTime(2018,5,20,19,40)])
4×6 DataFrames.DataFrame
│ Row │ integers │ strings │ floats │ dates      │ times    │ datetimes           │
├─────┼──────────┼─────────┼────────┼────────────┼──────────┼─────────────────────┤
│ 1   │ 1        │ Hey     │ 10.2   │ 2018-02-20 │ 19:10:00 │ 2018-05-20T19:10:00 │
│ 2   │ 2        │ You     │ 20.3   │ 2018-02-21 │ 19:20:00 │ 2018-05-20T19:20:00 │
│ 3   │ 3        │ Out     │ 30.4   │ 2018-02-22 │ 19:30:00 │ 2018-05-20T19:30:00 │
│ 4   │ 4        │ There   │ 40.5   │ 2018-02-23 │ 19:40:00 │ 2018-05-20T19:40:00 │

julia> XLSX.writetable("df.xlsx", DataFrames.columns(df), DataFrames.names(df))
11 Likes