# ExcelReaders function openxl

**URL:** <https://discourse.julialang.org/t/excelreaders-function-openxl/57303>\
**Category:** General Usage\
**Created:** [March 16, 2021, 1:43pm UTC](https://discourse.julialang.org/t/excelreaders-function-openxl/57303 "2021-03-16T13:43:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaropro14](https://avatars.discourse-cdn.com/v4/letter/y/97f17d/32.png) [@Yaropro14](https://discourse.julialang.org/u/Yaropro14)\
**Post date:** [March 16, 2021, 1:43pm UTC](https://discourse.julialang.org/t/excelreaders-function-openxl/57303/1 "2021-03-16T13:43:27Z")

</div>

using ExcelReaders, JuMP, Plots, Gurobi  
cd(“/Users/yaroslav/Desktop/Diplom/”)  
file5=openxl(“ASG data 14.06.2018 (new data).xlsx”)

PyError ($(Expr(:escape, :(ccall(#= /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:43 =# @pysym(:PyObject\_Call), PyPtr, (PyPtr, PyPtr, PyPtr), o, pyargsptr, kw))))) \<class ‘xlrd.compdoc.CompDocError’\>  
CompDocError(‘Workbook corruption: seen[2] == 4’)  
File “/Users/yaroslav/.julia/conda/3/lib/python3.8/site-packages/xlrd/ **init**.py”, line 172, in open\_workbook  
bk = open\_workbook\_xls(  
File “/Users/yaroslav/.julia/conda/3/lib/python3.8/site-packages/xlrd/book.py”, line 68, in open\_workbook\_xls  
bk.biff2\_8\_load(  
File “/Users/yaroslav/.julia/conda/3/lib/python3.8/site-packages/xlrd/book.py”, line 641, in biff2\_8\_load  
cd.locate\_named\_stream(UNICODE\_LITERAL(qname))  
File “/Users/yaroslav/.julia/conda/3/lib/python3.8/site-packages/xlrd/compdoc.py”, line 398, in locate\_named\_stream  
result = self.\_locate\_stream(  
File “/Users/yaroslav/.julia/conda/3/lib/python3.8/site-packages/xlrd/compdoc.py”, line 429, in \_locate\_stream  
raise CompDocError(“%s corruption: seen[%d] == %d” % (qname, s, self.seen[s]))

Stacktrace:  
[1] pyerr\_check at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/exception.jl:62 [inlined]  
[2] pyerr\_check at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/exception.jl:66 [inlined]  
[3] \_handle\_error(::String) at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/exception.jl:83  
[4] macro expansion at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/exception.jl:97 [inlined]  
[5] #109 at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:43 [inlined]  
[6] disable\_sigint at ./c.jl:446 [inlined]  
[7] \_\_pycall! at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:42 [inlined]  
[8] \_pycall!(::PyObject, ::PyObject, ::Tuple{String}, ::Int64, ::Ptr{Nothing}) at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:29  
[9] _pycall! at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:11 [inlined]  
[10] #_#116 at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:86 [inlined]  
[11] (::PyObject)(::String) at /Users/yaroslav/.julia/packages/PyCall/tqyST/src/pyfncall.jl:86  
[12] openxl(::String) at /Users/yaroslav/.julia/packages/ExcelReaders/PgE1r/src/ExcelReaders.jl:64  
[13] top-level scope at In[81]:1  
[14] include\_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1091

In :

​

---

<div class="post-metadata">

**Author:** ![chris-b1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chris-b1/32/14165_2.png) [@chris-b1](https://discourse.julialang.org/u/chris-b1)\
**Post date:** [March 16, 2021, 1:52pm UTC](https://discourse.julialang.org/t/excelreaders-function-openxl/57303/2 "2021-03-16T13:52:54Z")

</div>

It looks like a corrupted workbook - does the file open normally in Excel (if you have a copy)?

You could also try [`XLSX.jl`](https://felipenoris.github.io/XLSX.jl/stable/tutorial/) - does the file open with it?

---

<div class="post-metadata">

**Author:** ![Yaropro14](https://avatars.discourse-cdn.com/v4/letter/y/97f17d/32.png) [@Yaropro14](https://discourse.julialang.org/u/Yaropro14)\
**Post date:** [March 16, 2021, 2:04pm UTC](https://discourse.julialang.org/t/excelreaders-function-openxl/57303/3 "2021-03-16T14:04:15Z")

</div>

Yes, file open with [`XLSX.jl`](https://felipenoris.github.io/XLSX.jl/stable/tutorial/). Which function can I use instead of readxl()?

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [March 16, 2021, 3:07pm UTC](https://discourse.julialang.org/t/excelreaders-function-openxl/57303/4 "2021-03-16T15:07:18Z")

</div>

Check out the tutorial [here](https://felipenoris.github.io/XLSX.jl/stable/tutorial/). You want `XLSX.readxlsx`
