# Converting XLSX to DataFrame

**URL:** https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142
**Category:** General Usage
**Tags:** dataframes, xlsx
**Created:** [November 8, 2021, 10:03am UTC](https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142 "2021-11-08T10:03:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jnewbie](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jnewbie](https://discourse.julialang.org/u/jnewbie)
#### Post date: [November 8, 2021, 10:03am UTC](https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142/1 "2021-11-08T10:03:26Z")

</div>

Hello everyone,

I am trying to read an xlsx file in julia :

```julia
Materials = XLSX.readtable("MatData.xlsx","Sheet1"; header = true)

```

In order to be able to make changes/calculations on it I want to convert it into a DataFrame:

```julia
materials = DataFrame(Materials)

```

I then get this error, does anyone know why?

```julia
ArgumentError: 'Tuple{Vector{Any}, Vector{Symbol}}' iterates 'Vector{Any}' values, which doesn't satisfy the Tables.jl `AbstractRow` interface

```

Thank you !

---

<div class="post-metadata">

### Author: ![trahflow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/trahflow/32/30585_2.png) [@trahflow](https://discourse.julialang.org/u/trahflow)
#### Post date: [November 8, 2021, 10:13am UTC](https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142/2 "2021-11-08T10:13:11Z")

</div>

Hi @jnewbie ,

XLSX.jl has a tutorial section on how to do this:  
[https://felipenoris.github.io/XLSX.jl/stable/tutorial/#Read-Tabular-Data](https://felipenoris.github.io/XLSX.jl/stable/tutorial/#Read-Tabular-Data)

you need the `...` to splat `Materials` into a sequence of arguments for the `DataFrame` constructor.  
This is probably not super performant, but since it’s part of the tutorial, I assume that’s currently the best way to do this.

---

<div class="post-metadata">

### Author: ![jnewbie](https://avatars.discourse-cdn.com/v4/letter/j/53a042/32.png) [@jnewbie](https://discourse.julialang.org/u/jnewbie)
#### Post date: [November 8, 2021, 10:27am UTC](https://discourse.julialang.org/t/converting-xlsx-to-dataframe/71142/3 "2021-11-08T10:27:37Z")

</div>

Thank you it works perfectly
