# Csv file not a valid file

**URL:** https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153
**Category:** New to Julia
**Tags:** csv
**Created:** [March 18, 2020, 5:39pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153 "2020-03-18T17:39:11Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![mayar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mayar/32/16426_2.png) [@mayar](https://discourse.julialang.org/u/mayar)
#### Post date: [March 18, 2020, 5:39pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/1 "2020-03-18T17:39:11Z")

</div>

Excel files are basically CSV files, aren’t they ?  
What could be the reason my excel file “branch” be not considered a valid CSV file… This is the error msg I get. ![not a valid csv vifle](https://global.discourse-cdn.com/julialang/original/3X/3/1/31907b432fb4181114f49d286d0298d33744988b.png)

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [March 18, 2020, 5:55pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/2 "2020-03-18T17:55:56Z")

</div>

> [@mayar](#):
>
> Excel files are basically CSV files, aren’t they ?

If you open it in a text editor, does it look like a CSV file?

---

<div class="post-metadata">

### Author: ![jeffreyesun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreyesun/32/13379_2.png) [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)
#### Post date: [March 18, 2020, 6:40pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/3 "2020-03-18T18:40:03Z")

</div>

Excel files are indeed not much like CSV files at all. In fact, an Excel file is internally a ZIP file containing XML files. However, packages do exist for reading Excel files into Julia. Try [XLSX.jl](https://felipenoris.github.io/XLSX.jl/dev/).

---

<div class="post-metadata">

### Author: ![mayar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mayar/32/16426_2.png) [@mayar](https://discourse.julialang.org/u/mayar)
#### Post date: [March 18, 2020, 6:56pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/4 "2020-03-18T18:56:51Z")

</div>

where do i write xlsx.jl pls ?

---

<div class="post-metadata">

### Author: ![jeffreyesun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreyesun/32/13379_2.png) [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)
#### Post date: [March 18, 2020, 6:57pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/5 "2020-03-18T18:57:29Z")

</div>

You can install it by typing `]add XLSX` in your REPL.

---

<div class="post-metadata">

### Author: ![mayar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mayar/32/16426_2.png) [@mayar](https://discourse.julialang.org/u/mayar)
#### Post date: [March 18, 2020, 7:07pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/6 "2020-03-18T19:07:19Z")

</div>

i TYPED this in my REPL

Pkg.add(“xlsx”)

but I got the same error

---

<div class="post-metadata">

### Author: ![jeffreyesun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreyesun/32/13379_2.png) [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)
#### Post date: [March 18, 2020, 7:16pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/7 "2020-03-18T19:16:37Z")

</div>

Try typing `]add XLSX`, and remember to capitalize.

---

<div class="post-metadata">

### Author: ![mayar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mayar/32/16426_2.png) [@mayar](https://discourse.julialang.org/u/mayar)
#### Post date: [March 18, 2020, 7:21pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/8 "2020-03-18T19:21:14Z")

</div>

> [@jeffreyesun](#):
>
> ]add XLSX

yes it is added  
I git a msg of no change but after I run the main code, I get the same error . what could be the reason ![pkg](https://global.discourse-cdn.com/julialang/original/3X/5/d/5d0dd85f1bee04fb98ffd4575c665e4155ea20cb.png)

---

<div class="post-metadata">

### Author: ![jeffreyesun](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreyesun/32/13379_2.png) [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)
#### Post date: [March 18, 2020, 7:22pm UTC](https://discourse.julialang.org/t/csv-file-not-a-valid-file/36153/9 "2020-03-18T19:22:24Z")

</div>

What code are you trying to run? Are you using the XLSX package as in [this tutorial](https://felipenoris.github.io/XLSX.jl/dev/tutorial/)?
